2.0.0
Hey y'all
We got some goodies for you here, including with some exciting new features like custom templates and many bug fixes.
A huge thanks to @lukeed for the awesome work on custom templates. This means you can now use any github/gitlab/bitbucket repository as a starting point for your preact-cli project. π
Custom templates
The default templates for preact-cli have been moved to a preactjs-templates organization. Now you can create your own custom template/boilerplate and use it with preact-cli. To use an Github repo as a template: preact create user/repo appname
Note: You need to place the code for the repo in a folder
template/, or else it will throw an error.
Current available templates include:
- default - Default template with all features.
- material - material template using preact-material-components
- simple - The simplest possible preact setup in a single file
Here are a few things that we have cooked up for 2.0. π
New & Shiny π π
- Remote templates (#329/#99, thanks @lukeed)
- Custom
httpscerts forpreact watch(#375/#373, thanks @lukeed) - Webpack 3 (#375/#367, #150, thanks @lukeed @hassanbazzi)
preact list: list all the official preactjs-cli repositories (#384, thanks @reznord)- Custom CORS origins (#119, thanks @rkostrzewski)
- Values injection into templates (#382/#353, thanks @lukeed)
- Disable service-worker flag (#377/#371, thanks @prateekbh)
- User prompts for
preact create(#359, 280bcb3/#352, thanks @lukeed, @reznord) - Update notifier for preact-cli (#361, thanks @reznord)
- Better stack traces for prerender errors (#317/#310, thanks @developit)
- Make template.html and sw.js use publicPath (#323/#315, thanks @lwakefield)
Bugs Fixed
- change
--namebehavior (#326/#329, thanks @lukeed) - css-loader & getLoadersByClassName - webpackConfigHelpers (#349/#303, thanks @molily)
- Throw error when
template/folder not found (#356/#351, thanks @lukeed) - Remove propsTypes in production build (#259, thanks @rbscott)
- Look for process.env.HTTPS for
preact watch(#272, thanks @reznord) - Fix: Check node version (#280, thanks @reznord)
- Fix: Copy media files without corruption (#397, thanks @lukeed)
- Fix:
--jsonstats output and resource identifier cleaning (#398/#316, thanks @developit)