theme-cookiecutter icon indicating copy to clipboard operation
theme-cookiecutter copied to clipboard

One example of how to minify build

Open telamonian opened this issue 6 years ago • 4 comments

All recent versions of the internal themes use a bunch of minify stuff to pack their css and image files up more nicely. It needs to be decided if some version of the minify stuff should also be in this theme template.

The minify setup in this PR resembles that being used in @jupyterlab/theme-light-extension/webpack.conf.js before jupyterlab/jupyterlab/#5505.

telamonian avatar Jan 25 '19 08:01 telamonian

First I'd like to say thank you for putting this together. I'd been searching for a while now for a way to make my custom theme work. From what I've seen, this is necessary for the icons to work with a custom theme. The install, and subsequent rebuild doesn't seem to copy over the svg files so the console is littered with 404's but having it run through webpack obviously doesn't have this issue.

mountain01 avatar Feb 01 '19 18:02 mountain01

The core themes in jupyterlab master are no longer pre-webpacked after a recent refactor (jupyterlab/jupyterlab#5505). I think the problem of how to minify themes will go away by itself with the new JupyterLab prerelease (1.0.0a1). I'll try to take this for a test-drive today and see what will need to be updated.

Thanks for making this repo @telamonian!

ian-r-rose avatar Feb 10 '19 16:02 ian-r-rose

That being said, it may be that people will still want to webpack their themes themselves. I confess I don't really know what best-practices should be here.

ian-r-rose avatar Feb 10 '19 17:02 ian-r-rose

@mountain01 has actually found a bug in the latest version of the package.json template. The style/*.foo file globs are too specific (they were in fact designed to only pick up the files the webpack script missed). It should just be a single generic style/* glob.

Edit

This should be all fixed now. See #3 and #5.

telamonian avatar Feb 16 '19 23:02 telamonian