diff --git a/.gitignore b/.gitignore
index cfb81ca883..95bb9e14b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,7 @@
!/custom/Espo/Custom/.htaccess
!/custom/Espo/Modules/.htaccess
/install/config.php
+
+client/css/espo/*
+client/lib/*
+client/modules/crm/lib/*
diff --git a/Gruntfile.js b/Gruntfile.js
index b046fd3b1e..6124852c03 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -20,12 +20,13 @@
************************************************************************/
/**
-* * `grunt` - full build
-* * `grunt dev` - build only items needed for development (takes less time)
-* * `grunt offline` - build but skip *composer install*
-* * `grunt release` - full build plus upgrade packages`
-* * `grunt test` - build for tests running
-* * `grunt run-tests` - build and run unit and integration tests
+* * `grunt` - full build;
+* * `grunt dev` - build only items needed for development (takes less time);
+* * `grunt offline` - build but skip *composer install*;
+* * `grunt internal` - build only libs and css;
+* * `grunt release` - full build plus upgrade packages`;
+* * `grunt test` - build for tests running;
+* * `grunt run-tests` - build and run unit and integration tests.
*/
const fs = require('fs');
@@ -95,7 +96,12 @@ module.exports = grunt => {
},
clean: {
- start: ['build/EspoCRM-*'],
+ start: [
+ 'build/EspoCRM-*',
+ 'client/lib/*',
+ 'client/modules/crm/lib/*',
+ 'client/css/espo/*',
+ ],
final: ['build/tmp'],
release: ['build/EspoCRM-' + pkg.version],
beforeFinal: {
@@ -136,7 +142,7 @@ module.exports = grunt => {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
files: {
- 'build/tmp/client/espo.min.js': jsFilesToBundle,
+ 'client/lib/espo.min.js': jsFilesToBundle,
},
},
lib: {
@@ -148,7 +154,7 @@ module.exports = grunt => {
options: {
mode: true,
},
- frontendFolders: {
+ frontend: {
expand: true,
cwd: 'client',
src: [
@@ -161,19 +167,13 @@ module.exports = grunt => {
'css/**',
'sounds/**',
'custom/**',
+ 'lib/**',
],
dest: 'build/tmp/client',
},
frontendLib: {
files: jsFilesToCopy,
},
- frontendCommitedLib: {
- expand: true,
- dot: true,
- cwd: 'client/lib',
- src: '**',
- dest: 'build/tmp/client/lib/',
- },
backend: {
expand: true,
dot: true,
@@ -416,17 +416,21 @@ module.exports = grunt => {
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-replace');
- grunt.registerTask('offline', [
- 'clean:start',
- 'mkdir:tmp',
+
+ grunt.registerTask('internal', [
'less',
'cssmin',
'uglify:bundle',
- 'copy:frontendFolders',
'copy:frontendLib',
- 'copy:frontendCommitedLib',
- 'copy:backend',
'uglify:lib',
+ ]);
+
+ grunt.registerTask('offline', [
+ 'clean:start',
+ 'mkdir:tmp',
+ 'internal',
+ 'copy:frontend',
+ 'copy:backend',
'replace',
'clean:beforeFinal',
'copy:final',
@@ -521,10 +525,10 @@ function getCopyLibDataList() {
let minify = item.minify;
if (item.files) {
- item.files.forEach(item => {
+ item.files.forEach(item => {
list.push({
src: item.src,
- dest: 'build/tmp/' + (item.dest || 'client/lib/' + item.src.split('/').pop()),
+ dest: item.dest || 'client/lib/' + item.src.split('/').pop(),
minify: minify,
});
});
@@ -538,7 +542,7 @@ function getCopyLibDataList() {
list.push({
src: item.src,
- dest: 'build/tmp/' + (item.dest || 'client/lib/' + item.src.split('/').pop()),
+ dest: item.dest || 'client/lib/' + item.src.split('/').pop(),
minify: minify,
});
});
diff --git a/application/Espo/Resources/metadata/app/client.json b/application/Espo/Resources/metadata/app/client.json
index 27e7882eee..4fed7dc647 100644
--- a/application/Espo/Resources/metadata/app/client.json
+++ b/application/Espo/Resources/metadata/app/client.json
@@ -1,6 +1,6 @@
{
"scriptList": [
- "client/espo.min.js"
+ "client/lib/espo.min.js"
],
"developerModeScriptList": [
"client/src/loader.js",
diff --git a/client/css/espo/.gitignore b/client/css/espo/.gitignore
deleted file mode 100644
index 86d0cb2726..0000000000
--- a/client/css/espo/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-# Ignore everything in this directory
-*
-# Except this file
-!.gitignore
\ No newline at end of file
diff --git a/install/core/tpl/index.tpl b/install/core/tpl/index.tpl
index 9dd8a4ed45..e74f495e9c 100644
--- a/install/core/tpl/index.tpl
+++ b/install/core/tpl/index.tpl
@@ -7,7 +7,7 @@
{if $isBuilt}
-
+
{else}
{foreach from=$libFileList item=file}
diff --git a/install/entry.php b/install/entry.php
index c6c2a318ba..c76b04271d 100644
--- a/install/entry.php
+++ b/install/entry.php
@@ -199,7 +199,7 @@ if (Utils::checkActionExists($action)) {
if (!empty($actionFile) && file_exists('install/core/tpl/' . $tplName)) {
/* check if EspoCRM is built */
- $isBuilt = file_exists('client/espo.min.js');
+ $isBuilt = file_exists('client/lib/espo.min.js');
$smarty->assign('isBuilt', $isBuilt);
diff --git a/js/diff.js b/js/diff.js
index d6a7ea21c2..ef99ba7fed 100644
--- a/js/diff.js
+++ b/js/diff.js
@@ -258,8 +258,8 @@ class Diff
libData.filesToCopy.forEach(item => fileList.push(item));
- fileList.push('client/espo.min.js');
- fileList.push('client/espo.min.js.map');
+ fileList.push('client/lib/espo.min.js');
+ fileList.push('client/lib/espo.min.js.map');
fs.readdirSync('client/css/espo/').forEach(file => {
fileList.push('client/css/espo/' + file);
diff --git a/upgrades/7.1/data.json b/upgrades/7.1/data.json
new file mode 100644
index 0000000000..709970ff7c
--- /dev/null
+++ b/upgrades/7.1/data.json
@@ -0,0 +1,8 @@
+{
+ "manifest": {
+ "delete": [
+ "client/espo.min.js",
+ "client/espo.min.js.map"
+ ]
+ }
+}