Skip to content

Commit 6b9546d

Browse files
authored
Version v0.1.2 (#3) (#4)
* npm deploy added to `.travis.yml` * S3 Upload util removed * Dependencies updated
1 parent 443141d commit 6b9546d

File tree

11 files changed

+83
-72
lines changed

11 files changed

+83
-72
lines changed

.travis.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
11
language: node_js
22

33
node_js:
4-
- v6
5-
- v5
6-
- v4
4+
- 6
75

86
sudo: false
97

10-
script: "npm run test"
8+
cache:
9+
directories:
10+
- node_modules
11+
12+
# Only build pushes to master and release branches (prevent duplicate builds)
13+
branches:
14+
only:
15+
- master
16+
- release
17+
18+
script:
19+
- npm run test
20+
21+
addons:
22+
code_climate:
23+
repo_token: $CODE_CLIMATE
24+
25+
after_success:
26+
- npm install -g codeclimate-test-reporter
27+
- codeclimate-test-reporter < coverage/lcov.info
28+
- npm run codecov
29+
30+
# Publish To NPM if push to release branch
31+
deploy:
32+
skip_cleanup: true
33+
provider: npm
34+
email: $NPM_EMAIL
35+
api_key: $NPM_TOKEN
36+
on:
37+
branch: release

generators/app/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ module.exports = class extends Generator {
3838
name: 'codeClimate',
3939
message: 'Would to include config for CodeClimate?',
4040
default: true
41+
},
42+
{
43+
type: 'confirm',
44+
name: 'includeDocs',
45+
message: 'Include Docs Generation through Gitbook?',
46+
default: true
4147
}
4248
]
4349

@@ -53,14 +59,12 @@ module.exports = class extends Generator {
5359
{ src: '_package.json', dest: 'package.json' },
5460
{ src: '_README.md', dest: 'README.md' },
5561
{ src: 'babelrc', dest: '.babelrc' },
56-
{ src: '_config.json', dest: 'config.json' },
5762
{ src: 'gitignore', dest: '.gitignore' },
5863
{ src: 'npmignore', dest: '.npmignore' },
5964
{ src: 'webpack.config.js' },
6065
{ src: 'src/_index.js', dest: 'src/index.js' },
61-
{ src: 'bin/**', dest: 'bin' },
62-
{ src: 'test/setup.js', dest: 'test/setup.js' },
63-
{ src: 'test/unit/**', dest: 'test/unit' }
66+
{ src: 'tests/setup.js', dest: 'tests/setup.js' },
67+
{ src: 'tests/unit/**', dest: 'tests/unit' }
6468
]
6569

6670
if (this.answers.includeTravis) {

generators/app/templates/_config.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

generators/app/templates/_package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"clean": "rimraf lib coverage",
1616
"lint": "eslint src test",
1717
"lint:fix": "npm run lint -- --fix",
18-
"test": "mocha -R spec --compilers js:babel-core/register ./test/setup.js ./test/**/*.spec.js",
19-
"test:cov": "babel-node $(npm bin)/isparta cover --report lcov ./node_modules/mocha/bin/_mocha -- ./test --recursive",
18+
"test": "mocha -R spec --compilers js:babel-core/register ./tests/setup.js ./test/**/*.spec.js",
19+
"test:cov": "istanbul cover ./node_modules/mocha/bin/_mocha -- ./tests/** --recursive --report lcov --compilers js:babel-register --require babel-polyfill",
2020
"build:lib": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
2121
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
2222
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/<%= appName %>.js",
@@ -26,7 +26,7 @@
2626
"watch:lib": "npm run build:lib -- --stats --progress --colors --watch",
2727
"watch": "npm run watch:umd",
2828
"prepublish": "npm run clean && npm run test && npm run build",
29-
"upload": "node ./bin/upload"<% if (answers.includeDocs) { %>,
29+
"prepush": "npm run lint:fix"<% if (answers.includeDocs) { %>,
3030
"docs:clean": "rimraf _book",
3131
"docs:prepare": "gitbook install",
3232
"docs:build": "npm run docs:prepare && gitbook build -g <%= githubUser %>/<%= appName %>",
@@ -38,12 +38,7 @@
3838
"url": "https://github.com/<%= githubUser %>/<%= appName %>.git"
3939
},
4040
"keywords": [
41-
"kyper",
42-
"matter",
43-
"tessellate",
44-
"authentication",
45-
"user",
46-
"project management"
41+
"webpack"
4742
],
4843
"author": "<%= githubUser %>",
4944
"contributors": [
@@ -87,10 +82,11 @@
8782
"eslint-plugin-babel": "^4.0.0",
8883
"eslint-plugin-promise": "^3.0.0",
8984
"eslint-plugin-standard": "^2.0.1",
85+
"husky": "^0.13.2",
9086
"istanbul": "^1.1.0-alpha.1",
9187
"json-loader": "^0.5.4",
9288
"mocha": "^3.2.0",
9389
"rimraf": "^2.5.4",
94-
"webpack": "^1.13.2"
90+
"webpack": "^1.14.0"
9591
}
9692
}

generators/app/templates/babelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
{
32
"presets": ["es2015"],
43
"plugins": [

generators/app/templates/bin/upload.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

generators/app/templates/gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
# Dependency directory
12
node_modules
2-
**/.DS_Store
3-
coverage
4-
docs
3+
examples/**/node_modules
54
dist
5+
coverage
6+
_book
7+
es
68
lib
9+
# Logs
710
*.log
11+
12+
.DS_Store

generators/app/templates/travis.yml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
11
language: node_js
2+
23
node_js:
3-
- "4"
4-
- "5"
4+
- "6"
5+
56
branches:
67
only:
78
- master
9+
- release
10+
811
sudo: false
9-
script: "npm run test:cov"
12+
13+
cache:
14+
directories:
15+
- node_modules
16+
17+
# before_install:
18+
# - npm install # Install peer deps
19+
20+
script:
21+
- npm run test:cov
22+
- npm run build
23+
24+
# Publish To NPM if push to release branch
25+
deploy:
26+
skip_cleanup: true
27+
provider: npm
28+
email: $NPM_EMAIL
29+
api_key: $NPM_TOKEN
30+
on:
31+
branch: release
1032
<% if (answers.codeClimate) { %>
1133
addons:
1234
code_climate:
1335
repo_token: $CODE_CLIMATE
36+
1437
after_success:
1538
- npm install -g codeclimate-test-reporter
1639
- codeclimate-test-reporter < coverage/lcov.info
1740
<% } %>
18-
<% if (answers.deployTo === 's3') { %>
19-
deploy:
20-
skip_cleanup: true
21-
provider: s3
22-
access_key_id: $AWS_KEY
23-
secret_access_key: $AWS_SECRET
24-
bucket: $S3_BUCKET
25-
acl: public_read
26-
local_dir: dist
27-
upload-dir: $S3_DIR
28-
on:
29-
branch: master
30-
condition: $AWS_KEY
31-
<% } %>

0 commit comments

Comments
 (0)