@cocreate/cli
Advanced tools
Comparing version 1.8.0 to 1.8.1
@@ -0,1 +1,8 @@ | ||
## [1.8.1](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.8.0...v1.8.1) (2021-08-22) | ||
### Bug Fixes | ||
* coc add will now add each packge in package.json ([78356a4](https://github.com/CoCreate-app/CoCreate-cli/commit/78356a4a1d755313342356061f6d486f4d13427d)) | ||
# [1.8.0](https://github.com/CoCreate-app/CoCreate-cli/compare/v1.7.5...v1.8.0) (2021-07-03) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@cocreate/cli", | ||
"version": "1.8.0", | ||
"version": "1.8.1", | ||
"description": "A simple cli component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,2 +6,4 @@ const fs = require('fs') | ||
const addMeta = require('../addMeta'); | ||
module.exports = async function updateYarnLink(repos) { | ||
@@ -25,4 +27,4 @@ let failed = []; | ||
for (let repo of repos) { | ||
await reAdd(repo.deps, repo, failed) | ||
await reAdd(repo.devDeps, repo, failed, '-D') | ||
await reAdd(repo.deps, repo, failed, '') | ||
await reAdd(repo.devDeps, repo, failed, '-D ') | ||
} | ||
@@ -35,7 +37,11 @@ return failed; | ||
async function reAdd(deps, repo, failed, param = '') { | ||
for (let dep of deps) { | ||
console.log(`yarn add ${dep}`) | ||
try { | ||
let exitCode = await spawn(`yarn`, ['add', ...param && [param], dep], { | ||
if(!deps.length) | ||
return; | ||
deps.unshift("add") | ||
let packageList = deps; | ||
console.log('add ', deps.join(' ')) | ||
console.log(`running: ${repo.name}`) | ||
// let exitCode = await spawn(`yarn`, ['add', ...param && [param], packageList], { | ||
let exitCode = await spawn( 'yarn', packageList, { | ||
cwd: repo.ppath, stdio: 'inherit', | ||
@@ -46,5 +52,5 @@ }); | ||
name: repo.name, | ||
des: `yarn add ${param} ${dep}` | ||
des: `yarn add ${param} ${packageList}` | ||
}) | ||
console.error(`${repo.name}: yarn add ${param} ${dep}`.red) | ||
console.error(`${repo.name}: yarn add ${param} ${packageList}`.red) | ||
} | ||
@@ -61,2 +67,2 @@ } | ||
} | ||
@@ -43,3 +43,3 @@ const colors = require('colors'); | ||
} = repo; | ||
console.log(`running ${name}: ${command} `) | ||
console.log(`running ${name}: ${command} `.green) | ||
let exitCode; | ||
@@ -46,0 +46,0 @@ if (config.hideMessage) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1902
90618