Bring static resources (SCSS, JSON, XML, Property Files, etc.) to JavaScript. The modular architecture where every static resource could be interpreted differently.
Multi-language support? Project variables. Style variables. What if you want utilize power of namespaces in XML to build a collaborative source for multi-language support? What if you want to store style-related variables in SCSS, but you need to make some computation in runtime. Most of the data formats are not supported by browsers, - solution is to compile resources before code will be executed on user's machine and use "resources" as an efficient JavaScript code.
The main configuration is an Object. Configuration can be provided as a rs.config.js
file.
Every configuration should include the root property config
and optional settings
.
Example:
module.exports = {config: {}, settings: {}};
Required. Determines about readers and writers.
input <Array>
, list of reader instancesoutput <Writer>
, instance of a writer
Optional. Determines behavior of the tool.
watch <Boolean|Object>
, enables file watcher for reader inputs. Object could be used to provideChokidar
options.
Custom readers and writers should use the same prefix.
- Reader:
rs-reader-xxx
. Example:rs-reader-fast-xml
- Writer:
rs-writer-xxx
. Example:rs-writer-es3