Skip to content

Commit e91e68a

Browse files
committed
Copy untyped files when building
1 parent 8cb0616 commit e91e68a

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* Copyright (c) Facebook, Inc. and its affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
const path = require('path');
9+
const fs = require('fs-extra');
10+
11+
/**
12+
* Copy all untyped and static assets files to lib.
13+
*/
14+
const srcDir = path.resolve(__dirname, 'src');
15+
const libDir = path.resolve(__dirname, 'lib');
16+
fs.copySync(srcDir, libDir, {
17+
filter(filepath) {
18+
return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath);
19+
},
20+
});

plugins/docusaurus-plugin-alumni/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "lib/index.js",
66
"types": "src/types.d.ts",
77
"scripts": {
8-
"build": "tsc",
9-
"watch": "tsc --watch",
8+
"build": "tsc && node copyUntypedFiles",
9+
"watch": "node copyUntypedFiles && tsc --watch",
1010
"postinstall": "yarn build"
1111
},
1212
"dependencies": {

0 commit comments

Comments
 (0)