Skip to content

Commit

Permalink
chore(grunt): improve publishing
Browse files Browse the repository at this point in the history
* Add relevant npm keywords and filter out the files that people
actually care about when downloading from npm.

* Stopped using `v` in front of version number.

* Removed dead config for grunt-cdnify.

* Publish to npm with `grunt-npm` and create a Github release with
`grunt-conventional-github-releaser`.

Closes #42
  • Loading branch information
seriema committed Oct 3, 2015
1 parent 7df9420 commit 73bf646
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
24 changes: 15 additions & 9 deletions Gruntfile.js
Expand Up @@ -27,15 +27,16 @@ module.exports = function (grunt) {
test: 'test'
},

// Test run with `grunt bump --dry-run`
bump: {
options: {
files: [ 'package.json', 'bower.json' ],
updateConfigs: [ 'yeoman' ],
commit: true,
commitMessage: 'chore(release): release v%VERSION%. See CHANGELOG.md',
commitMessage: 'chore(release): release %VERSION%. See CHANGELOG.md',
commitFiles: [ '-a' ], // '-a' for all files
createTag: true,
tagName: 'v%VERSION%',
tagName: '%VERSION%',
tagMessage: 'Version %VERSION%',
push: true,
pushTo: 'origin',
Expand All @@ -54,6 +55,16 @@ module.exports = function (grunt) {
}
},

conventionalGithubReleaser: {
release: {
options: {
changelogOpts: {
preset: 'angular'
}
}
}
},

// Watches files for changes and runs tasks based on the changed files
watch: {
js: {
Expand Down Expand Up @@ -163,13 +174,6 @@ module.exports = function (grunt) {
}
},

// Replace Google CDN references
cdnify: {
dist: {
html: [ '<%= yeoman.dist %>/*.html' ]
}
},

uglify: {
options: {
preserveComments: 'some',
Expand Down Expand Up @@ -322,6 +326,8 @@ module.exports = function (grunt) {
'nugetpack',
'conventionalChangelog',
'bump-commit',
'conventionalGithubReleaser',
'npm-publish',
'nugetpush'
]);

Expand Down
20 changes: 18 additions & 2 deletions package.json
Expand Up @@ -8,23 +8,39 @@
"type": "git",
"url": "git://github.com/seriema/angular-apimock.git"
},
"keywords": [
"angular",
"angularjs",
"mock",
"mocking",
"apimock"
],
"files": [
"dist/",
"CHANGELOG.md",
"LICENSE",
"README.md",
"package.json"
],
"license": "MIT",
"dependencies": {},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-bump": "^0.5.0",
"grunt-bump": "^0.6.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.0",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-jshint": "^0.11.1",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.0",
"grunt-conventional-changelog": "^4.1.0",
"grunt-conventional-changelog": "^5.0.0",
"grunt-conventional-github-releaser": "^0.5.0",
"grunt-coveralls": "^1.0.0",
"grunt-jscs": "^2.1.0",
"grunt-karma": "^0.12.0",
"grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^1.0.1",
"grunt-npm": "0.0.2",
"grunt-nuget": "^0.1.3",
"jasmine": "^2.3.2",
"jasmine-core": "^2.3.4",
Expand Down

0 comments on commit 73bf646

Please sign in to comment.