Skip to content

Commit 3a807f9

Browse files
committed
chore(package): remove tests files from package
1 parent 68ebd4c commit 3a807f9

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

scripts/package.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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(/__tests__$/));
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...');

tsconfig.build.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
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": {

0 commit comments

Comments
 (0)