mirror of
https://github.com/ryannhg/elm-spa.git
synced 2024-11-22 01:32:43 +03:00
fix gitignore bug, include src/Generated too
This commit is contained in:
parent
0a4e7e4805
commit
3ab6adae8d
@ -119,7 +119,11 @@ const commands = {
|
||||
'init': ([ folder ]) =>
|
||||
folder && folder !== 'help'
|
||||
? Promise.resolve()
|
||||
.then(_ => cp(path.join(__dirname, 'projects', 'new'), path.join(process.cwd(), folder)))
|
||||
.then(_ => {
|
||||
const dest = path.join(process.cwd(), folder)
|
||||
cp(path.join(__dirname, 'projects', 'new'), dest)
|
||||
try { fs.renameSync(path.join(dest, '.npmignore'), path.join(dest, '.gitignore')) } catch (_) {}
|
||||
})
|
||||
.then(_ => `\ncreated a new project in ${path.join(process.cwd(), folder)}\n`)
|
||||
.catch(_ => `\nUnable to initialize a project at ${path.join(process.cwd(), folder)}\n`)
|
||||
: Promise.resolve(help.init),
|
||||
|
@ -9,7 +9,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "elm make src/Main.elm --optimize --output dist/elm.worker.js",
|
||||
"publish": "npm run build && npm publish",
|
||||
"test": "elm-test",
|
||||
"test:watch": "elm-test --watch",
|
||||
"dev": "chokidar src -c \"(npm run build || true)\""
|
||||
|
4
cli/projects/new/.gitignore
vendored
4
cli/projects/new/.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
.DS_Store
|
||||
dist
|
||||
elm-stuff
|
||||
node_modules
|
||||
node_modules
|
||||
|
||||
src/Generated
|
Loading…
Reference in New Issue
Block a user