Skip to content

Commit a92e6c7

Browse files
author
Krasimir Tsonev
committed
Updating README
1 parent fc25986 commit a92e6c7

File tree

6 files changed

+39
-37
lines changed

6 files changed

+39
-37
lines changed

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
# CSSX - CSS in JavaScript
22

3-
> Generate and/or apply CSS with JavaScript.
3+
> Generate and/or apply CSS with JavaScript. Check out the demo [here](http://krasimir.github.io/cssx/playground/try-it-out/).
44
55
---
66

7-
[Demo!](http://krasimir.github.io/cssx/playground/try-it-out/)
8-
9-
---
7+
Packages:
108

119
* [cssx client-side library](./packages/cssx) ([download](./packages/cssx/lib))
12-
* [cssx-transpiler](./packages/cssx-transpiler) ([download](./packages/cssx-transpiler/lib))
10+
* [cssx-transpiler](./packages/cssx-transpiler) ([download](./packages/cssx-transpiler/lib) or `npm i cssx-transpiler`)
11+
* [gulp plugin](./packages/gulp-cssx) (`npm i gulp-cssx -D`)
12+
13+
Examples:
14+
15+
* [Try it out](./playground/try-it-out)
16+
* [Basic](./playground/basic)
17+
* [Transpiling](./playground/transpiler)
18+
* [Transpiling with gulp](./playground/transpiler-gulp)
1319

1420
---
1521

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
(function () {
2-
var _4 = {};
3-
_4['font-size'] = '20px';
4-
_4['padding'] = '0';
5-
_4['margin'] = '0';
1+
var a = (function () {
2+
var _7 = {};
3+
_7['margin'] = '6px';
4+
var _6 = {};
5+
_6['font-size'] = '20px';
6+
_6['padding'] = '0';
7+
_6['margin'] = '0';
68

7-
var _3 = cssx.s('_3');
9+
var _5 = cssx.s('_5');
810

9-
_3.add('body', _4);
11+
_5.add('body', _6);
1012

11-
return _3;
12-
}).apply(this);
13+
var _8 = _5.add('@media screen and (max-width: 200px)');
14+
15+
_8.n('body', _7);
16+
17+
return _5;
18+
}).apply(this);;

playground/transpiler-gulp/gulpfile.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
var gulp = require('gulp');
2-
var plugin = require('./plugin');
2+
var cssx = require('gulp-cssx');
3+
var plumber = require('gulp-plumber');
34

45
gulp.task('cssx', function() {
56
gulp.src('src/*.js')
6-
.pipe(plugin())
7+
.pipe(plumber())
8+
.pipe(cssx())
79
.pipe(gulp.dest('./dist/'));
810
});
911

playground/transpiler-gulp/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"author": "",
1010
"license": "ISC",
1111
"devDependencies": {
12-
"cssx-transpiler": "2.0.5",
1312
"gulp": "3.9.0",
13+
"gulp-cssx": "2.1.1",
14+
"gulp-plumber": "1.0.1",
1415
"gulp-util": "3.0.7",
1516
"map-stream": "0.0.6"
1617
}

playground/transpiler-gulp/plugin/index.js

-18
This file was deleted.

playground/transpiler-gulp/src/app.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
cssx(
1+
var a = cssx(
22
body {
33
margin: 0;
44
padding: 0;
55
font-size: 20px;
66
}
7-
)
7+
@media screen and (max-width: 200px) {
8+
body {
9+
margin: 6px;
10+
}
11+
}
12+
);

0 commit comments

Comments
 (0)