Skip to content

Commit

Permalink
fix: upgrade main deps and update cosmiconfig usage
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenyulin committed Sep 27, 2021
1 parent 022dda0 commit 3949a2e
Show file tree
Hide file tree
Showing 6 changed files with 181 additions and 1,715 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-push
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

make lint type-check test-coverage
16 changes: 8 additions & 8 deletions package.json
Expand Up @@ -8,14 +8,14 @@
"access": "public"
},
"dependencies": {
"@octokit/rest": "^17.9.2",
"commander": "^5.1.0",
"cosmiconfig": "^6.0.0",
"cpy": "^8.1.0",
"inquirer": "^7.1.0",
"jsonfile": "^6.0.1",
"node-vault": "^0.9.15",
"replace-in-file": "^6.0.0",
"@octokit/rest": "^18.11.1",
"commander": "^8.2.0",
"cosmiconfig": "^7.0.1",
"cpy": "^8.1.2",
"inquirer": "^8.1.5",
"jsonfile": "^6.1.0",
"node-vault": "^0.9.22",
"replace-in-file": "^6.2.0",
"write-yaml": "^1.0.0"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/actions/common-steps.js
@@ -1,4 +1,4 @@
import cosmiconfig from 'cosmiconfig';
import { cosmiconfig } from 'cosmiconfig';
import { exec } from 'lib/child-process';

// TODO: setup schema and sanitise config file
Expand All @@ -11,6 +11,7 @@ export const readConfig = async () => {
export const cloneTemplateRepo = async (config) => {
const DEFAULT_TEMPLATE = `opbi/ncm-preset-${config.component.type}`;
const template = config.component.template || DEFAULT_TEMPLATE;
await exec(`echo template: ${template}`);
await exec(`rm -rf .template`);
await exec(`git clone git@github.com:${template}.git .template`);
};
Expand Down

0 comments on commit 3949a2e

Please sign in to comment.