Browse Source

fix: 更换打包方式

bill-lai 3 years ago
parent
commit
348e06e0e4
2 changed files with 10 additions and 1 deletions
  1. BIN
      .DS_Store
  2. 10 1
      main.js

BIN
.DS_Store


+ 10 - 1
main.js

@@ -10,6 +10,15 @@ const buildPaths = [
 	...fs.existsSync(PATH) ? [fs.readFileSync(PATH).toString()] : []
 ]
 
-buildPaths.forEach(d => fs.emptyDirSync(path.resolve(__dirname, d)))
+buildPaths.forEach(d => {
+	const potreeDir = path.resolve(__dirname, d, 'potree')
+	const shadersDir = path.resolve(__dirname, d, 'shaders')
+	if (fs.existsSync(potreeDir)) {
+		fs.emptyDirSync(potreeDir)
+	}
+	if (fs.existsSync(shadersDir)) {
+		fs.emptyDirSync(shadersDir)
+	}
+})
 
 exec(`yarn build-c`);