Skip to content

Commit

Permalink
@uppy/locales: do not build dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon authored and aduh95 committed Apr 11, 2024
1 parent da3400f commit 2de5056
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions bin/build-bundle.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env node

import fs from 'node:fs/promises'
import path from 'node:path'
import chalk from 'chalk'

import esbuild from 'esbuild'
Expand Down Expand Up @@ -32,7 +31,6 @@ function buildBundle (srcFile, bundleFile, { minify = true, standalone = '', plu
}

await fs.mkdir(new URL('./uppy/dist', PACKAGES_ROOT), { recursive: true })
await fs.mkdir(new URL('./@uppy/locales/dist', PACKAGES_ROOT), { recursive: true })

const methods = [
buildBundle(
Expand All @@ -47,21 +45,6 @@ const methods = [
),
]

// Build minified versions of all the locales
const localesModules = await fs.opendir(new URL('./@uppy/locales/src/', PACKAGES_ROOT))
for await (const dirent of localesModules) {
if (!dirent.isDirectory() && dirent.name.endsWith('.js')) {
const localeName = path.basename(dirent.name, '.js')
methods.push(
buildBundle(
`./packages/@uppy/locales/src/${localeName}.js`,
`./packages/@uppy/locales/dist/${localeName}.min.js`,
{ minify: true },
),
)
}
}

// Add BUNDLE-README.MD
methods.push(
fs.copyFile(
Expand Down

0 comments on commit 2de5056

Please sign in to comment.