gulp-jspm icon indicating copy to clipboard operation
gulp-jspm copied to clipboard

Add support for separateCSS (and similar features)

Open chancezeus opened this issue 9 years ago • 1 comments

Since some JSPM plugins have the ability to output additional files (like the jspm/systemjs "plugin-css") I updated the plugin to support this feature. The plugin works 90% regular, except that it uses a temp folder in which the output is generated. After the bundle operation is completed it scans this folder and adds all files to a "files" array. Any files that end with a ".map" extension are json decoded and added to the sourceMaps array (warning: if any regular files get created with a .map these will also be json decoded and this might fail, since it could be non json data). In the end instead of generating one vinyl output it generates a vinyl array in which all files are put combined with their sourceMaps (if applicable, (warning: if a file is defined in the sourceMaps but no matching regular file is found it is silently ignored)). This way you can use the separateCSS feature (and other file splitting features)...

This update is based on adamduren/gulp-jspm beta branch but the changes should be easily portable to the regular/current gulp-jspm if required.

chancezeus avatar Oct 26 '16 16:10 chancezeus

I don't maintain gulp-jspm anymore, see issue #45 - Looking for a maintainer / fork.

Thanks for the PR.

brillout avatar Mar 03 '17 13:03 brillout