nx/nx-dev/nx-dev/copy-tutorial.js
Isaac Mann 1d9d91110d
feat(nx-dev): tutorialkit project (#29992)
Adds a tutorial project under nx-dev
The tutorials are run in browser and can be accessed here:

[/tutorials](https://nx-dev-git-nx-dev-tutorialkit-nrwl.vercel.app/tutorials)

The tutorials include:
- TypeScript Packages
- React Monorepo
- Angular Monorepo

In the future, we will link directly from the sidebar to the in-browser
tutorials.
2025-04-09 07:14:19 -04:00

16 lines
386 B
JavaScript

const { copySync, rmSync } = require('fs-extra');
const path = require('path');
/**
* Copies the tutorial kit build artifacts
*/
rmSync(path.resolve(path.join(__dirname, 'public/tutorials')), {
recursive: true,
force: true,
});
copySync(
path.resolve(path.join(__dirname, '../tutorial/dist')),
path.resolve(path.join(__dirname, 'public/tutorials')),
{ overwrite: true }
);