1 | # @stylable/core
|
2 |
|
3 | [![npm version](https://img.shields.io/npm/v/@stylable/core.svg)](https://www.npmjs.com/package/stylable/core)
|
4 |
|
5 | `@stylable/core` is at the center of how Stylable operates. It provides the basic capabilities required for Stylable to parse stylesheets and transform their output to valid plain CSS.
|
6 |
|
7 | ## Running Stylable
|
8 |
|
9 | Follow these instructions in order to run Stylable in development mode, this allows you to run the package tests with hot-loading enabled.
|
10 | 1. Clone this repo
|
11 | 2. `cd stylable`
|
12 | 3. `yarn`
|
13 | 4. `cd ./packages/stylable`
|
14 | 5. `yarn start`
|
15 | 6. Open your browser to [`http://localhost:8080/tests.bundle`](http://localhost:8080/tests.bundle)
|
16 |
|
17 | ## How it works
|
18 |
|
19 | Stylable's workflow contains two main parts that together perform the CSS transpilation.
|
20 |
|
21 | - `stylable-processor` - Parses each `stylesheet` separately into its own AST ([abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), extracting the required data without any resolution of dependencies in other files.
|
22 | - `stylable-transformer` - Processes each stylesheet using the previously created data including other file dependencies. Transforms our Stylable CSS into vanilla CSS.
|
23 |
|
24 | ## License
|
25 | Copyright (c) 2017 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a [BSD license](./LICENSE).
|