File tree 6 files changed +39
-37
lines changed
playground/transpiler-gulp
6 files changed +39
-37
lines changed Original file line number Diff line number Diff line change 1
1
# CSSX - CSS in JavaScript
2
2
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/ ) .
4
4
5
5
---
6
6
7
- [ Demo!] ( http://krasimir.github.io/cssx/playground/try-it-out/ )
8
-
9
- ---
7
+ Packages:
10
8
11
9
* [ 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 )
13
19
14
20
---
15
21
Original file line number Diff line number Diff line change 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' ;
6
8
7
- var _3 = cssx . s ( '_3 ' ) ;
9
+ var _5 = cssx . s ( '_5 ' ) ;
8
10
9
- _3 . add ( 'body' , _4 ) ;
11
+ _5 . add ( 'body' , _6 ) ;
10
12
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 ) ; ;
Original file line number Diff line number Diff line change 1
1
var gulp = require ( 'gulp' ) ;
2
- var plugin = require ( './plugin' ) ;
2
+ var cssx = require ( 'gulp-cssx' ) ;
3
+ var plumber = require ( 'gulp-plumber' ) ;
3
4
4
5
gulp . task ( 'cssx' , function ( ) {
5
6
gulp . src ( 'src/*.js' )
6
- . pipe ( plugin ( ) )
7
+ . pipe ( plumber ( ) )
8
+ . pipe ( cssx ( ) )
7
9
. pipe ( gulp . dest ( './dist/' ) ) ;
8
10
} ) ;
9
11
Original file line number Diff line number Diff line change 9
9
"author" : " " ,
10
10
"license" : " ISC" ,
11
11
"devDependencies" : {
12
- "cssx-transpiler" : " 2.0.5" ,
13
12
"gulp" : " 3.9.0" ,
13
+ "gulp-cssx" : " 2.1.1" ,
14
+ "gulp-plumber" : " 1.0.1" ,
14
15
"gulp-util" : " 3.0.7" ,
15
16
"map-stream" : " 0.0.6"
16
17
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- cssx (
1
+ var a = cssx (
2
2
body {
3
3
margin : 0 ;
4
4
padding: 0 ;
5
5
font - size : 20 px ;
6
6
}
7
- )
7
+ @media screen and ( max - width : 200 px ) {
8
+ body {
9
+ margin: 6 px ;
10
+ }
11
+ }
12
+ ) ;
You can’t perform that action at this time.
0 commit comments