jae-bradley-npm-package-creator-cli
v1.2.1
Published
Creates starting npm package structure using base template I like
Downloads
5
Readme
jae-bradley-npm-package-creator-cli
CLI that creates the starting directory for npm
packages using a template I like
Features
babel
jest
airbnb
eslint
configangular
commit message conventionhusky
git hookssemantic-release
greenkeeper-lockfile
(i.e. useGreenkeeper
)
Files
.babelrc
.eslintignore
.eslintrc
.gitignore
.npmignore
.travis.yml
commitlint.config.js
package-lock.json
package.json
Contents
.babelrc
{
"presets": ["@babel/preset-env"]
}
.eslintignore
coverage/*
build
node_modules
.eslintrc
{
"extends": "airbnb-base",
"env": {
"jest": true
}
}
.npmignore
.DS_Store
.eslintcache
node_modules
npm-debug.log
.travis.yml
src/
test/
*.test.js
coverage/
.travis.yml
language: node_js
cache:
directories:
- ~/.npm
notifications:
email: true
node_js:
- '8'
before_install:
- npm install -g npm@5
- npm install -g greenkeeper-lockfile@1
jobs:
include:
- stage: test
script:
- npm run compile
- npm run lint
- npm run test
- npm run is-es5
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
- stage: deploy
if: branch = master
script: npm run travis-deploy-once "npm run semantic-release"
commitlint.config.js
module.exports = { extends: ['@commitlint/config-angular'] };
package.json
Dynamically generated using the specified package name, package description, author email address, and GitHub username.
Will look something like
{
"version": "0.0.0-development",
"main": "index.js",
"scripts": {
"codecov": "codecov",
"commitmsg": "commitlint -e $GIT_PARAMS",
"compile": "babel -d build/ src/ --ignore node_modules,*.test.js",
"lint": "eslint --ext .js .",
"test": "jest --coverage --passWithNoTests",
"prepublishOnly": "npm run compile",
"semantic-commit": "commit",
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once"
},
"jest": {
"testEnvironment": "node"
},
"keywords": [],
"name": "specified package name",
"description": "specified package description",
"author": "[email protected]",
"repository": {
"type": "git",
"url": "https://github.com/specified-github-user-name/specified-package-name"
},
"bugs": {
"url": "https://github.com/specified-github-user-name/specified-package-name/issues"
},
"homepage": "https://github.com/specified-github-user-name/specified-package-name/#readme",
"devDependencies": {
"@babel/cli": "whatever the latest version is",
"@babel/core": "whatever the latest version is",
"@babel/preset-env": "whatever the latest version is",
"@commitlint/cli": "whatever the latest version is",
"@commitlint/config-angular": "whatever the latest version is",
"@commitlint/prompt": "whatever the latest version is",
"@commitlint/prompt-cli": "whatever the latest version is",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "whatever the latest version is",
"codecov": "whatever the latest version is",
"eslint": "whatever the latest version is",
"eslint-config-airbnb-base": "whatever the latest version is",
"eslint-plugin-import": "whatever the latest version is",
"husky": "whatever the latest version is",
"jest": "whatever the latest version is",
"semantic-release": "whatever the latest version is",
"travis-deploy-once": "whatever the latest version is",
}
}
Note: I'm using a specific version of babel-core
(^7.0.0-bridge.0
) because @babel/core
doesn't play well with jest
, right now.
.gitignore
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
build
.DS_Store