Releases: static-dev/spike-core
Releases · static-dev/spike-core
v0.11.0
v0.10.0
v0.9.0
v0.8.2
v0.8.1
v0.8.0
⛔ BREAKING RELEASE This will break all spike apps, beware! ⛔
Hello friends! Time for a big release 😁 As you may have seen above, this update with unquestionably break all existing spike projects, there have been some massive architecture changes for the better. Luckily, upgrading isn't too tough. Let's go through what changed.
- We switched from pure jade to posthtml. This means a huge amount more flexibility, as you can plug any of a large number of posthtml plugins in order to transform your html. We also are not giving up jade entirely, the default template uses posthtml-jade, so nothing will need to change in your views.
- The default extensions are now
html
,css
, andjs
instead ofjade
,sss
, andjs
, as they were previously. That means if you want to use custom extensions to match posthtml/postcss plugins, you will need to configure them manually. - We no longer auto-include
postcss-include
, because it was ridiculous that we did this before. The user should be entirely in control of their own postcss plugins. If you are using this plugin, you will need to add it to yourapp.js
file now. - The
locals
config option no longer exists. With posthtml, you can use plugins that include locals in a variety of ways, user's preference. You can now pass locals directly to the jade plugin if you're using jade. - Removing
locals
means that spike-rooftop and spike-records now work a little differently, so if you are using either of these plugins, you will need to update your version and configuration. Check out their readmes for more details.
Typical Upgrade Path
- Run
npm i spike-util posthtml-jade postcss-import -S
- Add
matchers: { html: '**/*.jade', css: '**/*.sss' }
to yourapp.js
config, so that the custom extensions are matched correctly. - Add a
posthtml
config that looks like this:
const Util = require('spike-util')
const jade = require('posthtml-jade')
// ...
module.exports = {
// ...
posthtml: (ctx) => {
const f = Util.filePathFromLoader(ctx).absolute
return {
defaults: [jade({ filename: f, pretty: true, foo: 'bar' })]
}
}
// ...
}
- If you are using locals, pass them right into the config object going into
jade
, an examplefoo: 'bar'
is provided above. - Update your postcss config to use postcss-imports, as such:
const postcssImport = require('postcss-import')
// ...
module.exports = {
// ...
postcss: (ctx) => {
const atImport = postcssImport({ addDependencyTo: ctx })
return {
plugins: [atImport, cssnext(), rucksack(), lost()],
parser: sugarss
}
}
// ...
}
- If you are using spike-records or spike-rooftop, consult those projects' readmes for upgrade info, and boost the version.
- If all else fails, consult the app.js in our base template, which is working.
- If this still fails, come say hi in our gitter chatroom and we will help you out 😁
v0.7.0
- BREAKING:
project.compile()
now returns an object containing the id and compiler rather than an array - BREAKING:
project.watch()
now returns an object containing the id and watcher rather than just the watcher - Custom loaders now work along with spike's core plugins, unless you pass the
skipSpikeProcessing: true
option to them. This means that a file processed by a custom loader does not need to be required and will be written to the output folder. See the new custom loaders docs for more information. To restore loader behavior exactly to how it was in the previous version, pass theskipSpikeProcessing: true
flag along with the loader config. - Source maps are now generated without error using the
devtool
config. - New and better documentation in the readme! 🎉