mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
add compiled dir
This commit is contained in:
1 parent
bc838bf0f2
commit
2979fc49bc
9 files changed
+31
-3
No files matched your search
@@ -1,8 +1,12 @@
|
||||
import fs from 'fs';
|
||||
import cpy from 'cpy';
|
||||
import path from 'path';
|
||||
import prompts from 'prompts';
|
||||
import projects from './projects.js';
|
||||
import { Parcel } from '@parcel/core';
|
||||
|
||||
const compiledPath = path.resolve(`docs/compiled`);
|
||||
|
||||
async function build(name) {
|
||||
const { version } = JSON.parse(fs.readFileSync(`${projects[name]}/package.json`, 'utf-8'));
|
||||
process.chdir(projects[name]);
|
||||
@@ -43,6 +47,7 @@ async function build(name) {
|
||||
const code = banner + fs.readFileSync(filePath);
|
||||
fs.writeFileSync(filePath, code.replace(/\\n*\s*</g, '<').replace(/>\\n*\s*/g, '>'));
|
||||
fs.renameSync(filePath, newFilePath);
|
||||
await cpy(newFilePath, compiledPath);
|
||||
console.log(`✨ Built ${name} ${bundles.length} bundles in ${buildTime}ms!`);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user