Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build using semantic-release and friends #45

Merged
merged 2 commits into from
May 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
# Use `npm pack` to create a tgz file. View the contents of the .tgz to test your .npmignore
docs
ion-tests
tests
.baseDir*
.travis.yml
_config.yml
.nojekyll
.gitmodules
.tscache
.idea
browser
src
*.map
Gruntfile.js
24 changes: 17 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@

language: node_js

node_js:
- "node"

script: grunt all

cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '7'
before_script:
- npm prune
script:
- npm run test
after_success:
- 'if [ "$TRAVIS_BRANCH" == "master" -a "$TRAVIS_PULL_REQUEST" == "false" ]; then npm run semantic-release; fi'
- 'if [ "$TRAVIS_BRANCH" != "master" ]; then exit 0; fi'
branches:
except:
- /^v\d+\.\d+\.\d+$/
14 changes: 14 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ module.exports = function(grunt) {
module: "amd",
declaration: true
}
},
'commonjs-es6': {
src: ['src/**/*.ts'],
outDir: 'dist/commonjs/es6',
options: {
target: "es6",
module: "commonjs",
declaration: true
}
}
},
/**
Expand Down Expand Up @@ -116,12 +125,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('remap-istanbul');
grunt.loadNpmTasks('intern');

grunt.registerTask('build', ['clean', 'ts:amd-es6', 'ts:commonjs-es6','copy:main']);
grunt.registerTask('build', ['clean', 'ts:amd-es6','copy:main']);
grunt.registerTask('toES5', ['build', 'babel']);
grunt.registerTask('test', ['build', 'intern:es6']);
grunt.registerTask('doc', ['test', 'typedoc']);
grunt.registerTask('coverage', ['doc', 'remapIstanbul']);
grunt.registerTask('all', ['coverage']);


// NPM
grunt.registerTask('build:npm', ['ts:commonjs-es6']);

grunt.registerTask('default', ['test']);
};
25 changes: 16 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{
"name": "ion-js",
"version": "0.9.0",
"version": "0.0.0-development",
"description": "A JavaScript implementation of the Ion data interchange format",
"main": "dist/amd/ed6/Ion.js",
"types": "dist/amd/ed6/Ion.d.ts",
"directories": {
"test": "test"
},
"main": "dist/commonjs/es6/Ion.js",
"types": "dist/commonjs/es6/Ion.d.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"commit": "git-cz",
"test": "grunt test",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git+https://github.com/amzn/ion-js.git"
"url": "https://github.com/amzn/ion-js.git"
},
"keywords": [
"ion",
Expand All @@ -25,9 +24,16 @@
"url": "https://github.com/amzn/ion-js/issues"
},
"homepage": "https://github.com/amzn/ion-js#readme",
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-es2015": "^6.24.1",
"commitizen": "^2.9.6",
"cz-conventional-changelog": "^2.0.0",
"grunt": "^1.0.1",
"grunt-babel": "^6.0.0",
"grunt-cli": "^1.2.0",
Expand All @@ -39,6 +45,7 @@
"intern": "^3.4.1",
"remap-istanbul": "^0.9.1",
"typedoc": "^0.5.8",
"typescript": "^2.2.1"
"typescript": "^2.2.1",
"semantic-release": "^6.3.6"
}
}