Skip to content

Commit

Permalink
Merge branch '4.0-dev' into mailcc-joomla4
Browse files Browse the repository at this point in the history
  • Loading branch information
vaivk369 committed Feb 8, 2019
2 parents 98b317f + effacb8 commit 0b8a87b
Show file tree
Hide file tree
Showing 552 changed files with 3,750 additions and 4,725 deletions.
13 changes: 12 additions & 1 deletion .eslintignore
@@ -1,6 +1,17 @@
# A list of files to ignore from linting
# TODO: Fix the webcomponents codestyle then also allow linting on them
*.js
!*.es6.js
administrator/components/com_media/node_modules/uri-js/node_modules/punycode/punycode.es6.js
media
*.vue
# TODO: Fix the webcomponents codestyle then also allow linting on them
joomla-editor-codemirror.w-c.es6.js
joomla-field-fancy-select.w-c.es6.js
joomla-field-media.w-c.es6.js
joomla-field-module-order.w-c.es6.js
joomla-field-permissions.w-c.es6.js
joomla-field-send-test-mail.w-c.es6.js
joomla-field-simple-color.w-c.es6.js
joomla-field-subform.w-c.es6.js
joomla-field-switcher.w-c.es6.js
# End of TODO
Expand Up @@ -138,7 +138,7 @@
\Joomla\CMS\Factory::getDocument()->addScriptOptions('category-change', $id);

HTMLHelper::_('script', 'layouts/joomla/form/field/category-change.min.js', ['version' => 'auto', 'relative' => true], ['defer' => true]);
HTMLHelper::_('webcomponent', 'system/webcomponents/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('webcomponent', 'system/fields/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);
?>

<joomla-field-fancy-select <?php echo $attr2; ?>><?php echo implode($html); ?></joomla-field-fancy-select>
Empty file.
Expand Up @@ -16,7 +16,7 @@
defined('_JEXEC') or die;

