Skip to content

Commit

Permalink
add installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Kanishchev committed Dec 7, 2024
1 parent 2679d9b commit f39bf0a
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 128 deletions.
17 changes: 17 additions & 0 deletions installer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
var packagesFile = require('./package.json')
var { execSync } = require('child_process');

var allPackages = Object.assign(packagesFile.devDependencies, packagesFile.dependencies);
var allPackagesArray = Object.entries(allPackages);

for (var [pac, ver] of allPackagesArray) {
console.log(`npm i ${pac}@${ver}`);
if (pac === 'grunt-cli') {
execSync(`npm i -g ${pac}@${ver}`);
} else {
execSync(`npm i ${pac}@${ver}`);
}
}

// console.log(Object.entries(allPackages));
// execSync('npm i');
Loading

0 comments on commit f39bf0a

Please sign in to comment.