You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
652 B
JavaScript
18 lines
652 B
JavaScript
import { rm, mkdir, writeFile } from 'node:fs/promises';
|
|
|
|
await rm( './build', { recursive: true, force: true } );
|
|
|
|
await mkdir( './build' );
|
|
|
|
const contents = {
|
|
'three.core.js': `export * from '../src/Three.Core.js';`,
|
|
'three.module.js': `export * from '../src/Three.js';`,
|
|
'three.tsl.js': `export * from '../src/Three.TSL.js';`,
|
|
'three.webgpu.js': `export * from '../src/Three.WebGPU.js';`,
|
|
'three.webgpu.nodes.js': `export * from '../src/Three.WebGPU.Nodes.js';`,
|
|
}
|
|
|
|
await Promise.all( Object.entries( contents ).map( ( [ filename, content ] ) =>
|
|
writeFile( `./build/${ filename }`, '// dev build\n' + content + '\n' )
|
|
) );
|