@@ -43,6 +43,42 @@ module.exports = function (grunt) {
4343 } ]
4444 }
4545 } ,
46+ uglify : {
47+ options : {
48+ mangle : false ,
49+ compress : false
50+ } ,
51+ dist : {
52+ files : [ {
53+ expand : true ,
54+ cwd : 'src/' ,
55+ src : [
56+ /* static files */
57+ 'nls/{,*/}*.js' ,
58+ 'xorigin.js' ,
59+ 'dependencies.js' ,
60+ 'thirdparty/requirejs/require.js' ,
61+ 'LiveDevelopment/MultiBrowserImpl/transports/**/*.js' ,
62+ 'LiveDevelopment/MultiBrowserImpl/launchers/**/*.js' ,
63+
64+ /* extensions and CodeMirror modes */
65+ '!extensions/default/*/unittests.js' ,
66+ 'extensions/default/*/**/*.js' ,
67+ '!**/unittest-files/**' ,
68+ '!extensions/default/JavaScriptCodeHints/thirdparty/*/test/**/*' ,
69+ '!extensions/default/**/node_modules/**/*' ,
70+ 'thirdparty/CodeMirror2/addon/{,*/}*.js' ,
71+ 'thirdparty/CodeMirror2/keymap/{,*/}*.js' ,
72+ 'thirdparty/CodeMirror2/lib/{,*/}*.js' ,
73+ 'thirdparty/CodeMirror2/mode/{,*/}*.js' ,
74+ 'thirdparty/CodeMirror2/theme/{,*/}*.js' ,
75+ 'thirdparty/i18n/*.js' ,
76+ 'thirdparty/text/*.js'
77+ ] ,
78+ dest : 'dist/'
79+ } ]
80+ }
81+ } ,
4682 copy : {
4783 dist : {
4884 files : [
@@ -64,7 +100,18 @@ module.exports = function (grunt) {
64100 'LiveDevelopment/MultiBrowserImpl/launchers/**'
65101 ]
66102 } ,
67-
103+ /* node domains are not minified and must be copied to dist */
104+ {
105+ expand : true ,
106+ dest : 'dist/' ,
107+ cwd : 'src/' ,
108+ src : [
109+ 'extensibility/node/**' ,
110+ '!extensibility/node/spec/**' ,
111+ 'filesystem/impls/appshell/node/**' ,
112+ '!filesystem/impls/appshell/node/spec/**'
113+ ]
114+ } ,
68115 /* extensions and CodeMirror modes */
69116 {
70117 expand : true ,
@@ -328,6 +375,9 @@ module.exports = function (grunt) {
328375 'build-config'
329376 ] ) ;
330377
378+ // task: build dist/ for browser
379+ grunt . registerTask ( 'build-browser' , [ 'build' , 'uglify' ] ) ;
380+
331381 // Default task.
332382 grunt . registerTask ( 'default' , [ 'test' ] ) ;
333383} ;
0 commit comments