Skip to content

Commit

Permalink
Merge pull request #13629 from apache/fix/build-scripts
Browse files Browse the repository at this point in the history
fix(build): fix some compatibility issues of build scripts in Windows.
  • Loading branch information
100pah authored Nov 17, 2020
2 parents 82b8368 + a7fc2f8 commit 1eaea81
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
Expand Down
8 changes: 4 additions & 4 deletions build/pre-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions build/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -78,4 +78,4 @@ function release() {
});
}

release();
release();
2 changes: 1 addition & 1 deletion src/util/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const fullDayFormatter = '{yyyy}-{MM}-{dd}';

export const fullLeveledFormatter = {
year: '{yyyy}',
month: '{yyyy}:{MM}',
month: '{yyyy}-{MM}',
day: fullDayFormatter,
hour: fullDayFormatter + ' ' + defaultLeveledFormatter.hour,
minute: fullDayFormatter + ' ' + defaultLeveledFormatter.minute,
Expand Down

0 comments on commit 1eaea81

Please sign in to comment.