angular-cn/aio/tools/example-zipper/generateZips.mjs
George Kalpakas 662addb355 build(docs-infra): switch the generate-stackblitz/zips scripts to ESM (#42921)
Switch the JS scripts used for generating StackBlitz projects and zips
from CommonJS to ESM format. This is necessary for upgrading the
`globby` dependency to [version 12.0.0][1] in a subsequent commit.

[1]: https://github.com/sindresorhus/globby/releases/v12.0.0

PR Close #42921
2021-07-23 10:37:35 -07:00

10 lines
370 B
JavaScript

import path from 'canonical-path';
import {fileURLToPath} from 'url';
import {ExampleZipper} from './exampleZipper.mjs';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const EXAMPLES_PATH = path.join(__dirname, '../../content/examples');
const ZIPS_PATH = path.join(__dirname, '../../src/generated/zips');
new ExampleZipper(EXAMPLES_PATH, ZIPS_PATH);