改版;适配creator3.5

This commit is contained in:
Next
2022-07-17 16:48:06 +08:00
parent 9589907747
commit 63bbf81d1a
49 changed files with 1735 additions and 42594 deletions

14
scripts/package.js Normal file
View File

@@ -0,0 +1,14 @@
const AdmZip = require('adm-zip');
const path = require('path');
const fs = require('fs');
const versionPath = path.join(__dirname, '../release/preview-template/version.json');
const versionContent = fs.readFileSync(versionPath, 'utf-8');
const fileObject = JSON.parse(versionContent);
fileObject.version = new Date().toLocaleDateString();
fs.writeFileSync(versionPath, JSON.stringify(fileObject), 'utf-8');
const zip = new AdmZip();
zip.addLocalFolder(path.join(__dirname, '../release/preview-template'));
zip.writeZip(path.join(__dirname, '../release/preview-template.zip'));