From d18fcf0a184038d8bd569e353da9087fe1f984a8 Mon Sep 17 00:00:00 2001 From: Rokt33r Date: Tue, 29 Dec 2015 02:54:24 +0900 Subject: [PATCH] update grunt file --- gruntfile.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gruntfile.js b/gruntfile.js index 93efaf72..22a72914 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -76,7 +76,7 @@ module.exports = function (grunt) { prune: true, overwrite: true, out: path.join(__dirname, 'dist'), - ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|.env/ + ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|^\/browser|^\/secret|\.babelrc|\.gitignore|^\/\.gitmodules|^\/gruntfile|^\/readme.md|^\/webpack/ } switch (platform) { case 'win': @@ -207,5 +207,19 @@ module.exports = function (grunt) { } }) + grunt.registerTask('pre-build', function (platform) { + if (!platform) { + platform = process.platform === 'darwin' ? 'osx' : process.platform === 'win32' ? 'win' : null + } + switch (platform) { + case 'win': + grunt.task.run(['compile', 'pack:win']) + break + case 'osx': + grunt.task.run(['compile', 'pack:osx']) + break + } + }) + grunt.registerTask('default', ['build']) }