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
10 lines
370 B
JavaScript
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);
|