Converts TSS (Titanium Style Sheets) to STSS (Sassy Titanium Style Sheets). That's all it does.
You can install this tool using npm:
npm install -g tss2stss
You can run it from the command line. The current version has two parameters: input and output.
tss2stss index.tss index.stss
Or convert whole projects at once:
tss2stss app/styles app/styles/stss
You can also incorporate this into your own project:
var tss2stss = require('tss2stss');
- Improved support for more complex selectors - by @xavierlacot
- Shorthand notations like
left
instead ofTi.UI.TEXT_ALIGNMENT_LEFT
are now optimised in the compiler - A simple testsuite has been added
- Initial release of this tool
Any help with development is welcome. Please take a look at the issues list if you want to work on something, or discuss a new feature.
Currently the TSS to STSS conversion is tested using a Ti Alloy app that compiles the TSS files in the
tests/tss2stss-test-app/tss-fixtures
directory into STSS files in the tests/tss2stss-test-app/app/styles
directory.
After that a ti build is triggered and the stss hook compiles the STSS back to TSS, which are then validated by the
ti build. If any errors occur during this process, you will see this in the console.
You can run these tests by executing the runtest.sh
file in the app's directory.