You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
1.4 KiB
68 lines
1.4 KiB
'use strict';
|
|
|
|
module.exports = function(grunt) {
|
|
|
|
//Load NPM tasks
|
|
grunt.loadNpmTasks('grunt-browserify');
|
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
|
grunt.loadNpmTasks('grunt-mocha-test');
|
|
grunt.loadNpmTasks('grunt-markdown');
|
|
|
|
// Project Configuration
|
|
grunt.initConfig({
|
|
browserify: {
|
|
client: {
|
|
src: ['bitcore.js'],
|
|
dest: 'browser/bundle.js',
|
|
options: {
|
|
debug: true,
|
|
alias: [
|
|
'browserify-bignum/bignumber.js:bignum',
|
|
'browserify-buffertools/buffertools.js:buffertools'
|
|
],
|
|
standalone: 'bitcore',
|
|
}
|
|
},
|
|
test_data: {
|
|
src: ['test/testdata.js'],
|
|
dest: 'browser/testdata.js',
|
|
options: {
|
|
transform: ['brfs'],
|
|
debug: true,
|
|
standalone: 'testdata',
|
|
}
|
|
}
|
|
},
|
|
watch: {
|
|
readme: {
|
|
files: ['README.md'],
|
|
tasks: ['markdown']
|
|
},
|
|
scripts: {
|
|
files: ['**/*.js', '**/*.html', '!**/node_modules/**', '!browser/bundle.js', '!browser/testdata.js'],
|
|
tasks: ['browserify' /*, 'mochaTest'*/ ],
|
|
},
|
|
},
|
|
mochaTest: {
|
|
options: {
|
|
reporter: 'spec',
|
|
},
|
|
src: ['test/*.js'],
|
|
},
|
|
markdown: {
|
|
all: {
|
|
files: [{
|
|
expand: true,
|
|
src: 'README.md',
|
|
dest: '.',
|
|
ext: '.html'
|
|
}]
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
|
|
grunt.registerTask('default', ['watch']);
|
|
|
|
};
|
|
|