-
-
Notifications
You must be signed in to change notification settings - Fork 121
Expand file tree
/
Copy pathadd-dev-dep.cjs
More file actions
22 lines (19 loc) · 648 Bytes
/
add-dev-dep.cjs
File metadata and controls
22 lines (19 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const fs = require('fs');
fs.readFile('package.json', 'utf8', (err, data) => {
if (err) {
console.error('Error reading package.json:', err);
return;
}
let packageJson = JSON.parse(data);
packageJson.devDependencies = {
...packageJson.devDependencies,
"vue-data-ui": "file:../vue-data-ui"
};
fs.writeFile('package.json', JSON.stringify(packageJson, null, 2), 'utf8', (err) => {
if (err) {
console.error('Error writing to package.json:', err);
return;
}
console.log('-- DEV MODE : Local vue-data-ui package added successfully --');
});
});