NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
27 Feb 2020

Pull Request for Issue # .

Summary of Changes

  1. Remove uglifycss and use postcss/cssnano like we do in other areas of the build scripts
  2. Remove the promised based recursive-readdir dependency and use a small asynchronous custom function to recursively read directories.
  3. Update NodeJS + NPM dependencies to latest LTS
  4. Update some dev dependencies to their respective latest version

Still room for improvements but this is a start

Testing Instructions

  1. Run npm i
  2. Ensure there are no errors in the terminal when building

@dgrammatiko thoughts on this?

avatar C-Lodder C-Lodder - open - 27 Feb 2020
avatar C-Lodder C-Lodder - change - 27 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Feb 2020
Category JavaScript Repository NPM Change Front End Templates (site)
avatar C-Lodder C-Lodder - change - 27 Feb 2020
Labels Added: NPM Resource Changed ?
avatar dgrammatiko
dgrammatiko - comment - 27 Feb 2020

@C-Lodder it's fine I guess, just a reminder that last time I tried to use async/await George was against it, thus the promise based is still here

avatar dgrammatiko
dgrammatiko - comment - 27 Feb 2020

Also something else since you're touching this:
in the comile-scss change this [~line 44]:

        files = [
          `${RootPath}/templates/cassiopeia/scss/offline.scss`,
          `${RootPath}/templates/cassiopeia/scss/template.scss`,
          `${RootPath}/templates/cassiopeia/scss/template-rtl.scss`,
          `${RootPath}/administrator/templates/atum/scss/template.scss`,
          `${RootPath}/administrator/templates/atum/scss/template-rtl.scss`,
          `${RootPath}/administrator/templates/atum/scss/system/searchtools/searchtools.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/awesomplete/awesomplete.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/choicesjs/choices.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/minicolors/minicolors.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/joomla-custom-elements/joomla-alert.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/joomla-custom-elements/joomla-tab.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/fontawesome-free/fontawesome.scss`,
          `${RootPath}/installation/template/scss/template.scss`,
          `${RootPath}/installation/template/scss/template-rtl.scss`,
        ];
        folders = [
          `${RootPath}/build/media_source`,
        ];

to

        files = [
          `${RootPath}/installation/template/scss/template.scss`,
          `${RootPath}/installation/template/scss/template-rtl.scss`,
        ];
        folders = [
          `${RootPath}/build/media_source`,
`${RootPath}/administrator/templates`,
`${RootPath}/templates`,
        ];

That way someone can use these tools to build any front end or back end template

avatar dgrammatiko
dgrammatiko - comment - 27 Feb 2020

Also something else since you're touching this:
in the comile-scss change this [~line 44]:

        files = [
          `${RootPath}/templates/cassiopeia/scss/offline.scss`,
          `${RootPath}/templates/cassiopeia/scss/template.scss`,
          `${RootPath}/templates/cassiopeia/scss/template-rtl.scss`,
          `${RootPath}/administrator/templates/atum/scss/template.scss`,
          `${RootPath}/administrator/templates/atum/scss/template-rtl.scss`,
          `${RootPath}/administrator/templates/atum/scss/system/searchtools/searchtools.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/awesomplete/awesomplete.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/choicesjs/choices.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/minicolors/minicolors.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/joomla-custom-elements/joomla-alert.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/joomla-custom-elements/joomla-tab.scss`,
          `${RootPath}/administrator/templates/atum/scss/vendor/fontawesome-free/fontawesome.scss`,
          `${RootPath}/installation/template/scss/template.scss`,
          `${RootPath}/installation/template/scss/template-rtl.scss`,
        ];
        folders = [
          `${RootPath}/build/media_source`,
        ];

to

        files = [
          `${RootPath}/installation/template/scss/template.scss`,
          `${RootPath}/installation/template/scss/template-rtl.scss`,
        ];
        folders = [
          `${RootPath}/build/media_source`,
`${RootPath}/administrator/templates`,
`${RootPath}/templates`,
        ];

That way someone can use these tools to build any front end or back end template

avatar C-Lodder
C-Lodder - comment - 27 Feb 2020

@dgrammatiko Template devs should be using their own build environment rather than being tied in to Joomla's. Also, if we add this support in, it will actually prevent template devs using their own. Just tested with my template and it failed

@wilsonge I'm ignoring Hound errors till package.json and Hound are using the the latest version of eslint, they're matching, and the parser options are set properly

avatar dgrammatiko
dgrammatiko - comment - 27 Feb 2020

Just tested with my template and it failed

Are you using the same conventions? eg src= scss dest: css?

it will actually prevent template devs using their own

No it won't! You can still npm init any subfolder in the repo

avatar wilsonge
wilsonge - comment - 28 Feb 2020

@wilsonge I'm ignoring Hound errors till package.json and Hound are using the the latest version of eslint, they're matching, and the parser options are set properly

Then the PR's probably going to sit here a long time. I'm not going to go run around do this for you - this is nice to have but no where close to a priority.

avatar C-Lodder
C-Lodder - comment - 28 Feb 2020

Not expecting to you do anything. Will leave this here till it's fixed.

avatar C-Lodder C-Lodder - change - 29 Feb 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-02-29 15:48:03
Closed_By C-Lodder
avatar C-Lodder C-Lodder - close - 29 Feb 2020

Add a Comment

Login with GitHub to post a comment