@duetds/cli 2.8.9 → 2.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duetds/cli",
3
- "version": "2.8.9",
3
+ "version": "2.8.12",
4
4
  "description": "This package includes Duet Design System CLI.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "LocalTapiola Services Ltd <duetdesignsystem@lahitapiola.fi>",
@@ -22,15 +22,15 @@
22
22
  "test:ci": "echo no cli tests yet"
23
23
  },
24
24
  "dependencies": {
25
- "arg": "5.0.1",
26
- "chalk": "5.0.0",
25
+ "arg": "4.1.3",
26
+ "chalk": "3.0.0",
27
27
  "esm": "3.2.25",
28
- "inquirer": "8.2.0",
28
+ "inquirer": "7.2.0",
29
29
  "listr": "0.14.3",
30
30
  "ncp": "2.0.0"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "4851e284bed53896d17c7c30155bea8deb641530"
35
+ "gitHead": "4c498b16e435964588d9e33a70cb35b97ab9dc60"
36
36
  }
package/src/index.js CHANGED
@@ -1,15 +1,17 @@
1
1
  import arg from "arg"
2
2
  import fs from "fs"
3
3
  import inquirer from "inquirer"
4
+ import path from "path"
4
5
 
5
6
  import { createProject } from "./main"
6
7
 
7
8
  const isVersioned = ["angular", "react", "eleventy","eleventy-ssr","html"]
8
9
  const versionObject = isVersioned.reduce((a, v) => ({ ...a, [v]: v}), {})
9
10
  // load directory names of /templates/
11
+ const templateDir = path.resolve(__dirname, "..", "templates")
10
12
  for (const [key, value] of Object.entries(versionObject)) {
11
- const versions = fs.readdirSync(`./templates/${key}`).filter(f => !f.startsWith("."))
12
- versionObject[key] =versions
13
+ const versions = fs.readdirSync(`${templateDir}/${key}`).filter(f => !f.startsWith("."))
14
+ versionObject[key] = versions
13
15
  }
14
16
 
15
17
  function parseArgumentsIntoOptions(rawArgs) {