All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added
resolveMetaAliases
option to resolve aliases in metadata. - see #172
- Upgraded vulnerable dependency
- [android.xml] Moves value from from attribute (#144)
- [android.xml] Output dp values (#156)
- [android.xml] Use the right Android XML tags (#154)
- [Android] Convert invalid hyphens to underscores for Android (#159)
- Correctly handle number types
- Imports are now resolved using resolve-from @stevenbenisek
- Aliases are now recursively resolved if
value
is an object or array
- Due to how imports are resolved,
my-aliases
will now point to./node_modules/my-aliases
instead of./my-aliases
. Local imports should include the relative path (./
,../
)
Theo v6 is a complete re-write that allowed us to fix some long standing issues and separate the core engine from the Gulp plugin.
- Handlebars support for
registerFormat()
(@kaelig) - Formats can now receive additional options
- Added new formats
cssmodules.css
(@nickbalestra)custom-properties.css
module.js
- CLI support (@nickbalestra @tomger)
- Array support for "props" (as long as each prop has a "name" key) which will preserve prop order in the final output
- Bug fixes and documentation for several existing formats (@corygibbons @dennisreimann @micahwood @didoo)
Big thanks to @kaelig for helping kickstart this release and to all the alpha/beta testers who reported issues and fixed bugs!
- Aliases are only available to files that directly import them – see #101
- The Gulp plugin is in a separate gulp-theo package
- Renamed the
.meta
key tometa
- Removed the
includeRawValue
option in favor of always adding anoriginalValue
key in each transformed prop
If you would like to keep using Theo as a Gulp plugin with Theo v6, here is what a typical update would look like:
npm install theo --save-dev
const gulp = require("gulp");
const theo = require("theo");
// Transform design/props.yml to dist/props.scss
gulp
.src("design/props.yml")
.pipe(theo.plugins.transform("web"))
.pipe(theo.plugins.format("scss"))
.pipe(gulp.dest("dist"));
The Gulp plugin is in a separate gulp-theo package:
npm install gulp-theo --save-dev
const gulp = require("gulp");
const theo = require("gulp-theo");
// Transform design/props.yml to dist/props.scss
gulp
.src("design/props.yml")
.pipe(
theo.plugin({
transform: { type: "web" },
format: { type: "scss" }
})
)
.pipe(gulp.dest("dist"));
Theo v5.0.0 comes with a ton of improvements and drops support for Node.js < 6.
A massive thanks to the contributors who made this release possible, especially to @micahgodbolt.
View all pull requests merged in v5.0.0
- Support for
*.yaml
files (#60) - Support for JSON5 syntax (an improvement on JSON)
- Improved styleguide theme (#56)
- Aliases can reference other aliases (#69)
- Users may now pre-process the input with custom functions (#71)
- Improved test results and moved test suite to Jest
- JavaScript is now linted using our internal standards
- Removed React from devDependencies
- Added an EditorConfig file
- Inline comments in the output of popular formats (e.g. scss) (fixes #58)
- Breaking change: removed the
color/hex8
transform. Instead, usecolor/hex8argb
in Android, andcolor/hex8rgba
in, for example, CSS level 4 values - Breaking change: Node.js 6 and up is required
- Various tweaks and fixes
Theo v5 is now compatible with Node.js v6.3 and up, dropping support for Node.js v4.
Pointing to a non-existing alias now throws an error instead of failing silently.
Lodash's implementation of kebabCase
was dropped because it separated numbers as words:
- Lodash:
A1
->a-1
- Theo:
A1
->a1