From d352a6c7d8a1c81b207d0362106cb5606e21da36 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 31 Jul 2015 23:05:04 -0700 Subject: metamask provider skeleton --- Gruntfile.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 5f9b271ee..d0c3b8f26 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -15,6 +15,8 @@ module.exports = function (grunt) { // Time how long tasks take. Can help when optimizing build times require('time-grunt')(grunt); + grunt.loadNpmTasks('grunt-browserify'); + // Configurable paths var config = { app: 'app', @@ -36,7 +38,8 @@ module.exports = function (grunt) { files: ['<%= config.app %>/scripts/{,*/}*.js'], options: { livereload: '<%= connect.options.livereload %>' - } + }, + tasks: ['useminPrepare', 'usemin', 'browserify'], }, gruntfile: { files: ['Gruntfile.js'] @@ -61,7 +64,7 @@ module.exports = function (grunt) { } }, - // Grunt server and debug server setting + // Grunt server and dev server setting connect: { options: { port: 9000, @@ -225,6 +228,14 @@ module.exports = function (grunt) { // dist: {} // }, + browserify: { + basic: { + files: { + '<%= config.dist %>/scripts/web3.js': ['<%= config.app %>/scripts/web3.js'], + }, + }, + }, + // Copies remaining files to places other tasks can use copy: { dist: { @@ -248,16 +259,19 @@ module.exports = function (grunt) { // Run some tasks in parallel to speed up build process concurrent: { chrome: [ + 'browserify', ], dist: [ 'imagemin', - 'svgmin' + 'svgmin', + 'browserify', ], test: [ + 'browserify', ] }, - // Auto buildnumber, exclude debug files. smart builds that event pages + // Auto buildnumber, exclude dev files. smart builds that event pages chromeManifest: { dist: { options: { @@ -294,11 +308,12 @@ module.exports = function (grunt) { } }); - grunt.registerTask('debug', function () { + grunt.registerTask('dev', function () { grunt.task.run([ 'concurrent:chrome', 'connect:chrome', - 'watch' + 'build', + 'watch', ]); }); -- cgit v1.2.3