Trio v6.0.0
It is with great pleasure that I announce the release of Trio v6.0.0.
Highlights
An Improved Release Workflow That Now Supports JavaScript Bundling
Prior to Trio v6.0.0 cache busting was initiated by running the command trio release -b
. The problem is that this didn't allow the developer to run their NPM package.json scripts, such as those that might bundle their JavaScript modules, before they cache busted the site. Removing the -b
option from the trio release
command and implementing a standalone trio cachebust
command that can be called after running trio release
corrects this and allows for an "open" workflow, such as using NPM scripts in your package.json file
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"parcelBuild": "parcel watch source/jsBundle/main.js --no-cache --out-dir public/scripts --public-url /scripts/",
"trioBuild": "trio b -I",
"build": "concurrently --kill-others \"npm run trioBuild\" \"npm run parcelBuild\" ",
"release": "trio r && parcel build source/jsBundle/main.js --no-cache --out-dir release/scripts --public-url /scripts/ && trio cachebust -m && trio s -r"
},
for development builds
# run npm script to bundle JavaScript into public/scripts folder
npm run build
and for release builds.
# run npm script to bundle JavaScript into release/scripts folder
npm run release
If your site uses a JavaScript bundler (e.g. Parcel, Browserify, Webpack) to package its runtime JavaScript then do not host those modules in root/source/scripts. Instead, create a new folder in root/source, for example jsBundle, and host them there. Please see Project Structure for details.
New CSS Source Map Generation Options
Trio now offers sensible configuration options for controlling the generation of CSS map files for both development and release builds.
From within trio.json you can now configure source map generation using the following:
"sassSourceMaps": {
"development": [true | false],
"release": [true | false]
}
Both development and release builds default to true
.
Improved Cache Busting, A Breaking Change
Trio v6.0.0 has upgraded its toolchain to use version v1.0.0
of the browser cache buster Buster, which eliminates a bug that would result in URLs being hashed twice. This would occur when a URL points to a file whose file name is used in part in another file's name. This naming convention is common for JavaScript map files and CSS map files.
For example, when hashing the file names for the files [mybundle.js] and [mybundle.js.map] Buster would ultimately hash [mybundle.js.map] as [hash-hash-mybundle.js.map].
Please note that beginning with Buster v1.0.0, your site's internal URLs are required to be site releative. This requirement is a breaking change from previous versions of Buster. What does this mean for your existing Trio projects that are using Trio's cache busting? Existing projects' internal URLs that aren't already site relative will need to be converted. Please see Linking Conventions and Buster's documentation for details.
Changelog
Please see the changelog for details.