2016-07-14 20:43:15 +03:00
|
|
|
module.exports = function(grunt) {
|
|
|
|
grunt.initConfig({
|
|
|
|
browserify: {
|
|
|
|
dist: {
|
|
|
|
files: {
|
2017-02-24 22:41:24 +03:00
|
|
|
'dist/ethers.js': './index.js',
|
|
|
|
'dist/ethers-contracts.js': './contracts/index.js',
|
|
|
|
'dist/ethers-hdnode.js': './hdnode/index.js',
|
|
|
|
'dist/ethers-utils.js': './utils/index.js',
|
|
|
|
'dist/ethers-wallet.js': './wallet/index.js',
|
2016-07-14 20:43:15 +03:00
|
|
|
},
|
|
|
|
options: {
|
|
|
|
browserifyOptions: {
|
2017-02-24 22:41:24 +03:00
|
|
|
standalone: 'ethers'
|
2016-07-14 20:43:15 +03:00
|
|
|
}
|
2017-02-24 22:41:24 +03:00
|
|
|
},
|
|
|
|
},
|
2016-07-14 20:43:15 +03:00
|
|
|
},
|
|
|
|
uglify: {
|
|
|
|
dist: {
|
|
|
|
files: {
|
2017-02-24 22:41:24 +03:00
|
|
|
'dist/ethers.min.js' : [ './dist/ethers.js' ],
|
|
|
|
'dist/ethers-contracts.min.js' : [ './dist/ethers-contracts.js' ],
|
|
|
|
'dist/ethers-hdnode.min.js' : [ './dist/ethers-hdnode.js' ],
|
|
|
|
'dist/ethers-utils.min.js' : [ './dist/ethers-utils.js' ],
|
|
|
|
'dist/ethers-wallet.min.js' : [ './dist/ethers-wallet.js' ],
|
2016-07-14 20:43:15 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
grunt.loadNpmTasks('grunt-browserify');
|
|
|
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
|
|
|
|
|
|
|
grunt.registerTask('dist', ['browserify', 'uglify']);
|
|
|
|
};
|