Include the full build in the ol package

This commit is contained in:
Tim Schaub
2022-08-28 13:02:23 -05:00
parent 96ffd4113f
commit 219fb093c1
5 changed files with 35 additions and 10 deletions

View File

@@ -5,6 +5,8 @@ import {fileURLToPath} from 'url';
const baseDir = dirname(fileURLToPath(import.meta.url));
const buildDir = path.resolve(baseDir, '../build/ol');
const fullBuildSource = path.resolve(baseDir, '../build/full/ol.js');
const fullBuildDest = path.join(buildDir, 'dist/index.js');
async function main() {
const pkg = await fse.readJSON(path.resolve(baseDir, '../package.json'));
@@ -37,6 +39,9 @@ async function main() {
path.resolve(baseDir, '../LICENSE.md'),
path.join(buildDir, 'LICENSE.md')
);
await fse.ensureDir(dirname(fullBuildDest));
await fse.copyFile(fullBuildSource, fullBuildDest);
}
/**