react-declarative-lite
Version:
A lighter version of the react-declarative which exports the <One /> component and dependencies only and as such makes the library slightly faster and smaller. Unlike react-declarative, it doesn't provide any additional overhead like state management. For
14 lines (12 loc) • 455 B
JavaScript
const rimraf = require('rimraf');
const path = require('path');
const fs = require('fs');
if (!fs.existsSync(path.join(__dirname, '../src'))) {
try {
const package = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json')).toString())
Object.keys(package.peerDependencies).forEach((name) => {
rimraf(path.join(__dirname, `../node_modules/${name}`), () => null)
})
} catch {
}
}