mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-03 02:27:01 +00:00
espo bundled
This commit is contained in:
15
Gruntfile.js
15
Gruntfile.js
@@ -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}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user