mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-02-10 18:05:32 +08:00
[main] added Babel transpiler for IE
This commit is contained in:
@ -47,7 +47,7 @@ define([
|
||||
!app.postLaunchScripts && (app.postLaunchScripts = []);
|
||||
// console.log('on_app_ready', app.postLaunchScripts);
|
||||
|
||||
require(app.postLaunchScripts, function () {
|
||||
require(app.postLaunchScripts, () => {
|
||||
if (!!Common.UI.ScreenReaderFocusManager) {
|
||||
Common.UI.ScreenReaderFocusManager.init(me.api);
|
||||
}
|
||||
|
||||
@ -414,7 +414,10 @@
|
||||
<inline src="resources/img/form-points.svg" />
|
||||
<div class="inlined-svg"></div>
|
||||
<script src="../../../../../../sdkjs/common/device_scale.js?__inline=true"></script>
|
||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||
<script src="../../../vendor/requirejs/require.js"></script>
|
||||
<script>
|
||||
isIE === true ? require(['ie/app']) : require(['app']);
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -149,6 +149,7 @@ module.exports = function(grunt) {
|
||||
grunt.loadNpmTasks('grunt-svgmin');
|
||||
grunt.loadNpmTasks('grunt-exec');
|
||||
grunt.loadNpmTasks('grunt-terser');
|
||||
grunt.loadNpmTasks('grunt-babel');
|
||||
|
||||
function doRegisterTask(name, callbackConfig) {
|
||||
return grunt.registerTask(name + '-init', function() {
|
||||
@ -452,9 +453,9 @@ module.exports = function(grunt) {
|
||||
localization: {
|
||||
files: packageFile['main']['copy']['localization']
|
||||
},
|
||||
help: {
|
||||
files: packageFile['main']['copy']['help']
|
||||
},
|
||||
// help: {
|
||||
// files: packageFile['main']['copy']['help']
|
||||
// },
|
||||
indexhtml: {
|
||||
files: packageFile['main']['copy']['indexhtml']
|
||||
}
|
||||
@ -508,6 +509,27 @@ module.exports = function(grunt) {
|
||||
src: packageFile.main.js.postload.options.out,
|
||||
dest: packageFile.main.js.postload.options.out,
|
||||
},
|
||||
iecompat: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: packageFile.main.js.babel.files[0].dest,
|
||||
src: `*.js`,
|
||||
dest: packageFile.main.js.babel.files[0].dest
|
||||
}]
|
||||
},
|
||||
},
|
||||
|
||||
babel: {
|
||||
options: {
|
||||
sourceMap: false,
|
||||
presets: ['@babel/preset-env']
|
||||
},
|
||||
dist: {
|
||||
files: packageFile.main.js.babel.files
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@ -797,7 +819,7 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('deploy-common-embed', ['common-embed-init', 'clean', 'copy']);
|
||||
|
||||
grunt.registerTask('deploy-app-main', ['prebuild-icons-sprite', 'main-app-init', 'clean:prebuild', 'imagemin', 'less',
|
||||
'requirejs', 'terser', 'concat', 'copy', 'svgmin', 'inline', 'json-minify',
|
||||
'requirejs', 'babel', 'terser', 'concat', 'copy', 'svgmin', 'inline', 'json-minify',
|
||||
'replace:writeVersion', 'replace:prepareHelp', 'clean:postbuild']);
|
||||
|
||||
grunt.registerTask('deploy-app-mobile', ['mobile-app-init', 'clean:deploy', /*'cssmin',*/ /*'copy:template-backup',*/
|
||||
|
||||
@ -106,6 +106,16 @@
|
||||
"text": "../vendor/requirejs-text/text"
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel": {
|
||||
"files": [
|
||||
{
|
||||
"expand": true,
|
||||
"cwd": "../deploy/web-apps/apps/documenteditor/main/",
|
||||
"src": "*.js",
|
||||
"dest": "../deploy/web-apps/apps/documenteditor/main/ie"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"less": {
|
||||
|
||||
2035
build/package-lock.json
generated
2035
build/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,10 @@
|
||||
"homepage": "http://www.onlyoffice.com",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.25.2",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"grunt": "^1.6.1",
|
||||
"grunt-babel": "^8.0.0",
|
||||
"grunt-contrib-clean": "^2.0.1",
|
||||
"grunt-contrib-concat": "^2.0.0",
|
||||
"grunt-contrib-copy": "^1.0.0",
|
||||
|
||||
Reference in New Issue
Block a user