Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
4616b950
Commit
4616b950
authored
May 19, 2016
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore build_all
parent
d0736383
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
34 deletions
+34
-34
build/Gruntfile.js
build/Gruntfile.js
+34
-34
No files found.
build/Gruntfile.js
View file @
4616b950
module
.
exports
=
function
(
grunt
)
{
module
.
exports
=
function
(
grunt
)
{
require
(
'
google-closure-compiler
'
).
grunt
(
grunt
,
[
'
-Xms2048m
'
]);
require
(
'
google-closure-compiler
'
).
grunt
(
grunt
,
[
'
-Xms2048m
'
]);
var
defaultConfig
,
packageFile
;
var
defaultConfig
,
packageFile
;
var
path
=
grunt
.
option
(
'
src
'
)
||
'
./configs
'
;
var
path
=
grunt
.
option
(
'
src
'
)
||
'
./configs
'
;
var
level
=
grunt
.
option
(
'
level
'
)
||
'
ADVANCED
'
;
var
level
=
grunt
.
option
(
'
level
'
)
||
'
ADVANCED
'
;
var
formatting
=
grunt
.
option
(
'
formatting
'
)
||
''
;
var
formatting
=
grunt
.
option
(
'
formatting
'
)
||
''
;
grunt
.
loadNpmTasks
(
'
grunt-contrib-clean
'
);
grunt
.
loadNpmTasks
(
'
grunt-contrib-clean
'
);
grunt
.
loadNpmTasks
(
'
grunt-contrib-concat
'
);
grunt
.
loadNpmTasks
(
'
grunt-contrib-concat
'
);
grunt
.
loadNpmTasks
(
'
grunt-replace
'
);
grunt
.
loadNpmTasks
(
'
grunt-replace
'
);
...
@@ -19,7 +19,7 @@ module.exports = function(grunt) {
...
@@ -19,7 +19,7 @@ module.exports = function(grunt) {
else
else
grunt
.
log
.
error
().
writeln
(
'
Could not load config file
'
.
red
);
grunt
.
log
.
error
().
writeln
(
'
Could not load config file
'
.
red
);
});
});
grunt
.
registerTask
(
'
build_webexcel_init
'
,
'
Initialize build WebExcel SDK.
'
,
function
(){
grunt
.
registerTask
(
'
build_webexcel_init
'
,
'
Initialize build WebExcel SDK.
'
,
function
(){
defaultConfig
=
path
+
'
/webexcel.json
'
;
defaultConfig
=
path
+
'
/webexcel.json
'
;
packageFile
=
require
(
defaultConfig
);
packageFile
=
require
(
defaultConfig
);
...
@@ -52,11 +52,11 @@ module.exports = function(grunt) {
...
@@ -52,11 +52,11 @@ module.exports = function(grunt) {
});
});
grunt
.
registerTask
(
'
build_webword
'
,
[
'
build_webword_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_webword
'
,
[
'
build_webword_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_webexcel
'
,
[
'
build_webexcel_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_webexcel
'
,
[
'
build_webexcel_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_webpowerpoint
'
,
[
'
build_webpowerpoint_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_webpowerpoint
'
,
[
'
build_webpowerpoint_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_all
'
,
[
'
build_webword_init
'
,
'
build_sdk
'
,
'
build_webexcel_init
'
,
'
build_sdk
'
,
'
build_webpowerpoint_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
build_all
'
,
[
'
build_webword_init
'
,
'
build_sdk
'
,
'
build_webexcel_init
'
,
'
build_sdk
'
,
'
build_webpowerpoint_init
'
,
'
build_sdk
'
]);
grunt
.
registerTask
(
'
concat_sdk_init
'
,
function
()
{
grunt
.
registerTask
(
'
concat_sdk_init
'
,
function
()
{
var
sdkTmp
=
'
sdk-tmp.js
'
,
sdkAllTmp
=
'
sdk-all-tmp.js
'
,
sdkAllMinTmp
=
'
sdk-all-min-tmp.js
'
;
var
sdkTmp
=
'
sdk-tmp.js
'
,
sdkAllTmp
=
'
sdk-all-tmp.js
'
,
sdkAllMinTmp
=
'
sdk-all-min-tmp.js
'
;
var
srcFilesMin
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
min
'
];
var
srcFilesMin
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
min
'
];
...
@@ -67,31 +67,31 @@ module.exports = function(grunt) {
...
@@ -67,31 +67,31 @@ module.exports = function(grunt) {
sdkOpt
=
{
sdkOpt
=
{
banner
:
'
(function(window, undefined) {
'
,
banner
:
'
(function(window, undefined) {
'
,
footer
:
'
})(window);
'
footer
:
'
})(window);
'
};
};
}
}
if
(
grunt
.
option
(
'
mobile
'
))
{
if
(
grunt
.
option
(
'
mobile
'
))
{
srcFilesMin
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile_banners
'
][
'
min
'
].
concat
(
srcFilesMin
);
srcFilesMin
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile_banners
'
][
'
min
'
].
concat
(
srcFilesMin
);
srcFilesAll
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile_banners
'
][
'
common
'
].
concat
(
srcFilesAll
);
srcFilesAll
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile_banners
'
][
'
common
'
].
concat
(
srcFilesAll
);
var
excludeFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
exclude_mobile
'
];
var
excludeFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
exclude_mobile
'
];
srcFilesAll
=
srcFilesAll
.
filter
(
function
(
item
)
{
srcFilesAll
=
srcFilesAll
.
filter
(
function
(
item
)
{
return
-
1
===
excludeFiles
.
indexOf
(
item
);
return
-
1
===
excludeFiles
.
indexOf
(
item
);
});
});
var
mobileFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile
'
];
var
mobileFiles
=
packageFile
[
'
compile
'
][
'
sdk
'
][
'
mobile
'
];
if
(
mobileFiles
){
if
(
mobileFiles
){
srcFilesAll
=
srcFilesAll
.
concat
(
mobileFiles
);
srcFilesAll
=
srcFilesAll
.
concat
(
mobileFiles
);
}
}
}
}
if
(
!
grunt
.
option
(
'
noprivate
'
))
{
if
(
!
grunt
.
option
(
'
noprivate
'
))
{
srcFilesAll
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
private
'
]);
srcFilesAll
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
private
'
]);
}
}
if
(
grunt
.
option
(
'
desktop
'
))
{
if
(
grunt
.
option
(
'
desktop
'
))
{
srcFilesMin
=
srcFilesMin
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
][
'
min
'
]);
srcFilesMin
=
srcFilesMin
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
][
'
min
'
]);
srcFilesAll
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
][
'
common
'
]);
srcFilesAll
=
srcFilesAll
.
concat
(
packageFile
[
'
compile
'
][
'
sdk
'
][
'
desktop
'
][
'
common
'
]);
}
}
grunt
.
initConfig
({
grunt
.
initConfig
({
concat
:
{
concat
:
{
sdkmin
:
{
sdkmin
:
{
...
@@ -143,13 +143,13 @@ module.exports = function(grunt) {
...
@@ -143,13 +143,13 @@ module.exports = function(grunt) {
}
}
grunt
.
initConfig
({
grunt
.
initConfig
({
'
closure-compiler
'
:
{
'
closure-compiler
'
:
{
sdk
:
{
sdk
:
{
options
:
sdkOpt
,
options
:
sdkOpt
,
dest
:
tmp_sdk_path
,
dest
:
tmp_sdk_path
,
src
:
[
sdkTmp
]
src
:
[
sdkTmp
]
}
}
},
},
splitfile
:
{
splitfile
:
{
sdk
:
{
sdk
:
{
options
:
{
options
:
{
...
@@ -160,19 +160,19 @@ module.exports = function(grunt) {
...
@@ -160,19 +160,19 @@ module.exports = function(grunt) {
src
:
tmp_sdk_path
src
:
tmp_sdk_path
}
}
},
},
concat
:
{
concat
:
{
sdkmin
:
{
sdkmin
:
{
src
:
[
'
license.js
'
,
sdkAllMinDst
],
src
:
[
'
license.js
'
,
sdkAllMinDst
],
dest
:
sdkAllMinDst
dest
:
sdkAllMinDst
},
},
sdk
:
{
sdk
:
{
src
:
[
'
license.js
'
,
sdkAllDst
],
src
:
[
'
license.js
'
,
sdkAllDst
],
dest
:
sdkAllDst
dest
:
sdkAllDst
}
}
},
},
clean
:
[
clean
:
[
sdkTmp
,
sdkTmp
,
tmp_sdk_path
tmp_sdk_path
],
],
replace
:
{
replace
:
{
version
:
{
version
:
{
...
@@ -185,12 +185,12 @@ module.exports = function(grunt) {
...
@@ -185,12 +185,12 @@ module.exports = function(grunt) {
files
:
[
files
:
[
{
src
:
[
sdkAllMinDst
,
sdkAllDst
],
dest
:
sdkDstFolder
+
'
/
'
}
{
src
:
[
sdkAllMinDst
,
sdkAllDst
],
dest
:
sdkDstFolder
+
'
/
'
}
]
]
}
}
}
}
});
});
});
});
grunt
.
registerTask
(
'
concat_sdk
'
,
[
'
concat_sdk_init
'
,
'
concat
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
concat_sdk
'
,
[
'
concat_sdk_init
'
,
'
concat
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
compile_sdk
'
,
[
'
concat_sdk
'
,
'
compile_sdk_init:
'
+
level
,
'
closure-compiler
'
,
'
splitfile
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
compile_sdk
'
,
[
'
concat_sdk
'
,
'
compile_sdk_init:
'
+
level
,
'
closure-compiler
'
,
'
splitfile
'
,
'
concat
'
,
'
replace
'
,
'
clean
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
build_
webpowerpoint
'
]);
grunt
.
registerTask
(
'
default
'
,
[
'
build_
all
'
]);
};
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment