mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 02:36:36 +00:00
update grunt file
This commit is contained in:
16
gruntfile.js
16
gruntfile.js
@@ -76,7 +76,7 @@ module.exports = function (grunt) {
|
|||||||
prune: true,
|
prune: true,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
out: path.join(__dirname, 'dist'),
|
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) {
|
switch (platform) {
|
||||||
case 'win':
|
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'])
|
grunt.registerTask('default', ['build'])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user