File tree 4 files changed +14
-19
lines changed
4 files changed +14
-19
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,5 @@ build/Release
25
25
# Dependency directory
26
26
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27
27
node_modules
28
+
29
+ dist /
Original file line number Diff line number Diff line change
1
+ # Generated by dmn (https://github.com/inikulin/dmn)
2
+
3
+ .git *
4
+ .npmignore
5
+ test /
6
+ src /
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
- var path = require ( 'path' ) ;
4
-
5
- var escape = function ( str ) {
6
- return str . replace ( / [ \[ \] \/ { } ( ) * + ? . \\ ^ $ | - ] / g, '\\$&' ) ;
7
- } ;
8
-
9
- var regexp = [ 'src' , 'test' ] . map ( function ( i ) {
10
- return '^' + escape ( path . join ( __dirname , i ) + path . sep ) ;
11
- } ) . join ( '|' ) ;
12
-
13
- require ( 'babel/register' ) ( {
14
- only : new RegExp ( '(' + regexp + ')' ) ,
15
- ignore : false ,
16
- loose : 'all'
17
- } ) ;
18
-
19
- module . exports = require ( './src' ) ;
3
+ module . exports = require ( './dist' ) ;
Original file line number Diff line number Diff line change 4
4
"description" : " A require hook to compile CSS Modules on the fly" ,
5
5
"main" : " index.js" ,
6
6
"dependencies" : {
7
- "babel" : " ^5.8.20" ,
8
7
"postcss" : " ^4.1.16" ,
9
8
"postcss-modules-extract-imports" : " 0.0.5" ,
10
9
"postcss-modules-local-by-default" : " 0.0.9" ,
11
10
"postcss-modules-scope" : " 0.0.8"
12
11
},
13
12
"devDependencies" : {
13
+ "babel" : " ^5.8.20" ,
14
14
"css-modules-loader-core" : " 0.0.12" ,
15
+ "in-publish" : " ^2.0.0" ,
15
16
"mocha" : " ^2.2.5"
16
17
},
17
18
"scripts" : {
18
- "test" : " mocha --compilers js:babel/register"
19
+ "test" : " npm run -s build && mocha --compilers js:babel/register" ,
20
+ "build" : " babel src --out-dir dist" ,
21
+ "prepublish" : " in-publish && npm run -s build || in-install"
19
22
},
20
23
"repository" : {
21
24
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments