Skip to content

Commit bcb1919

Browse files
committed
Replace grunt with npm scripts.
1 parent 37ef043 commit bcb1919

File tree

3 files changed

+26
-46
lines changed

3 files changed

+26
-46
lines changed

Gruntfile.js

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

bower-version-update.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env node
2+
3+
'use strict';
4+
5+
var path = require('path');
6+
var packageJSON = require(path.join(__dirname, 'package.json'));
7+
var bowerFile = path.join(__dirname, 'bower.json');
8+
var bowerJSON = require('bower-json').parse(
9+
require(bowerFile),
10+
{normalize: true}
11+
);
12+
bowerJSON.version = packageJSON.version;
13+
require('fs').writeFileSync(
14+
bowerFile,
15+
JSON.stringify(bowerJSON, null, 2) + '\n'
16+
);

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,15 @@
4343
"license": "MIT",
4444
"main": "js/jquery.fileupload.js",
4545
"devDependencies": {
46-
"bower-json": "0.6.0",
47-
"grunt": "0.4.5",
48-
"grunt-bump-build-git": "1.1.2",
49-
"grunt-contrib-jshint": "0.11.2"
46+
"bower-json": "0.8.1",
47+
"jshint": "2.9.3"
48+
},
49+
"scripts": {
50+
"bower-version-update": "./bower-version-update.js",
51+
"lint": "jshint *.js js/*.js js/cors/*.js",
52+
"test": "npm run lint",
53+
"preversion": "npm test",
54+
"version": "npm run bower-version-update && git add bower.json",
55+
"postversion": "git push --tags origin master && npm publish"
5056
}
5157
}

0 commit comments

Comments
 (0)