@idomatic/create 1.0.4 → 1.0.5

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.
package/helpers/index.js CHANGED
@@ -1,25 +1,18 @@
1
1
  const defaultConfigs = {
2
- react: {
2
+ js: {
3
3
  attributeName: "id",
4
4
  prefix: "auto-id-",
5
5
  excludeTags: ["html", "head", "script"],
6
6
  includeExtensions: ["js", "jsx", "ts", "tsx"],
7
7
  excludeFiles: [],
8
8
  },
9
- vue: {
9
+ html: {
10
10
  attributeName: "id",
11
11
  prefix: "auto-id-",
12
12
  excludeTags: ["html", "head", "script"],
13
13
  includeExtensions: ["html", "vue"],
14
14
  excludeFiles: [],
15
15
  },
16
- angular: {
17
- attributeName: "id",
18
- prefix: "auto-id-",
19
- excludeTags: ["html", "head", "script"],
20
- includeExtensions: ["html", "ng.html"],
21
- excludeFiles: [],
22
- },
23
16
  };
24
17
 
25
18
  export default defaultConfigs;
package/index.js CHANGED
@@ -3,19 +3,13 @@
3
3
  import prompts from "prompts";
4
4
  import { execSync } from "child_process";
5
5
  import { writeFileSync } from "fs";
6
+ import initConfig from "./lib/initConfig.js";
6
7
 
7
8
  console.log("✨ Welcome to idomatic setup!");
8
9
 
10
+ await initConfig();
11
+
9
12
  const res = await prompts([
10
- {
11
- type: "select",
12
- name: "framework",
13
- message: "Which framework are you using?",
14
- choices: [
15
- { title: "React (JS/TSX)", value: "js" },
16
- { title: "HTML / Vue / Angular", value: "html" },
17
- ],
18
- },
19
13
  {
20
14
  type: "toggle",
21
15
  name: "installParsers",
package/lib/initConfig.js CHANGED
@@ -6,11 +6,13 @@ import defaultConfigs from "./defaultConfigs.js";
6
6
  async function initConfig() {
7
7
  const { framework } = await inquirer.prompt([
8
8
  {
9
- type: "list",
9
+ type: "select",
10
10
  name: "framework",
11
- message: "Select your framework:",
12
- choices: ["react", "vue", "angular"],
13
- default: "react",
11
+ message: "Which framework are you using?",
12
+ choices: [
13
+ { title: "React (JS/TSX)", value: "js" },
14
+ { title: "HTML / Vue / Angular", value: "html" },
15
+ ],
14
16
  },
15
17
  ]);
16
18
 
@@ -23,4 +25,4 @@ async function initConfig() {
23
25
  console.log(`Configuration file created at ${configFilePath}`);
24
26
  }
25
27
 
26
- initConfig();
28
+ export default initConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idomatic/create",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "@idomatic/create": "./index.js"