forked from lucasmotta/dploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
38 lines (30 loc) · 993 Bytes
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS207: Consider shorter variations of null checks
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
module.exports = function(grunt) {
// Load tasks
Object.keys(require("./package.json").devDependencies).forEach(function(dep) { if (dep.substring(0,6) === "grunt-") { return grunt.loadNpmTasks(dep); } });
// Project configuration
grunt.initConfig({
// Bump files
bump: {
options: {
pushTo: "origin master"
}
},
// Publish to NPM
shell: {
publish: {
command: "npm publish"
}
},
});
grunt.registerTask("default", ["coffeelint", "coffee"]);
return grunt.registerTask("release", "Release a new version, push it and publish", function(target) {
if (target == null) { target = "patch"; }
return grunt.task.run("coffeelint", `bump-only:${target}`, "coffee", "bump-commit", "shell:publish");
});
};