n8n/scripts/trim-fe-packageJson.js
कारतोफ्फेलस्क्रिप्ट™ 1b4247498b ci: Trim FE package.json files before publishing (no-changelog)
2023-08-31 14:45:44 +02:00

13 lines
490 B
JavaScript

const { writeFileSync } = require('fs')
const { resolve } = require('path');
const baseDir = resolve(__dirname, '..');
const trimPackageJson = (packageName) => {
const filePath = resolve(baseDir, 'packages', packageName, 'package.json');
const { scripts, peerDependencies, devDependencies, dependencies, ...packageJson } = require(filePath);
writeFileSync(filePath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
}
trimPackageJson('design-system')
trimPackageJson('editor-ui')