HTMLHelper::_('form.csrf');
HTMLHelper::_('webcomponent', 'system/webcomponents/joomla-field-send-test-mail.min.js', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('webcomponent', 'system/fields/joomla-field-send-test-mail.min.js', ['version' => 'auto', 'relative' => true]);

// Load JavaScript message titles
Text::script('ERROR');
Expand Down
Empty file modified administrator/components/com_config/tmpl/component/default.xml 100755 → 100644
Empty file.
Empty file modified administrator/components/com_content/tmpl/article/edit.xml 100755 → 100644
Empty file.
41 changes: 30 additions & 11 deletions administrator/components/com_media/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -73,7 +73,7 @@
Text::script('JGLOBAL_SELECT_PRESS_TO_SELECT');

Factory::getDocument()->getWebAssetManager()->enableAsset('choicesjs');
HTMLHelper::_('webcomponent', 'system/webcomponents/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('webcomponent', 'system/fields/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);

?>
<joomla-field-fancy-select <?php echo implode(' ', $attributes); ?>><?php
Expand Down
Expand Up @@ -33,7 +33,7 @@
Text::script('JGLOBAL_SELECT_PRESS_TO_SELECT');

Factory::getDocument()->getWebAssetManager()->enableAsset('choicesjs');
HTMLHelper::_('webcomponent', 'system/webcomponents/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);
HTMLHelper::_('webcomponent', 'system/fields/joomla-field-fancy-select.min.js', ['version' => 'auto', 'relative' => true]);

?>

Expand Down
2 changes: 1 addition & 1 deletion administrator/templates/atum/scss/font-awesome.scss
Expand Up @@ -5,7 +5,7 @@
@import "../../../../media/vendor/font-awesome/scss/font-awesome";

// B/C for Icomoon
@import "../../../../build/media/system/scss/icomoon";
@import "../../../../build/media_source/system/scss/icomoon";

// RTL override
html[dir=rtl] .pull-right {
Expand Down
4 changes: 2 additions & 2 deletions administrator/templates/atum/scss/template.scss
Expand Up @@ -10,10 +10,10 @@
@import "../../../../media/vendor/bootstrap/scss/custom-forms";

// Alert
@import "../../../../build/media/system/scss/jalert";
@import "../../../../build/media_source/system/scss/jalert";

// jQuery Minicolors
@import "../../../../build/media/system/scss/jquery-minicolors";
@import "../../../../build/media_source/system/scss/jquery-minicolors";

// Blocks
@import "blocks/global"; // Leave this first
Expand Down
64 changes: 31 additions & 33 deletions build.js
Expand Up @@ -6,12 +6,10 @@
* npm install
*
* For dedicated tasks, please run:
* node build.js --buildcheck === will create the error page (for incomplete repo build)
* node build.js --installer === will create the error page (for unsupported PHP version)
* node build.js --copy-assets === will clean the media/vendor folder and then will populate the folder from node_modules
* node build.js --compile-js === will transpile ES6 files and also uglify the ES6,ES5 files
* node build.js --compile-ce === will compile all the given CE or WC with their relative css files
* node build.js --compile-css === will compile all the scss defined files and also create a minified version of the css
* node build.js --build-pages === will create the error pages (for incomplete repo build PHP+NPM)
* node build.js --copy-assets === will clean the media/vendor folder and then will populate the folder from node_modules
* node build.js --compile-js === will transpile ES6 files and also uglify the ES6,ES5 files
* node build.js --compile-css === will compile all the scss defined files and also create a minified version of the css
*
*/

Expand All @@ -20,12 +18,12 @@ const Program = require('commander');
// eslint-disable-next-line import/no-extraneous-dependencies

// Joomla Build modules
const buildCheck = require('./build/build-modules-js/build-check');
const copyAssets = require('./build/build-modules-js/update');
const compileCSS = require('./build/build-modules-js/compilescss');
const compileJS = require('./build/build-modules-js/compilejs');
const compileWebComponents = require('./build/build-modules-js/compilecejs');
const minifyVendor = require('./build/build-modules-js/minify-vendor');
const errorPages = require('./build/build-modules-js/error-pages.es6.js');
const init = require('./build/build-modules-js/init.es6.js');
const compileCSS = require('./build/build-modules-js/compilecss.es6.js');
const compileJS = require('./build/build-modules-js/compilejs.es6.js');
const minifyVendor = require('./build/build-modules-js/javascript/minify-vendor.es6.js');
const watch = require('./build/build-modules-js/watch.es6.js')

// The settings
const options = require('./package.json');
Expand All @@ -40,11 +38,10 @@ if ('settings' in settings) {
Program
.version(options.version)
.option('--copy-assets', 'Moving files from node_modules to media folder')
.option('--compile-js, --compile-js path', 'Compiles ES6 to ES5 scripts')
.option('--build-pages', 'Creates the error pages for unsupported PHP version & incomplete environment')
.option('--compile-js, --compile-js path', 'Handles ES6, ES5 and web component scripts')
.option('--compile-css, --compile-css path', 'Compiles all the scss files to css')
.option('--compile-ce, --compile-ce path', 'Compiles/traspiles all the custom elements files')
.option('--watch, --watch path', 'Watch file changes and re-compile (Only work for compile-css and compile-js now).')
.option('--build-check', 'Creates the error pages for unsupported PHP version & incomplete environment')
.option('--watch', 'Watch file changes and re-compile (ATM only works for the js in the media_source).')
.on('--help', () => {
// eslint-disable-next-line no-console
console.log(`Version: ${options.version}`);
Expand All @@ -62,7 +59,7 @@ if (!process.argv.slice(2).length) {
// Update the vendor folder
if (Program.copyAssets) {
Promise.resolve()
.then(copyAssets.copyAssets(options))
.then(init.copyAssets(options))
.then(minifyVendor.compile(options))

// Exit with success
Expand All @@ -78,29 +75,30 @@ if (Program.copyAssets) {


// Creates the error pages for unsupported PHP version & incomplete environment
if (Program.buildCheck) {
buildCheck.buildCheck(options);
if (Program.buildPages) {
Promise.resolve()
.then(() => {
errorPages.run(options);
})
// Handle errors
.catch((err) => {
// eslint-disable-next-line no-console
console.error(err);
process.exit(-1);
});
}

// Convert scss to css
if (Program.compileCss) {
if (Program.watch) {
compileCSS.watch(options, null, true);
} else {
compileCSS.compileCSS(options, Program.args[0]);
}
compileCSS.compile(options, Program.args[0]);
}

// Compress/transpile the javascript files
if (Program.compileJs) {
if (Program.watch) {
compileJS.watch(options, null, false);
} else {
compileJS.compileJS(options, Program.args[0]);
}
compileJS.compileJS(options, Program.args[0]);
}

// Compress/transpile the Custom Elements files
if (Program.compileCe) {
compileWebComponents.compile(options, Program.args[0]);
}
// Compress/transpile the javascript files
if (Program.watch) {
watch.run();
}
30 changes: 0 additions & 30 deletions build/build-modules-js/babel.js

This file was deleted.

0 comments on commit 0b8a87b

Please sign in to comment.