Skip to content

Commit

Permalink
Version v0.1.2 (#3) (#4)
Browse files Browse the repository at this point in the history
* npm deploy added to `.travis.yml`
* S3 Upload util removed
* Dependencies updated
  • Loading branch information
prescottprue authored Mar 7, 2017
1 parent 443141d commit 6b9546d
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 72 deletions.
35 changes: 31 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
language: node_js

node_js:
- v6
- v5
- v4
- 6

sudo: false

script: "npm run test"
cache:
directories:
- node_modules

# Only build pushes to master and release branches (prevent duplicate builds)
branches:
only:
- master
- release

script:
- npm run test

addons:
code_climate:
repo_token: $CODE_CLIMATE

after_success:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < coverage/lcov.info
- npm run codecov

# Publish To NPM if push to release branch
deploy:
skip_cleanup: true
provider: npm
email: $NPM_EMAIL
api_key: $NPM_TOKEN
on:
branch: release
12 changes: 8 additions & 4 deletions generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ module.exports = class extends Generator {
name: 'codeClimate',
message: 'Would to include config for CodeClimate?',
default: true
},
{
type: 'confirm',
name: 'includeDocs',
message: 'Include Docs Generation through Gitbook?',
default: true
}
]

Expand All @@ -53,14 +59,12 @@ module.exports = class extends Generator {
{ src: '_package.json', dest: 'package.json' },
{ src: '_README.md', dest: 'README.md' },
{ src: 'babelrc', dest: '.babelrc' },
{ src: '_config.json', dest: 'config.json' },
{ src: 'gitignore', dest: '.gitignore' },
{ src: 'npmignore', dest: '.npmignore' },
{ src: 'webpack.config.js' },
{ src: 'src/_index.js', dest: 'src/index.js' },
{ src: 'bin/**', dest: 'bin' },
{ src: 'test/setup.js', dest: 'test/setup.js' },
{ src: 'test/unit/**', dest: 'test/unit' }
{ src: 'tests/setup.js', dest: 'tests/setup.js' },
{ src: 'tests/unit/**', dest: 'tests/unit' }
]

if (this.answers.includeTravis) {
Expand Down
6 changes: 0 additions & 6 deletions generators/app/templates/_config.json

This file was deleted.

16 changes: 6 additions & 10 deletions generators/app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"clean": "rimraf lib coverage",
"lint": "eslint src test",
"lint:fix": "npm run lint -- --fix",
"test": "mocha -R spec --compilers js:babel-core/register ./test/setup.js ./test/**/*.spec.js",
"test:cov": "babel-node $(npm bin)/isparta cover --report lcov ./node_modules/mocha/bin/_mocha -- ./test --recursive",
"test": "mocha -R spec --compilers js:babel-core/register ./tests/setup.js ./test/**/*.spec.js",
"test:cov": "istanbul cover ./node_modules/mocha/bin/_mocha -- ./tests/** --recursive --report lcov --compilers js:babel-register --require babel-polyfill",
"build:lib": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/<%= appName %>.js",
Expand All @@ -26,7 +26,7 @@
"watch:lib": "npm run build:lib -- --stats --progress --colors --watch",
"watch": "npm run watch:umd",
"prepublish": "npm run clean && npm run test && npm run build",
"upload": "node ./bin/upload"<% if (answers.includeDocs) { %>,
"prepush": "npm run lint:fix"<% if (answers.includeDocs) { %>,
"docs:clean": "rimraf _book",
"docs:prepare": "gitbook install",
"docs:build": "npm run docs:prepare && gitbook build -g <%= githubUser %>/<%= appName %>",
Expand All @@ -38,12 +38,7 @@
"url": "https://github.com/<%= githubUser %>/<%= appName %>.git"
},
"keywords": [
"kyper",
"matter",
"tessellate",
"authentication",
"user",
"project management"
"webpack"
],
"author": "<%= githubUser %>",
"contributors": [
Expand Down Expand Up @@ -87,10 +82,11 @@
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-promise": "^3.0.0",
"eslint-plugin-standard": "^2.0.1",
"husky": "^0.13.2",
"istanbul": "^1.1.0-alpha.1",
"json-loader": "^0.5.4",
"mocha": "^3.2.0",
"rimraf": "^2.5.4",
"webpack": "^1.13.2"
"webpack": "^1.14.0"
}
}
1 change: 0 additions & 1 deletion generators/app/templates/babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"presets": ["es2015"],
"plugins": [
Expand Down
23 changes: 0 additions & 23 deletions generators/app/templates/bin/upload.js

This file was deleted.

11 changes: 8 additions & 3 deletions generators/app/templates/gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Dependency directory
node_modules
**/.DS_Store
coverage
docs
examples/**/node_modules
dist
coverage
_book
es
lib
# Logs
*.log

.DS_Store
File renamed without changes.
43 changes: 26 additions & 17 deletions generators/app/templates/travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
language: node_js

node_js:
- "4"
- "5"
- "6"

branches:
only:
- master
- release

sudo: false
script: "npm run test:cov"

cache:
directories:
- node_modules

# before_install:
# - npm install # Install peer deps

script:
- npm run test:cov
- npm run build

# Publish To NPM if push to release branch
deploy:
skip_cleanup: true
provider: npm
email: $NPM_EMAIL
api_key: $NPM_TOKEN
on:
branch: release
<% if (answers.codeClimate) { %>
addons:
code_climate:
repo_token: $CODE_CLIMATE

after_success:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < coverage/lcov.info
<% } %>
<% if (answers.deployTo === 's3') { %>
deploy:
skip_cleanup: true
provider: s3
access_key_id: $AWS_KEY
secret_access_key: $AWS_SECRET
bucket: $S3_BUCKET
acl: public_read
local_dir: dist
upload-dir: $S3_DIR
on:
branch: master
condition: $AWS_KEY
<% } %>
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-kyper-library",
"version": "0.1.1",
"version": "0.1.2",
"description": "Starting place for ESNext library. Uses webpack run through npm scripts to build.",
"main": "generators/index.js",
"files": [
Expand Down Expand Up @@ -34,8 +34,8 @@
"dependencies": {
"chalk": "^1.1.3",
"lodash": "^4.17.4",
"yeoman-generator": "^1.0.1",
"yosay": "^1.2.1"
"yeoman-generator": "^1.1.1",
"yosay": "^2.0.0"
},
"devDependencies": {
"babel-cli": "^6.22.2",
Expand All @@ -60,7 +60,7 @@
"istanbul": "^1.1.0-alpha.1",
"mocha": "^3.1.2",
"rimraf": "^2.5.4",
"yeoman-assert": "^2.2.1",
"yeoman-assert": "^3.0.0",
"yeoman-test": "^1.4.0"
}
}

0 comments on commit 6b9546d

Please sign in to comment.