Skip to content

Commit

Permalink
chore: fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
taye authored and interactjs-ci committed Dec 4, 2023
1 parent 4cded71 commit 2454a96
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
5 changes: 1 addition & 4 deletions scripts/bin/bundle_shims.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
const os = require('os')
const path = require('path')

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

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

const destDir = path.join(__dirname, '..', 'dist', 'shims')

const queue = new PQueue({ concurrency: os.cpus().length })

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

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

await bundleShim({ ...shimConfig, destDir })
await bundleShim({ ...shimConfig })
}

queue.onIdle().then((bundled) => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/bin/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function runBuild() {
// bundle interactjs
shell.exec('npm run build:bundle')
// ensure that the output is valid ES5 syntax
shell.exec('acord --silent --ecma5 packages/interactjs/dist/**/*.js')
shell.exec('acorn --silent --ecma5 packages/interactjs/dist/**/*.js')

// generate docs
shell.exec('npm run build:docs')
Expand All @@ -120,7 +120,7 @@ async function runBuild() {
function commit() {
// commit and add new version tag
shell.exec('git add --all .')
shell.exec('git add --force packages dist/docs')
shell.exec('git add --force packages dist/api')
shell.exec('git reset **/node_modules')
shell.exec(`git commit --no-verify -m ${gitTag}`)
}
Expand Down
8 changes: 6 additions & 2 deletions scripts/bundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ const createRollupConfigs = async ({
{
babelrc: false,
configFile: false,
browserslistConfigFile: false,
targets: format === 'es' ? undefined : { ie: 9 },
...(format === 'es'
? {}
: {
browserslistConfigFile: false,
targets: { ie: 9 },
}),
babelHelpers: 'bundled',
skipPreflightCheck: true,
extensions: ['.ts', '.tsx', '.js', '.jsx', '.vue'],
Expand Down
4 changes: 3 additions & 1 deletion scripts/shimBundler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ const { getModuleDirectories } = require('./utils')

const moduleDirectory = getModuleDirectories()

module.exports = async ({ source, destDir }) => {
const destDir = path.join(__dirname, '..', 'dist', 'shims')

module.exports = async ({ source }) => {
const sourcePath = resolveSync(source, {
moduleDirectory,
extensions: ['.ts', '.tsx', '.js', '.jsx'],
Expand Down

0 comments on commit 2454a96

Please sign in to comment.