File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,18 @@ function preparePackageFolder (pkgName) {
5959 [ '.gitignore' , '.npmignore' , 'README.md' ]
6060 . forEach ( file => cp ( `${ paths . basedir } /${ file } ` , `${ paths . package } /${ file } ` ) ) ;
6161
62- echo ( '--> Building webpack bundles...' ) ;
6362 cd ( paths . package ) ;
63+
64+ echo ( '--> Removing tests files from package folder (__tests__)' ) ;
65+ let tests = find ( '.' ) . filter ( file => file . match ( / _ _ t e s t s _ _ $ / ) ) ;
66+ if ( tests . length > 0 ) {
67+ echo ( `Found tests:\n -> ${ tests . join ( '\n -> ' ) } ` ) ;
68+ rm ( '-rf' , tests ) ;
69+ } else {
70+ echo ( `No test found.` ) ;
71+ }
72+
73+ echo ( '--> Building webpack bundles...' ) ;
6474 exec ( `npm run build` ) ;
6575
6676 echo ( '--> Building commonjs and typings using tsc...' ) ;
Original file line number Diff line number Diff line change 1313 "sourceRoot" : " _src" ,
1414 "rootDir" : " _src"
1515 },
16- "exclude" : [
17- " src/components/__tests__" ,
18- " src/__tests__"
19- ],
2016 "compileOnSave" : false ,
2117 "buildOnSave" : false ,
2218 "rules" : {
You can’t perform that action at this time.
0 commit comments