User tests: Successful: Unsuccessful:
Pull Request for no Issue .
A bit of history here: when the production team decided to move forward with the separation of sources and deliverables in the repo quite a few things were done in a hurry. My wrong and I do apologise for all that mess that was in the repo for quite some time. I guess I should fix it now and this is exactly what this PR is doing, in sort:
npm i
should give you the same results as before
Nothing broken
We dropped one npm
command for the custom elements/webcomponents, this is done now by the same command for minifying es5 or compiling ES6
Also there is no performance penalty here (actually there is quite some gain but since we're also transpiring the es6 files instead of blindly copying this doesn't really show up)...
EDIT: I've partially restored the watch functionality for the javascript files. Won't delete the processed files once the source files gets deleted. Also it only works for the media_source folder only
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_categories com_config com_content com_media com_modules Templates (admin) JavaScript Repository |
Title |
|
Labels |
Added:
?
|
@dgrammatiko thanks
anyway to support template/extension scss to css via the same functions?
Yes, if we ever move the template assets to their natural place: that is the media folder
If you solve the conflicts I'm good to merge this
@dgrammatiko Regarding your comment to move the media files of a template to /media: I understand where you are coming from, but I just wanted to bring up that the template is the final point of truth and is meant to override everything else if necessary. Putting the assets of the template into the /media folder would mean that this role would be weakened and bring up the question if overrides for something in a template should reside in the /templates folder or in the /media folder. At the same time most extensions still don't use the /media folder at all for their assets and don't get me started on receiving SCSS files to include in my template.css instead of dozens of small custom CSS. I think the idea of changing this is something that has its merits, but would have to be debated and to me seems out of scope for 4.x.
Putting the assets of the template into the /media folder would mean that this role would be weakened and bring up the question if overrides for something in a template should reside in the /templates folder or in the /media folder.
Sorry NOT TRUE. You can include the assets in a way that will not be overridable Joomla 101
I think the idea of changing this is something that has its merits, but would have to be debated and to me seems out of scope for 4.x.
I think you don't understand the idea, so the idea is to have all the distributable and compiled assets in the media folder NOT moving the css or js folder folder from the template. It breaks nothing apart that the position for the template.css or .js will be in the media folder. Again if this is included as non overridable there is exactly 0 change here. Apart the fact that our build tools will care only for one folder.
Because there is always a but, I will not make an RFC or a PR for this. Instead I'll make a much bigger proposal so Joomla finally gets distributions...
If it's in the media folder it's intended to support overrides by way of the JHtml API. If you're writing $doc->addScript('/templates/cassiopeia/js/template.min.js');
or $doc->addScript('/media/tpl_cassiopeia/js/template.min.js');
anywhere, including the template itself, you're Doing It Wrong™.
sure
Didn't seem to work. I guess we need to update the package-lock or something. @rdeutz can you advise? https://github.com/joomla/joomla-cms/blob/4.0-dev/package.json#L70
@dgrammatiko cool!, if it helps/matters I'm using storm.
also ruby based scss messes with fontawesome content statements and changes it into ascii char instead of utf-8 even if utf-8 is declared. js based doesn't do that
i.e. ...
dart sass = foobar'd
node-sass = just fine.
Category | Administration com_categories com_config com_content com_media com_modules Templates (admin) JavaScript Repository | ⇒ | Unit Tests Administration com_categories com_config com_content com_media com_modules Templates (admin) JavaScript Repository |
Labels |
Added:
?
|
you need to add [CLEAR CACHE] in your commit message
Title |
|
Labels |
Removed:
?
|
Category | Administration com_categories com_config com_content com_media com_modules Templates (admin) JavaScript Repository Unit Tests | ⇒ | Administration com_categories com_config com_content com_media com_modules Templates (admin) JavaScript Repository |
Title |
|
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-02-07 23:00:24 |
Closed_By | ⇒ | wilsonge |
Thankyou! I hope this is the last refactor tho
@dgrammatiko sweet! I'll look forward to it.
PR for the failing tests: joomla/test-javascript#12