espo bundled

This commit is contained in:
Yuri Kuznetsov
2022-06-26 18:24:18 +03:00
parent c28aec44b6
commit 7ac7fea803
2 changed files with 10 additions and 6 deletions

View File

@@ -40,7 +40,9 @@ module.exports = grunt => {
const bundleConfig = require('./frontend/bundle-config.json');
const libs = require('./frontend/libs.json');
let bundleJsFileList = buildUtils.getBundleLibList(libs).concat('build/tmp/espo-bundle.js');
const bundledDir = 'client/lib/bundled';
let bundleJsFileList = buildUtils.getBundleLibList(libs).concat(bundledDir + '/espo.js');
let copyJsFileList = buildUtils.getCopyLibDataList(libs);
let minifyLibFileList = copyJsFileList
@@ -116,7 +118,6 @@ module.exports = grunt => {
'!build/tmp/client/custom/modules',
'build/tmp/client/custom/modules/*',
'!build/tmp/client/custom/modules/dummy.txt',
'build/tmp/espo-bundle.js',
]
},
},
@@ -253,15 +254,17 @@ module.exports = grunt => {
let contents = (new Bundler()).bundle(bundleConfig.jsFiles);
fs.writeFileSync('build/tmp/espo-bundle.js', contents, 'utf8');
if (!fs.existsSync(bundledDir)){
fs.mkdirSync(bundledDir);
}
fs.writeFileSync(bundledDir + '/espo.js', contents, 'utf8');
});
grunt.registerTask('chmod-folders', () => {
cp.execSync(
"find . -type d -exec chmod 755 {} +",
{
cwd: 'build/EspoCRM-' + pkg.version,
}
{cwd: 'build/EspoCRM-' + pkg.version}
);
});

View File

@@ -260,6 +260,7 @@ class Diff
fileList.push('client/lib/espo.min.js');
fileList.push('client/lib/espo.min.js.map');
fileList.push('client/lib/bundled/espo.js');
fs.readdirSync('client/css/espo/').forEach(file => {
fileList.push('client/css/espo/' + file);