Releases: static-dev/spike
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 f = Util.filePathFromLoader(ctx).absolute
return {
defaults: [jade({ filename: f, pretty: true })]
}
}
// ...
}
- 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
Better handling for custom loaders -- see spike-core release notes for details!
v0.6.0
v0.4.0
- Internal changes as a result of spike-core updates, nothing that should directly affect projects.
- See spike-core release notes
v0.3.0
⛔ BREAKING RELEASE This will break spike apps, beware! ⛔
Updates the CLI to use the latest version of spike-core
, see more detailed release notes here: https://github.com/static-dev/spike-core/releases/tag/v0.3.0
v0.2.2
v0.2.1
Spike was just split into two projects, spike-core, which contains the bulk of the code and the javascript API, and this one, which is the command line interface. We will make sure that the versions match up between the two projects. This is the initial release of the cli-only version of spike!