"types": "lib/index.d.ts",
"scripts": {
"build": "yarn lint && yarn ts-check && vite build",
+ "build:no-checks": "vite build",
"build-release": "yarn install --immutable && yarn build",
"lint": "eslint --ext js,ts,tsx,snap src",
"lint-report-ci": "yarn install --immutable && eslint --ext js,ts,tsx -f json -o eslint-report/eslint-report.json src || yarn lint",
},
"scripts": {
"start": "node scripts/start.js",
+ "start:force": "node scripts/start.js --force-build-design-system",
"build": "node scripts/build.js",
"build-release": "yarn install --immutable && node scripts/build.js release",
"test": "jest",
const chalk = require('chalk');
const { spawn } = require('child_process');
-function buildDesignSystem(callback) {
+function buildDesignSystem({ callback, force } = {}) {
process.chdir(`${__dirname}/..`);
- const build = spawn('npx', ['turbo', 'run', 'design-system#build']);
+ const build = spawn('npx', [
+ 'turbo',
+ 'run',
+ ...(force ? ['--force'] : []),
+ 'design-system#build:no-checks',
+ ]);
build.stdout.on('data', (data) => {
console.log(chalk.green.bold(data.toString()));
});
}
+const forceBuildDesignSystem = process.argv.includes('--force-build-design-system');
+
async function run() {
console.log('starting...');
const esbuildContext = await esbuild.context(config);
.catch((e) => console.error(e));
}
-buildDesignSystem(run);
+buildDesignSystem({ callback: run, force: forceBuildDesignSystem });
chokidar
.watch('./design-system/src', {
ignored: /(^|[/\\])\../, // ignore dotfiles
persistent: true,
})
- .on('change', () => buildDesignSystem());
+ .on('change', () => buildDesignSystem({ force: true }));
"pipeline": {
"design-system#build": {
"outputs": ["lib/**"]
+ },
+ "design-system#build:no-checks": {
+ "outputs": ["lib/**"]
}
}
}