123456789101112131415161718192021222324 |
- const util = require('util');
- const child_process = require('child_process');
- const exec = util.promisify(child_process.exec);
- const fs = require('fs-extra')
- const path = require('path')
- const PATH = `./.laser-lib-path`
- const buildPaths = [
- `build`,
- ...fs.existsSync(PATH) ? [fs.readFileSync(PATH).toString()] : []
- ]
- 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`);
|