Skip to content

Commit

Permalink
fix(template): change .gitignore (resolve #601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Paniontko authored and epaminond committed Jul 11, 2018
1 parent 18b4971 commit 5018009
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/core/botpress/src/cli/init.js
Expand Up @@ -91,10 +91,18 @@ const loadTemplate = async name => {

const generate = async result => {
const files = await loadTemplate('init-default')
const hasNpmignore = files['.npmignore']

const info = JSON.parse(files['info.json'])
delete files['info.json']

if (hasNpmignore) {
// Npm renames .gitignore into .npmignore while publishing package which we need to revert
// See https://github.com/npm/npm/wiki/Files-and-Ignores#details-1 for more details
files['.gitignore'] = hasNpmignore
delete files['.npmignore']
}

console.log(showTemplateInfo(info))

for (const [name, content] of Object.entries(files)) {
Expand Down
Expand Up @@ -33,3 +33,5 @@ jspm_packages

# *** Botpress specifics ***
/.data

!/.data/middlewares.json

0 comments on commit 5018009

Please sign in to comment.