Skip to content

Commit d18fcf0

Browse files
committed
update grunt file
1 parent 0187217 commit d18fcf0

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

gruntfile.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = function (grunt) {
7676
prune: true,
7777
overwrite: true,
7878
out: path.join(__dirname, 'dist'),
79-
ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|.env/
79+
ignore: /submodules\/ace\/(?!src-min)|submodules\/ace\/(?=src-min-noconflict)|node_modules\/devicon\/icons|dist|^\/browser|^\/secret|\.babelrc|\.gitignore|^\/\.gitmodules|^\/gruntfile|^\/readme.md|^\/webpack/
8080
}
8181
switch (platform) {
8282
case 'win':
@@ -207,5 +207,19 @@ module.exports = function (grunt) {
207207
}
208208
})
209209

210+
grunt.registerTask('pre-build', function (platform) {
211+
if (!platform) {
212+
platform = process.platform === 'darwin' ? 'osx' : process.platform === 'win32' ? 'win' : null
213+
}
214+
switch (platform) {
215+
case 'win':
216+
grunt.task.run(['compile', 'pack:win'])
217+
break
218+
case 'osx':
219+
grunt.task.run(['compile', 'pack:osx'])
220+
break
221+
}
222+
})
223+
210224
grunt.registerTask('default', ['build'])
211225
}

0 commit comments

Comments
 (0)