Skip to content

Commit

Permalink
Update the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Jun 25, 2023
1 parent 8882d1a commit 927a639
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ For some of these operations, conventions were established to simplify and speed
There are three options here:
- Modern Javascript files must have an extension `.es6.js`.
This allows ESLint to check the code style, Joomla is using the Airbnb preset https://github.com/airbnb/javascript.
It also instructs Rollup to do the transforms for ES2017 and then transpile to ES5. This step creates both normal and minified files.
Production code WILL NOT have the `.es6` part for ES2017+ files but WILL HAVE a `-es5.js` for the ES5 ones.
It also instructs Rollup to do the transforms for ES2017. This step creates both normal and minified files.
Production code WILL NOT have the `.es6` part for ES2017+ files.

- Web Component Javascript files must have an extension `.w-c.es6.js`.
This allows ESLint to check the code style and instructs Rollup to do the transforms for ES2017 and then transpile to ES5. This step creates normal and minified files. The difference with the `.es6` files is that the tools will automate the minification of the CSS (assuming that the appropriate SCSS file exists), which is then injected into the JS file in place of the placeholder `{{CSS_CONTENTS_PLACEHOLDER}}` (ie: `build/media_source/system/js/joomla-core-loader.w-c.es6.js`)
Production code WILL NOT have the `.w-c.es6` part for ES2017+ files but WILL HAVE a `-es5.js` for the ES5 ones.
This allows ESLint to check the code style and instructs Rollup to do the transforms for ES2017. This step creates normal and minified files. The difference with the `.es6` files is that the tools will automate the minification of the CSS (assuming that the appropriate SCSS file exists), which is then injected into the JS file in place of the placeholder `{{CSS_CONTENTS_PLACEHOLDER}}` (ie: `build/media_source/system/js/joomla-core-loader.w-c.es6.js`)
Production code WILL NOT have the `.w-c.es6` part for ES2017+.

- Legacy Javascript files must have an extension `.es5.js`.
This instructs ESLint to skip checking this file.
Expand Down

0 comments on commit 927a639

Please sign in to comment.