-
-
Notifications
You must be signed in to change notification settings - Fork 123
Expand file tree
/
Copy pathadd-dev-dep.cjs
More file actions
29 lines (26 loc) · 744 Bytes
/
add-dev-dep.cjs
File metadata and controls
29 lines (26 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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 --',
);
},
);
});