pull/71/head
Steve Ruiz 2021-08-31 13:37:06 +01:00
rodzic fbc81620fb
commit f2ed16ff7e
3 zmienionych plików z 11 dodań i 12 usunięć

Wyświetl plik

@ -36,9 +36,11 @@ async function main() {
external: ['react', 'react-dom'],
})
fs.copyFile('./README.md', './dist/README.md', (err) => {
if (err) throw err
})
for (const file of ['package.json', 'README.md']) {
fs.copyFile(file, `dist/${file}'`, fs.constants.COPYFILE_EXCL, (err) => {
if (err) throw err
})
}
console.log(`${name}: Built package.`)
} catch (e) {

Wyświetl plik

@ -9,14 +9,6 @@ async function main() {
fs.mkdirSync('./dist')
}
fs.copyFileSync('package.json', 'dist/package.json', (err) => {
if (err) throw err
})
fs.copyFileSync('README.md', 'dist/README.md', (err) => {
if (err) throw err
})
try {
esbuild.buildSync({
entryPoints: ['./src/index.ts'],
@ -44,6 +36,12 @@ async function main() {
external: ['react', 'react-dom'],
})
for (const file of ['package.json', 'README.md']) {
fs.copyFile(file, `dist/${file}'`, fs.constants.COPYFILE_EXCL, (err) => {
if (err) throw err
})
}
console.log(`${name}: Built package.`)
} catch (e) {
console.log(`× ${name}: Build failed due to an error.`)

Wyświetl plik

@ -1,6 +1,5 @@
/* eslint-disable */
const fs = require('fs')
const path = require('path')
const esbuild = require('esbuild')
async function main() {