User tests: Successful: Unsuccessful:
Pull Request for Issue # .
NPM scripts support arguments, so can can simply use --development
and --production
for the Media Manager tasks, so there's no need for the cross-env
dependency
npm run build:com_media
and ensure you get a minified JS filenpm run dev:com_media
and ensure you an uncompressed JS fileSame as before
Status | New | ⇒ | Pending |
Category | ⇒ | NPM Change JavaScript |
I have tested this item
Before this PR everything is generated correctly
after removing those files
npm run build:com_media correctly builds the minified files correctly
after removing those files
npm run dev:com_media does not build correctly.
The css file is created unminified but the file name is min.css
The JS file is very odd see attached
I have tested this item
tested on windows
Labels |
Added:
NPM Resource Changed
?
|
@brianteeman fixed the JS file. Not sure if this fixes the CSS file too. Will test tomorrow if you don't get there first
no change on either the js or css
@brianteeman I've reverted back to the original. When running npm run dev:com_media
on 4.0-dev and this branch, the JS files match.
The output is an eval
source map
@brianteeman Tested the CSS too. Honestly can't replicate your findings. Both CSS and JS are exactly the same as before
.min.css
extension is used for both dev
and production
builds. Only difference if the CSS code is minified
for dev
I just tested that again.
Now the large file (2.1MB) joomla-cms4/media/com_media/js/mediamanager.min.js
is also created for me when I enter npm run dev:com_media
.
.min.css extension is used for both dev and production builds. Only difference if the CSS code is minified for dev
Why use the .min.css if its not minified - makes no sense
That's how it was before. This PR doesn't alter any file extensions
ok so maybe thats a different issue then. Usually we have both minified and non-minified files generated and then if debug mode is on the non minified file is used (which iirc is done based on the filename)
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-24 16:41:12 |
Closed_By | ⇒ | C-Lodder |
I tested on Ubunut 18.04
npm ci
./media/com_media/js/mediamanager.min.js
,/media/com_media/js/mediamanager.min.js.map
and/media/com_media/css/mediamanager.min.css
have been create. They have the same size like on branch4.0-dev
.npm run build:com_media
andnpm run dev:com_media
like asked in the test description. After that I made sure, that the files again have been created.