File tree Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Expand file tree Collapse file tree 5 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ plenty more to chose from. Below is a list of addons shipped with `nano-css`.
39
39
- [ ` tachyons ` ] ( ./tachyons.md ) &mdash ; use Tachyons for rule chaining
40
40
- [ ` rtl ` ] ( ./rtl.md ) &mdash ; flips all styles RTL (right-to-left)
41
41
- [ ` extract ` ] ( ./extract.md ) &mdash ; allows extraction of CSS into external ` *.css ` style sheet
42
- - [ ` sourcemaps ` ] ( ./sourcemaps.md ) &mdash ; generates source maps in development mode
42
+ - [ ` sourcemaps ` ] ( ./sourcemaps.md ) &mdash ; generates source maps in dev mode
43
43
44
44
## Addon Installation
45
45
Original file line number Diff line number Diff line change 1
1
# ` sourcemaps ` Addon
2
2
3
- Adds sourcempas in dev mode.
3
+ Adds sourcemap support in development mode.
4
4
5
5
![ ] ( ./sourcemaps.gif )
6
6
7
- Do now use this addon in production. Check environment to exclude it from production:
7
+ Do not use this addon in production. Check environment to exclude it from production:
8
8
9
9
``` js
10
10
if (process .env .NODE_ENV !== ' production' ) {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ var addonJsx = require('../addon/jsx').addon;
14
14
var addonStyle = require ( '../addon/style' ) . addon ;
15
15
var addonStyled = require ( '../addon/styled' ) . addon ;
16
16
var addonDecorator = require ( '../addon/decorator' ) . addon ;
17
+ var addonSourcemaps = require ( '../addon/sourcemaps' ) . addon ;
17
18
18
19
exports . preset = function ( config ) {
19
20
config = config || { } ;
@@ -34,5 +35,9 @@ exports.preset = function (config) {
34
35
addonStyled ( nano ) ;
35
36
addonDecorator ( nano ) ;
36
37
38
+ if ( process . env . NODE_ENV !== 'production' ) {
39
+ addonSourcemaps ( nano ) ;
40
+ }
41
+
37
42
return nano ;
38
43
} ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ var addonAtoms = require('../addon/atoms').addon;
7
7
var addonKeyframes = require ( '../addon/keyframes' ) . addon ;
8
8
var addonRule = require ( '../addon/rule' ) . addon ;
9
9
var addonSheet = require ( '../addon/sheet' ) . addon ;
10
+ var addonSourcemaps = require ( '../addon/sourcemaps' ) . addon ;
10
11
11
12
exports . preset = function ( config ) {
12
13
var nano = create ( config ) ;
@@ -18,5 +19,9 @@ exports.preset = function (config) {
18
19
addonRule ( nano ) ;
19
20
addonSheet ( nano ) ;
20
21
22
+ if ( process . env . NODE_ENV !== 'production' ) {
23
+ addonSourcemaps ( nano ) ;
24
+ }
25
+
21
26
return nano ;
22
27
} ;
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ var addonKeyframes = require('../addon/keyframes').addon;
9
9
var addonRule = require ( '../addon/rule' ) . addon ;
10
10
var addonSheet = require ( '../addon/sheet' ) . addon ;
11
11
var addonJsx = require ( '../addon/jsx' ) . addon ;
12
+ var addonSourcemaps = require ( '../addon/sourcemaps' ) . addon ;
12
13
13
14
exports . preset = function ( config ) {
14
15
if ( process . env . NODE_ENV !== 'production' ) {
@@ -31,5 +32,9 @@ exports.preset = function (config) {
31
32
addonSheet ( nano ) ;
32
33
addonJsx ( nano ) ;
33
34
35
+ if ( process . env . NODE_ENV !== 'production' ) {
36
+ addonSourcemaps ( nano ) ;
37
+ }
38
+
34
39
return nano ;
35
40
} ;
You can’t perform that action at this time.
0 commit comments