fix gitignore bug, include src/Generated too

This commit is contained in:
Ryan Haskell-Glatz 2020-03-27 00:00:36 -05:00
parent 0a4e7e4805
commit 3ab6adae8d
3 changed files with 8 additions and 3 deletions

View File

@ -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),

View File

@ -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)\""

View File

@ -1,4 +1,6 @@
.DS_Store
dist
elm-stuff
node_modules
node_modules
src/Generated