Skip to content

Commit 2454a96

Browse files
tayeinteractjs-ci
authored andcommitted
chore: fix build issues
1 parent 4cded71 commit 2454a96

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

scripts/bin/bundle_shims.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
const os = require('os')
2-
const path = require('path')
32

43
const { default: PQueue } = require('p-queue')
54

65
const bundleShim = require('../shimBundler')
76
const { getShims, errorExit } = require('../utils')
87

9-
const destDir = path.join(__dirname, '..', 'dist', 'shims')
10-
118
const queue = new PQueue({ concurrency: os.cpus().length })
129

1310
const shims = getShims()
@@ -23,7 +20,7 @@ async function bundle(shimConfig) {
2320

2421
console.log(`Bundling ${source}`)
2522

26-
await bundleShim({ ...shimConfig, destDir })
23+
await bundleShim({ ...shimConfig })
2724
}
2825

2926
queue.onIdle().then((bundled) => {

scripts/bin/release.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async function runBuild() {
9696
// bundle interactjs
9797
shell.exec('npm run build:bundle')
9898
// ensure that the output is valid ES5 syntax
99-
shell.exec('acord --silent --ecma5 packages/interactjs/dist/**/*.js')
99+
shell.exec('acorn --silent --ecma5 packages/interactjs/dist/**/*.js')
100100

101101
// generate docs
102102
shell.exec('npm run build:docs')
@@ -120,7 +120,7 @@ async function runBuild() {
120120
function commit() {
121121
// commit and add new version tag
122122
shell.exec('git add --all .')
123-
shell.exec('git add --force packages dist/docs')
123+
shell.exec('git add --force packages dist/api')
124124
shell.exec('git reset **/node_modules')
125125
shell.exec(`git commit --no-verify -m ${gitTag}`)
126126
}

scripts/bundler.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ const createRollupConfigs = async ({
4444
{
4545
babelrc: false,
4646
configFile: false,
47-
browserslistConfigFile: false,
48-
targets: format === 'es' ? undefined : { ie: 9 },
47+
...(format === 'es'
48+
? {}
49+
: {
50+
browserslistConfigFile: false,
51+
targets: { ie: 9 },
52+
}),
4953
babelHelpers: 'bundled',
5054
skipPreflightCheck: true,
5155
extensions: ['.ts', '.tsx', '.js', '.jsx', '.vue'],

scripts/shimBundler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const { getModuleDirectories } = require('./utils')
77

88
const moduleDirectory = getModuleDirectories()
99

10-
module.exports = async ({ source, destDir }) => {
10+
const destDir = path.join(__dirname, '..', 'dist', 'shims')
11+
12+
module.exports = async ({ source }) => {
1113
const sourcePath = resolveSync(source, {
1214
moduleDirectory,
1315
extensions: ['.ts', '.tsx', '.js', '.jsx'],

0 commit comments

Comments
 (0)