? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
14 Jul 2018

Pull Request for Issue # .

Summary of Changes

  • Update some critical parts (eslint)

  • moved the webcomponents folder to build/media/webcomponents

  • copied the folders: media/vendor/tinyMCE/langs, media/vendor/tinyMCE/templates and media/vendor/jquery-ui to build/media/vendor/... The first 2 folders are actually code that belongs to the Joomla project. The latter is just because jquery-ui is way to outdated to even care to fetch it properly (has been marked for removal, anyways).

  • replaced the chalk with kleur (a highlighting script for the command line)

  • removed the --compilecescss and the relative file.

  • Refactor the compilecejs to be capable to produce inline css and also the relative files (the first one is required for the webcomponents, the latter for the custom elements)

Commands:

/* *
 * To get the complete functional media folder please run
 *
 * npm install
 *
 * For dedicated tasks, please run:
 * node build.js --installer      === will create the error page (for unsupported PHP version)
 * node build.js --update         === will clean the media/vendor folder and then fetch the dependencies from source
 * node build.js --compilejs      === will transpile ES6 files and also uglify the ES6,ES5 files
 * node build.js --compilecejs    === will compile all the given CE or WC with their relative css files
 * node build.js --compilecss   === will compile all the scss defined files and also create a minified version of the css
 *
 */

Testing Instructions

just try the commands

Expected result

Actual result

Documentation Changes Required

8c5ae44 14 Jul 2018 avatar dgrammatiko cli
avatar dgrammatiko dgrammatiko - open - 14 Jul 2018
avatar dgrammatiko dgrammatiko - change - 14 Jul 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jul 2018
Category JavaScript Repository
avatar dgrammatiko dgrammatiko - change - 14 Jul 2018
Title
cli
[4.0] npm cli tools updates
avatar dgrammatiko dgrammatiko - edited - 14 Jul 2018
avatar dgrammatiko dgrammatiko - change - 14 Jul 2018
The description was changed
avatar dgrammatiko dgrammatiko - edited - 14 Jul 2018
f6e71c4 14 Jul 2018 avatar dgrammatiko grr
avatar dgrammatiko dgrammatiko - change - 14 Jul 2018
Labels Added: ?
avatar wilsonge
wilsonge - comment - 16 Jul 2018
Prefixing for:  [ 'last 2 versions', 'not ie < 11' ]
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
(node:2251) UnhandledPromiseRejectionWarning: ReferenceError: chalk is not defined
    at cleaner.process.then.then.then (/Users/george/Sites/joomla-cms/build/build-modules-js/compilescss.js:95:25)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2251) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2251) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
avatar dgrammatiko
dgrammatiko - comment - 16 Jul 2018

about:
Withoutfromoption PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or toundefinedto prevent this warning.

That is a warning that map needs a source file, but we don't use maps (at least for CE's)

The other was a stupid mistake on search-replace.

avatar wilsonge
wilsonge - comment - 18 Jul 2018

So why are we moving from chalk to kleur? According to kleur's readme

Aside from the performance boost, `kleur` exists as a separate module because I've removed some of `ansi-colors`'s defining features, like bright color variants and symbols. It's tailor-made for my needs and experimentation.

I'm not really seeing why a module that recommends somebody else's module because it's for experimentation is something we'd want to use. I don't see the need for a small performance boost for cli highlighting in a dev tool where css and js compilation is going to take magnitudes longer than cli

avatar dgrammatiko
dgrammatiko - comment - 19 Jul 2018

Actually, I'm gonna ditch the whole coloured output from the cli, there's no reason to get more dependencies for such things

avatar dgrammatiko
dgrammatiko - comment - 20 Jul 2018

@wilsonge highlighting completely removed

avatar wilsonge wilsonge - change - 20 Jul 2018
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2018-07-20 13:23:15
Closed_By wilsonge
avatar wilsonge wilsonge - close - 20 Jul 2018
avatar wilsonge wilsonge - merge - 20 Jul 2018

Add a Comment

Login with GitHub to post a comment