angular-cn/aio/tools/stackblitz-builder/generateStackblitz.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
393 B
JavaScript

import {dirname, join} from 'path';
import {fileURLToPath} from 'url';
import {StackblitzBuilder} from './builder.mjs';
const __dirname = dirname(fileURLToPath(import.meta.url));
const EXAMPLES_PATH = join(__dirname, '../../content/examples');
const LIVE_EXAMPLES_PATH = join(__dirname, '../../src/generated/live-examples');
new StackblitzBuilder(EXAMPLES_PATH, LIVE_EXAMPLES_PATH).build();