Skip to content

Commit 12e1990

Browse files
committedMar 5, 2018
bugfix git ignore template
1 parent 78baf09 commit 12e1990

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed
 

‎lib/create-library.js

+24
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,30 @@ module.exports.initGitRepo = async (opts) => {
105105
dest
106106
} = opts
107107

108+
const gitIgnorePath = path.join(dest, '.gitignore')
109+
fs.writeFileSync(gitIgnorePath, `
110+
# See https://help.github.com/ignore-files/ for more about ignoring files.
111+
112+
# dependencies
113+
node_modules
114+
115+
# builds
116+
build
117+
dist
118+
119+
# misc
120+
.DS_Store
121+
.env
122+
.env.local
123+
.env.development.local
124+
.env.test.local
125+
.env.production.local
126+
127+
npm-debug.log*
128+
yarn-debug.log*
129+
yarn-error.log*
130+
`, 'utf8')
131+
108132
const cmd = `git init && git add . && git commit -m "init ${pkg.name}@${pkg.version}"`
109133
return execa.shell(cmd, { cwd: dest })
110134
}

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-modern-library-cli",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "CLI for easily bootstrapping modern react libraries",
55
"main": "index.js",
66
"license": "MIT",

0 commit comments

Comments
 (0)
Please sign in to comment.