feat: provide tarball (#13260)

* feat: provide tarball

* build: pack on build-assets

* chore: use ignore-walk

* chore: debug

* build: dependencies
This commit is contained in:
Acid Chicken (硫酸鶏) 2024-02-12 01:02:27 +00:00 committed by GitHub
parent 4bdaf26133
commit 3dc095d1c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 78 additions and 4 deletions

View file

@ -12,6 +12,7 @@ import * as terser from 'terser';
import { build as buildLocales } from '../locales/index.js';
import generateDTS from '../locales/generateDTS.js';
import meta from '../package.json' assert { type: "json" };
import buildTarball from './tarball.mjs';
let locales = buildLocales();
@ -77,12 +78,13 @@ async function build() {
copyBackendViews(),
buildBackendScript(),
buildBackendStyle(),
buildTarball(),
]);
}
await build();
if (process.argv.includes("--watch")) {
if (process.argv.includes('--watch')) {
const watcher = fs.watch('./locales');
for await (const event of watcher) {
const filename = event.filename?.replaceAll('\\', '/');