Fix build test app
This commit is contained in:
parent
b689546e94
commit
a9f285b50e
|
@ -656,6 +656,49 @@ module.exports = function(grunt) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
grunt.registerTask('test-app-init', function() {
|
||||||
|
grunt.initConfig({
|
||||||
|
pkg: packageFile,
|
||||||
|
|
||||||
|
clean: {
|
||||||
|
options: {
|
||||||
|
force: true
|
||||||
|
},
|
||||||
|
prebuild: packageFile['test']['clean']['prebuild']
|
||||||
|
},
|
||||||
|
|
||||||
|
terser: {
|
||||||
|
options: {
|
||||||
|
format: {
|
||||||
|
comments: false,
|
||||||
|
preamble: copyright,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
src: packageFile['test']['js']['src'],
|
||||||
|
dest: packageFile['test']['js']['dist']
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
less: {
|
||||||
|
production: {
|
||||||
|
options: {
|
||||||
|
compress: true,
|
||||||
|
ieCompat: false
|
||||||
|
},
|
||||||
|
files: {
|
||||||
|
"<%= pkg.test.less.files.dist %>": packageFile['test']['less']['files']['src']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
copy: {
|
||||||
|
'index-page': {
|
||||||
|
files: packageFile['test']['copy']['index-page']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
grunt.registerTask('increment-build', function() {
|
grunt.registerTask('increment-build', function() {
|
||||||
var pkg = grunt.file.readJSON(defaultConfig);
|
var pkg = grunt.file.readJSON(defaultConfig);
|
||||||
|
@ -696,12 +739,13 @@ module.exports = function(grunt) {
|
||||||
/*'replace:writeVersion', 'replace:fixResourceUrl'*/]);
|
/*'replace:writeVersion', 'replace:fixResourceUrl'*/]);
|
||||||
|
|
||||||
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'terser', 'less', 'copy', 'clean:postbuild']);
|
grunt.registerTask('deploy-app-embed', ['embed-app-init', 'clean:prebuild', 'terser', 'less', 'copy', 'clean:postbuild']);
|
||||||
|
grunt.registerTask('deploy-app-test', ['test-app-init', 'clean:prebuild', 'terser', 'less', 'copy']);
|
||||||
|
|
||||||
doRegisterInitializeAppTask('common', 'Common', 'common.json');
|
doRegisterInitializeAppTask('common', 'Common', 'common.json');
|
||||||
doRegisterInitializeAppTask('documenteditor', 'DocumentEditor', 'documenteditor.json');
|
doRegisterInitializeAppTask('documenteditor', 'DocumentEditor', 'documenteditor.json');
|
||||||
doRegisterInitializeAppTask('spreadsheeteditor', 'SpreadsheetEditor', 'spreadsheeteditor.json');
|
doRegisterInitializeAppTask('spreadsheeteditor', 'SpreadsheetEditor', 'spreadsheeteditor.json');
|
||||||
doRegisterInitializeAppTask('presentationeditor', 'PresentationEditor', 'presentationeditor.json');
|
doRegisterInitializeAppTask('presentationeditor', 'PresentationEditor', 'presentationeditor.json');
|
||||||
|
doRegisterInitializeAppTask('testeditor', 'TestEditor', 'testeditor.json');
|
||||||
|
|
||||||
grunt.registerTask('deploy-app', 'Deploy application.', function(){
|
grunt.registerTask('deploy-app', 'Deploy application.', function(){
|
||||||
if (packageFile) {
|
if (packageFile) {
|
||||||
|
@ -725,6 +769,8 @@ module.exports = function(grunt) {
|
||||||
grunt.registerTask('deploy-spreadsheeteditor', ['deploy-common-component', 'deploy-spreadsheeteditor-component']);
|
grunt.registerTask('deploy-spreadsheeteditor', ['deploy-common-component', 'deploy-spreadsheeteditor-component']);
|
||||||
grunt.registerTask('deploy-presentationeditor', ['deploy-common-component', 'deploy-presentationeditor-component']);
|
grunt.registerTask('deploy-presentationeditor', ['deploy-common-component', 'deploy-presentationeditor-component']);
|
||||||
|
|
||||||
|
grunt.registerTask('deploy-testeditor', ['init-build-testeditor', 'deploy-app']);
|
||||||
|
|
||||||
grunt.registerTask('default', ['deploy-common-component',
|
grunt.registerTask('default', ['deploy-common-component',
|
||||||
'deploy-documenteditor-component',
|
'deploy-documenteditor-component',
|
||||||
'deploy-spreadsheeteditor-component',
|
'deploy-spreadsheeteditor-component',
|
||||||
|
|
|
@ -364,34 +364,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"test": {
|
|
||||||
"clean": {
|
|
||||||
"prebuild": [
|
|
||||||
"../deploy/web-apps/test/documenteditor/main"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"js": {
|
|
||||||
"src": [
|
|
||||||
"../test/common/Gateway.js",
|
|
||||||
"../test/common/main/lib/util/utils.js",
|
|
||||||
"../test/documenteditor/main/js/ApplicationView.js",
|
|
||||||
"../test/documenteditor/main/js/ApplicationController.js",
|
|
||||||
"../test/documenteditor/main/js/application.js"
|
|
||||||
],
|
|
||||||
"dist": "../deploy/web-apps/test/documenteditor/main/app-all.js"
|
|
||||||
},
|
|
||||||
"less": {
|
|
||||||
"files": {
|
|
||||||
"src": "../test/documenteditor/main/resources/less/application.less",
|
|
||||||
"dist": "../deploy/web-apps/test/documenteditor/main/resources/css/app-all.css"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"copy": {
|
|
||||||
"index-page": {
|
|
||||||
"../deploy/web-apps/test/documenteditor/main/index.html": "../test/documenteditor/main/index.html.deploy"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"deploy": [
|
"deploy": [
|
||||||
"increment-build",
|
"increment-build",
|
||||||
|
|
41
build/testeditor.json
Normal file
41
build/testeditor.json
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
"name": "testeditor",
|
||||||
|
"version": "4.3.0",
|
||||||
|
"build": 1152,
|
||||||
|
"homepage": "http://www.onlyoffice.com",
|
||||||
|
"private": true,
|
||||||
|
"test": {
|
||||||
|
"clean": {
|
||||||
|
"prebuild": [
|
||||||
|
"../deploy/web-apps/test/documenteditor/main"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"js": {
|
||||||
|
"src": [
|
||||||
|
"../test/common/Gateway.js",
|
||||||
|
"../test/common/main/lib/util/utils.js",
|
||||||
|
"../test/documenteditor/main/js/ApplicationView.js",
|
||||||
|
"../test/documenteditor/main/js/ApplicationController.js",
|
||||||
|
"../test/documenteditor/main/js/application.js"
|
||||||
|
],
|
||||||
|
"dist": "../deploy/web-apps/test/documenteditor/main/app-all.js"
|
||||||
|
},
|
||||||
|
"less": {
|
||||||
|
"files": {
|
||||||
|
"src": "../test/documenteditor/main/resources/less/application.less",
|
||||||
|
"dist": "../deploy/web-apps/test/documenteditor/main/resources/css/app-all.css"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"copy": {
|
||||||
|
"index-page": {
|
||||||
|
"../deploy/web-apps/test/documenteditor/main/index.html": "../test/documenteditor/main/index.html.deploy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tasks": {
|
||||||
|
"deploy": [
|
||||||
|
"increment-build",
|
||||||
|
"deploy-app-test"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue