Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Commit

Permalink
Added the dist directory to gitignore. Added the grunt-release-it plu…
Browse files Browse the repository at this point in the history
…gin for creating github releases, and a task that creates the release asset(s) for upload to github.
  • Loading branch information
thogra committed Oct 15, 2015
1 parent d553967 commit 101bbf2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
coverage/
dist/
.project
28 changes: 28 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,25 @@ module.exports = function(grunt) {
amdUri: webpackCfg('amd', 'spid-uri', 'SPiD_Uri'),
commonJsSdk: webpackCfg('commonjs2', 'spid-sdk', 'SPiD'),
commonJsUri: webpackCfg('commonjs2', 'spid-uri', 'SPiD_Uri')
},
compress: {
main: {
options: {
archive: 'dist/spid-sdk-<%= pkg.version %>.zip'
},
files: [{
cwd: 'dist/',
src: ['*.js'],
expand: true
}
]
}
},
"release-it": {
options: {
pkgFiles: ['package.json', 'bower.json'],
increment: '<%= pkg.version %>'
}
}
});

Expand All @@ -101,7 +120,16 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-template');
grunt.loadNpmTasks('grunt-release-it');
grunt.loadNpmTasks('grunt-contrib-compress');
// Default task.
grunt.registerTask('default', ['jshint:sdk', 'webpack', 'template', 'uglify']);
grunt.registerTask('test', ['karma:unit']);
// Release related
grunt.registerTask('post-release', function() {
grunt.log.subhead("Release created");
grunt.log.ok("NOTE: You'll have to upload the archive zip to the GitHub release yourself!");
});
grunt.registerTask('release', ['uglify','compress','release-it', 'post-release']);

};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
"grunt": "~0.4.2",
"grunt-contrib-jshint": "~0.8.0",
"grunt-contrib-uglify": "~0.3.2",
"grunt-contrib-compress": "~0.13.0",
"grunt-release-it": "~1.0.0",
"grunt-template": "~0.2.3",
"grunt-webpack": "~1.0.3",
"karma": "^0.13.9",
Expand Down

0 comments on commit 101bbf2

Please sign in to comment.