diff --git a/.travis.yml b/.travis.yml index 7fd7c34..4a4f2a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,18 +2,14 @@ language: node_js cache: directories: - node_modules -notifications: - email: false node_js: - '7' - '6' - '4' +before_install: + - npm i -g howardroark/pollinate#feature/keep-history before_script: - npm prune script: - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js -after_success: - - npm run semantic-release -branches: - except: - - /^v\d+\.\d+\.\d+$/ + diff --git a/PROJECT-.travis.yml b/PROJECT-.travis.yml new file mode 100644 index 0000000..7fd7c34 --- /dev/null +++ b/PROJECT-.travis.yml @@ -0,0 +1,19 @@ +language: node_js +cache: + directories: + - node_modules +notifications: + email: false +node_js: + - '7' + - '6' + - '4' +before_script: + - npm prune +script: + - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/PROJECT-package.json b/PROJECT-package.json new file mode 100644 index 0000000..f2cd403 --- /dev/null +++ b/PROJECT-package.json @@ -0,0 +1,83 @@ +{ + "name": "{{ name }}", + "version": "0.0.0-development", + "description": "{{ description }}", + "main": "lib/index.js", + "scripts": { + "lint": "eslint src test", + "lint:fix": "eslint --fix src test", + "lint:watch": "esw --watch src test", + "flow": "flow", + "flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done", + "flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore lib/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/", + "gen-flow-files": "flow gen-flow-files src/ --out-dir lib", + "copy-flow-files": "cd src; copy *.js.flow **/*.js.flow ../lib", + "build": "rimraf lib && babel src --out-dir lib", + "test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha", + "commitmsg": "validate-commit-msg", + "precommit": "npm run lint && flow", + "prepush": "npm test", + "prepublish": "npm run lint && flow && npm test && npm run build && npm run copy-flow-files", + "open:coverage": "open coverage/lcov-report/index.html", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" + }, + "config": { + "mocha": "--compilers js:babel-core/register ./test/**/*.js", + "commitizen": { + "path": "cz-conventional-changelog" + } + }, + "nyc": { + "include": [ + "src/**/*.js" + ], + "require": [ + "babel-register" + ], + "sourceMap": false, + "instrument": false + }, + "repository": { + "type": "git", + "url": "https://github.com/{{ organization }}/{{ name }}.git" + }, + "keywords": [ + "es2015" + ], + "author": "{{ author }}", + "license": "MIT", + "bugs": { + "url": "https://github.com/{{ organization }}/{{ name }}/issues" + }, + "homepage": "https://github.com/{{ organization }}/{{ name }}#readme", + "devDependencies": { + "@jedwards1211/eslint-config": "^1.0.0", + "@jedwards1211/eslint-config-flow": "^1.0.0", + "babel-cli": "^6.22.2", + "babel-core": "^6.22.1", + "babel-eslint": "^7.1.1", + "babel-plugin-istanbul": "^3.1.2", + "babel-plugin-transform-runtime": "^6.22.0", + "babel-preset-es2015": "^6.22.0", + "babel-preset-flow": "^1.0.0", + "babel-preset-stage-1": "^6.22.0", + "babel-register": "^6.22.0", + "babel-runtime": "^6.22.0", + "chai": "^3.5.0", + "copy": "^0.3.0", + "coveralls": "^2.11.15", + "eslint": "^3.13.1", + "eslint-plugin-flowtype": "^2.30.0", + "eslint-watch": "^2.1.14", + "flow-bin": "^0.38.0", + "flow-watch": "^1.1.0", + "husky": "^0.12.0", + "istanbul": "^0.4.5", + "mocha": "^3.2.0", + "nyc": "^10.1.2", + "rimraf": "^2.5.4", + "semantic-release": "^6.3.2", + "validate-commit-msg": "^2.8.2" + }, + "dependencies": {} +} diff --git a/package.json b/package.json index f2cd403..49c1b23 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "{{ name }}", + "name": "es2015-library-skeleton", "version": "0.0.0-development", - "description": "{{ description }}", + "description": "my personal skeleton for ES2015 library NPM packages", "main": "lib/index.js", "scripts": { "lint": "eslint src test", @@ -10,19 +10,14 @@ "flow": "flow", "flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done", "flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore lib/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/", - "gen-flow-files": "flow gen-flow-files src/ --out-dir lib", - "copy-flow-files": "cd src; copy *.js.flow **/*.js.flow ../lib", - "build": "rimraf lib && babel src --out-dir lib", - "test": "NODE_ENV=production BABEL_ENV=test nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha", + "test": "rimraf pollinated && pollinate git@github.com:jedwards1211/es2015-library-skeleton#pollinate --name pollinated --keep-history && cd pollinated && npm i && cd .. && rimraf pollinated", "commitmsg": "validate-commit-msg", "precommit": "npm run lint && flow", "prepush": "npm test", "prepublish": "npm run lint && flow && npm test && npm run build && npm run copy-flow-files", - "open:coverage": "open coverage/lcov-report/index.html", - "semantic-release": "semantic-release pre && npm publish && semantic-release post" + "open:coverage": "open coverage/lcov-report/index.html" }, "config": { - "mocha": "--compilers js:babel-core/register ./test/**/*.js", "commitizen": { "path": "cz-conventional-changelog" } @@ -39,17 +34,17 @@ }, "repository": { "type": "git", - "url": "https://github.com/{{ organization }}/{{ name }}.git" + "url": "https://github.com/jedwards1211/es2015-library-skeleton.git" }, "keywords": [ "es2015" ], - "author": "{{ author }}", + "author": "Andy Edwards", "license": "MIT", "bugs": { - "url": "https://github.com/{{ organization }}/{{ name }}/issues" + "url": "https://github.com/jedwards1211/es2015-library-skeleton/issues" }, - "homepage": "https://github.com/{{ organization }}/{{ name }}#readme", + "homepage": "https://github.com/jedwards1211/es2015-library-skeleton#readme", "devDependencies": { "@jedwards1211/eslint-config": "^1.0.0", "@jedwards1211/eslint-config-flow": "^1.0.0", @@ -63,9 +58,6 @@ "babel-preset-stage-1": "^6.22.0", "babel-register": "^6.22.0", "babel-runtime": "^6.22.0", - "chai": "^3.5.0", - "copy": "^0.3.0", - "coveralls": "^2.11.15", "eslint": "^3.13.1", "eslint-plugin-flowtype": "^2.30.0", "eslint-watch": "^2.1.14", @@ -73,11 +65,10 @@ "flow-watch": "^1.1.0", "husky": "^0.12.0", "istanbul": "^0.4.5", - "mocha": "^3.2.0", "nyc": "^10.1.2", "rimraf": "^2.5.4", - "semantic-release": "^6.3.2", "validate-commit-msg": "^2.8.2" }, "dependencies": {} } + diff --git a/template.json b/template.json index 5df8e8e..988a609 100644 --- a/template.json +++ b/template.json @@ -6,16 +6,20 @@ "parse": [ "PROJECT-README", "PROJECT-LICENSE", - "package.json" + "PROJECT-package.json" ], "discard": [ "README.md", "LICENSE.md", - "template.json" + "package.json", + "template.json", + ".travis.yml" ], "move": [ { "PROJECT-README": "README.md" }, - { "PROJECT-LICENSE": "LICENSE.md" } + { "PROJECT-LICENSE": "LICENSE.md" }, + { "PROJECT-package.json": "package.json" }, + { "PROJECT-.travis.yml": ".travis.yml" } ], "complete": "cd {{ name }} && git remote rename origin skeleton && git add . && git commit -n -m 'pollinate project'" }