提交 a7fc2f87 编写于 作者: P plainheart

fix(build): fix some compatibility issues of build scripts in Windows.(#13628)

上级 694ea432
......@@ -37,7 +37,7 @@ function preparePlugins(
// if (zrRealPath !== zrNodeModulePath) {
// include.push(zrRealPath + '/**/*.ts');
// }
include.push(zrRealPath + '/**/*.ts');
include.push(zrRealPath + '/src/**/*.ts');
if (clean) {
console.log('Built in clean mode without cache.');
......
......@@ -311,10 +311,10 @@ function transformRootFolderInEntry(entryFile, replacement) {
* Transform `zrender/src` to `zrender/esm` in all files
*/
async function transformDistributionFiles(rooltFolder, replacement) {
const files = await globby([
rooltFolder + '/**/*.js',
rooltFolder + '/**/*.d.ts',
]);
const files = await readFilePaths({
patterns: ['**/*.js', '**/*.d.ts'],
cwd: rooltFolder
});
// Simple regex replacement
// TODO More robust way?
for (let fileName of files) {
......
......@@ -19,7 +19,7 @@
* under the License.
*/
const {spawn} = require('child_process');
const spawn = require('cross-spawn');
const path = require('path');
const chalk = require('chalk');
const fsExtra = require('fs-extra');
......@@ -78,4 +78,4 @@ function release() {
});
}
release();
\ No newline at end of file
release();
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册