docusaurus/packages/docusaurus/copyUntypedFiles.js
Sam Zhou 5f487f3b02
refactor(v2): Convert docusaurus-core to TypeScript (#2578)
* refactor(v2): Convert docusaurus-core to TypeScript

* Update types.d.ts

Co-authored-by: Yangshun Tay <tay.yang.shun@gmail.com>
2020-04-13 02:05:46 +08:00

21 lines
536 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const path = require('path');
const fs = require('fs-extra');
/**
* Copy all untyped and static assets files to lib.
*/
const srcDir = path.resolve(__dirname, 'src');
const libDir = path.resolve(__dirname, 'lib');
fs.copySync(srcDir, libDir, {
filter(filepath) {
return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath);
},
});