Skip to content

Commit

Permalink
use grunt uglify to prepend version in banner
Browse files Browse the repository at this point in the history
  • Loading branch information
nathancahill committed Dec 29, 2016
1 parent b57ea6f commit 07bdadf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,19 @@ module.exports = function(grunt) {
specs: ['test/split.spec.js']
}
}
},
uglify: {
options: {
banner: '/*! Split.js - v<%= pkg.version %> */\n'
},
output: {
files: {
'split.min.js': ['split.js']
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-uglify');
};
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "split.js",
"version": "1.1.4",
"version": "1.2.0",
"description": "A lightweight utility for creating adjustable split views",
"main": "split.js",
"repository": {
Expand All @@ -21,11 +21,12 @@
"grunt": "1.0.1",
"grunt-cli": "1.2.0",
"grunt-contrib-jasmine": "1.0.3",
"jasmine": "2.5.2",
"uglifyjs": "2.4.10"
"grunt-contrib-uglify": "2.0.0",
"grunt-string-replace": "1.3.1",
"jasmine": "2.5.2"
},
"scripts": {
"test": "./node_modules/.bin/grunt jasmine",
"build": "./node_modules/.bin/uglifyjs -m -o split.min.js split.js"
"build": "./node_modules/.bin/grunt uglify"
}
}

0 comments on commit 07bdadf

Please sign in to comment.