ES6+ & PostCSS & NPMCDN => All in one
$ npm i -g node-transformersTo start server:
$ transformersPOST /api/babel
Parameters
| Name | Type | Description |
|---|---|---|
| code | String | The content to be transformed to ES5. ES6 by default |
| react | Boolean | false. Enable this to allow transforming JSX code |
| experimental | Boolean | false. Enable this to allow stage-0 features |
Response
{
"code": "\"use strict\";\n\nvar a = React.createElement(\"div\", null);"
}POST /api/postcss
Parameters
| Name | Type | Description |
|---|---|---|
| code | String | The content to be transformed to valid CSS. Support PreCSS by using PostCSS |
Response
{
"code": "body h1{\n font-size:15px;\n}"
}POST /api/jade
Parameters
| Name | Type | Description |
|---|---|---|
| code | String | The content to be transformed to valid HTML. Support Jade syntax |
Response
{
"code": "<body>hi</body>"
}POST /api/curlycss
Parameters
| Name | Type | Description |
|---|---|---|
| code | String | White-space formated CSS, like Stylus syntax |
Response
{
"code": "body {color: #333;}"
}| Command | Description |
|---|---|
| npm run start:server | Run server in development mode (nodemon) |
| npm run build:server | Build server for production use. (rollup) |
MIT © EGOIST