Lorco is a cli tool which extract colors from a sketch file and outputs color variable files in many common formats including Sass, Less, CSS, JSON, JavaScript
- Clone this repo
- Copy your file into
./files
folder - Run
npm run build
- Open
./generated/_colors.scss
You can change the behaviour of Lorco with several command line arguments.
By default the script will take the first file it finds (alphabetically). You can also specify which file you would like to source from with this command:
npm run build -- --file=my-awesome-file.sketch
By default the script will build variables into a .scss file. You can also specified which language you want to build.
npm run build -- --lang=css
The available language values are:
- scss
- less
- css
- json
- js
You can also use this in combination with the file
argument.
npm run build -- --file=my-awesome-file.sketch --lang=css
Tests are in test
directory, and are writter with Ava
Tests can be running with npm run test
We use [SemVer][semver] for versioning. For the versions available, see the [tags on this repository][project_tags].