Skip to content

Commit

Permalink
Merge d01c7bc into 8628295
Browse files Browse the repository at this point in the history
  • Loading branch information
lorem--ipsum committed Jul 26, 2017
2 parents 8628295 + d01c7bc commit 5d9b1fc
Show file tree
Hide file tree
Showing 5 changed files with 465 additions and 483 deletions.
18 changes: 17 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

browserify: {
unittests: {
files: {
Expand Down Expand Up @@ -164,6 +166,19 @@ module.exports = function(grunt) {
'dist/elliptic.min.js' : [ 'dist/elliptic.js' ]
}
}
},
'string-replace': {
version: {
files: {
'dist/elliptic.js': 'dist/elliptic.js'
},
options: {
replacements: [{
pattern: /{{ VERSION }}/g,
replacement: '<%= pkg.version %>'
}]
}
}
}
});

Expand All @@ -172,6 +187,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-mocha-istanbul');
grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-saucelabs');

grunt.event.on('coverage', function(lcov, done){
Expand All @@ -183,7 +199,7 @@ module.exports = function(grunt) {
});
});

grunt.registerTask('dist', ['browserify', 'uglify']);
grunt.registerTask('dist', ['browserify', 'string-replace', 'uglify']);
grunt.registerTask('coverage', ['browserify', 'copy:test', 'mocha_istanbul:coverage']);
grunt.registerTask('coveralls', ['browserify', 'copy:test', 'mocha_istanbul:coveralls']);
grunt.registerTask('saucelabs', ['browserify', 'copy:test', 'connect', 'saucelabs-mocha']);
Expand Down

0 comments on commit 5d9b1fc

Please sign in to comment.