Skip to content

Commit 67ba475

Browse files
committed
Update packages
1 parent 5d3c5f6 commit 67ba475

File tree

7 files changed

+3583
-3726
lines changed

7 files changed

+3583
-3726
lines changed

fed-mini-modules.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
const fse = require('fs-extra');
2-
const glob = require('glob');
2+
const { globSync } = require('glob');
33
const path = require('path');
44

55
const root = process.cwd();
66

7-
const sourceFiles = glob
8-
.sync(`${root}/src/*/`)
7+
const sourceFiles = globSync(`${root}/src/*/`)
98
.map((name) => name.replace(/\/$/, ''));
109

11-
const indexTypings = glob.sync(`${root}/src/index.d.ts`);
10+
const indexTypings = globSync(`${root}/src/index.d.ts`);
1211

1312
async function copyTypings(files, dest) {
1413
const cmds = [];
@@ -21,7 +20,7 @@ async function copyTypings(files, dest) {
2120

2221
async function createPackage(file) {
2322
const fileName = file.split('/').pop();
24-
const esmSource = glob.sync(`${root}/esm/${fileName}/**/index.js`)[0];
23+
const esmSource = globSync(`${root}/esm/${fileName}/**/index.js`)[0];
2524
/**
2625
* Prevent creating package.json for directories with no JS files (like CSS directories)
2726
*/
@@ -36,7 +35,7 @@ async function createPackage(file) {
3635
main: 'index.js',
3736
module: esmRelative,
3837
};
39-
const typings = glob.sync(`${root}/src/${fileName}/*.d.ts`);
38+
const typings = globSync(`${root}/src/${fileName}/*.d.ts`);
4039
const cmds = [];
4140
content.typings = 'index.d.ts';
4241
cmds.push(copyTypings(typings, `${root}/${fileName}`));
@@ -56,6 +55,7 @@ async function run(files) {
5655
copyTypings(indexTypings, root);
5756
}
5857
} catch (error) {
58+
// eslint-disable-next-line no-console
5959
console.error(error);
6060
process.exit(1);
6161
}

0 commit comments

Comments
 (0)