File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed
Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1+ /src
2+ # Created by .ignore support plugin (hsz.mobi)
Original file line number Diff line number Diff line change 22 "name" : " redux-autoform-bootstrap-ui" ,
33 "version" : " 1.0.0" ,
44 "description" : " Bootstrap UI implementation for redux-autoform" ,
5- "main" : " ./src /index.js" ,
5+ "main" : " ./lib /index.js" ,
66 "scripts" : {
7+ "build-lib" : " babel-node ./tools/build-lib.js" ,
78 "test" : " mocha ./test --compilers js:babel-register"
89 },
910 "repository" : {
4142 "babel-preset-react" : " ^6.5.0" ,
4243 "babel-preset-stage-0" : " ^6.5.0" ,
4344 "chai" : " ^3.5.0" ,
44- "mocha" : " ^2.5.3"
45+ "child-process-promise" : " ^2.0.3" ,
46+ "colors" : " ^1.1.2" ,
47+ "fs-extra-promise" : " ^0.4.0" ,
48+ "mocha" : " ^2.5.3" ,
49+ "path" : " ^0.12.7" ,
50+ "rimraf-promise" : " ^2.0.0"
4551 }
4652}
Original file line number Diff line number Diff line change 1+ import path from 'path' ;
2+ import fsep from 'fs-extra-promise' ;
3+ import rimraf from 'rimraf-promise' ;
4+ import colors from 'colors' ;
5+ import { exec } from 'child-process-promise' ;
6+
7+ const repoRoot = path . resolve ( __dirname , '../' ) ;
8+ const lib = path . join ( repoRoot , 'lib' ) ;
9+ const lessSrc = path . join ( repoRoot , '/src/less' ) ;
10+ const lessDest = path . join ( lib , '/less' ) ;
11+
12+ console . log ( 'building lib' . green ) ;
13+
14+ rimraf ( lib )
15+ . then ( function ( error ) {
16+ let babelCli = '"./node_modules/.bin/babel" src -d lib' ;
17+ return exec ( babelCli ) . fail ( function ( error ) {
18+ console . log ( colors . red ( error ) )
19+ } ) ;
20+ } )
21+ . then ( ( ) => fsep . copyAsync ( lessSrc , lessDest ) )
22+ . then ( ( ) => console . log ( 'lib built' . green ) ) ;
You can’t perform that action at this time.
0 commit comments