diff --git a/src/executor.js b/src/executor.js index 41810a7..8c3d8d6 100644 --- a/src/executor.js +++ b/src/executor.js @@ -1,6 +1,6 @@ import untildify from 'untildify'; import fse from 'fs-extra'; -import { spawn } from 'child_process'; +import { spawn } from 'child-process-promise'; import normalizePackageData from 'normalize-package-data'; import sortPackageJSON from 'sort-package-json'; import isOnline from 'is-online'; @@ -92,8 +92,17 @@ const executor = async () => { normalizePackageData(packageJSON); fse.writeJsonSync(packageJSONLocation, sortPackageJSON(packageJSON), 'utf8'); + console.log('⌛ 🤞 Installing packages'); await spawn('npm', ['install'], { cwd: destinationDirectory, stdio: 'inherit' }); await spawn('git', ['init'], { cwd: destinationDirectory, stdio: 'inherit' }); + + console.log('🥝 🍋 🍐 🍓 🍊 🍍 🍰 Installation complete! 🍒 🍈 🍇 🍉 🍏 🍎 🍌'); + console.log('🔥 "npm run test" runs the jest tests'); + console.log('🏗️ "npm run build" will build your modules'); + + if (isReact) { + console.log('📖 "npm run storybook" starts Storybook!'); + } }; export default executor; diff --git a/src/prompts.js b/src/prompts.js index d1ed48c..666f25c 100644 --- a/src/prompts.js +++ b/src/prompts.js @@ -13,7 +13,7 @@ const prompts = async () => ( inquirer.prompt([ { name: 'packageType', - message: 'Package Type', + message: 'Select a package type', type: 'list', choices: [ PACKAGE_TYPES.NODE, @@ -22,7 +22,7 @@ const prompts = async () => ( }, { name: 'packageFeatures', - message: 'Package Features', + message: 'Select package Features', type: 'checkbox', choices: [ PACKAGE_FEATURES.COMMITLINT, @@ -31,25 +31,25 @@ const prompts = async () => ( }, { name: 'packageName', - message: 'Name of Package', + message: 'Input a package name', type: 'input', validate: packageName => validateNpmPackageName(packageName).validForNewPackages || `${packageName} is an invalid package name`, }, { name: 'packageDescription', - message: 'Package description', + message: 'Input a package description', type: 'input', validate: answer => answer && answer.length > 0, }, { name: 'packageVersion', - message: 'Package version', + message: 'Input an initial package version', type: 'input', validate: answer => isSemver(answer) || `${answer} is an invalid package version`, }, { name: 'targetDirectory', - message: 'Where to create the package', + message: 'Input the relative package location', type: 'input', validate: answer => answer && answer.length > 0, }, @@ -61,7 +61,7 @@ const prompts = async () => ( }, { name: 'gitHubUsername', - message: 'Input your GitHub Username', + message: 'Input your GitHub username', type: 'input', validate: async (username) => { if (await isGitHubUsernameValid(username)) { diff --git a/src/templates/core/package.template.json b/src/templates/core/package.template.json index b7cb92b..9784f09 100644 --- a/src/templates/core/package.template.json +++ b/src/templates/core/package.template.json @@ -32,6 +32,7 @@ "@babel/core": "^7.0.0-beta.42", "@babel/preset-env": "^7.0.0-beta.42", "babel-core": "^7.0.0-bridge.0", + "babel-jest": "22.4.3", "codecov": "^3.0.0", "eslint": "^4.19.1", "eslint-config-airbnb": "^16.1.0", @@ -40,6 +41,7 @@ "eslint-plugin-react": "^7.7.0", "eslint-plugin-import": "^2.9.0", "jest": "^22.4.3", + "regenerator-runtime": "0.11.1", "rollup": "^0.58.1", "rollup-plugin-babel": "^4.0.0-beta.4", "rollup-plugin-babel-minify": "^4.0.0", @@ -47,5 +49,9 @@ "rollup-plugin-filesize": "^1.5.0", "rollup-plugin-local-resolve": "^1.0.7", "rollup-plugin-node-resolve": "^3.3.0" - } + }, + "testPathIgnorePatterns": [ + "/build/", + "/node_modules/" + ] } diff --git a/src/templates/react/package.json b/src/templates/react/package.json index 48fc978..5eb093d 100644 --- a/src/templates/react/package.json +++ b/src/templates/react/package.json @@ -53,6 +53,9 @@ ], "coveragePathIgnorePatterns": [ "/node_modules/" + ], + "testPathIgnorePatterns": [ + "*.stories.{js,jsx}" ] } }