diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cef05f..359223a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. This projec to [Semantic Versioning](http://semver.org/). This changelog was generated with [github_changelog_generator](https://github.com/marketplace/actions/generate-changelog). +## [0.1.1-alpha-0] - 2023-02-18 + +### Features +- [x] `Library` & `Single Component` mode enabled + +## Changed +- Bumped `package.json` version to `0.1.1-alpha-0` + + ## [0.1.0-alpha-5] - 2023-02-11 ### Fixed diff --git a/built/lib/cli-user-options.d.ts b/built/lib/cli-user-options.d.ts index 89c9285..e8bf421 100644 --- a/built/lib/cli-user-options.d.ts +++ b/built/lib/cli-user-options.d.ts @@ -9,14 +9,6 @@ declare const inquirerUserOptions: ({ default?: undefined; validate?: undefined; filter?: undefined; -} | { - type: string; - name: string; - message: string; - choices: string[]; - default?: undefined; - validate?: undefined; - filter?: undefined; } | { type: string; name: string; diff --git a/built/lib/cli-user-options.js b/built/lib/cli-user-options.js index 2f03790..e6123fb 100644 --- a/built/lib/cli-user-options.js +++ b/built/lib/cli-user-options.js @@ -13,7 +13,10 @@ const inquirerUserOptions = [ type: "list", name: "type", message: "Is this a single component or a library?", - choices: ["Single Component"], + choices: [ + { name: "Single Component", value: "component" }, + { name: "Library", value: "library" }, + ], // filter(val) { // return val.toLowerCase(); // }, diff --git a/built/lib/create-files.js b/built/lib/create-files.js index ea32239..aec9860 100644 --- a/built/lib/create-files.js +++ b/built/lib/create-files.js @@ -31,6 +31,7 @@ const createFile = (options, replaceData) => { newOptions.componentNamePascalCase = Case.pascal(newOptions.componentName); newOptions.componentNameKebabCase = Case.kebab(newOptions.componentName); newOptions.ts = newOptions.language === "ts"; + newOptions.component = newOptions.type === "component"; // read any file src/vite.config.js const file = path.resolve(installFromStubsPath, replaceData.target.directory, replaceData.stubName); const replace = fs.readFileSync(file, { encoding: "utf-8" }); diff --git a/lib/cli-user-options.ts b/lib/cli-user-options.ts index 78fbb89..d0c28f7 100644 --- a/lib/cli-user-options.ts +++ b/lib/cli-user-options.ts @@ -14,7 +14,10 @@ const inquirerUserOptions = [ type: "list", name: "type", message: "Is this a single component or a library?", - choices: ["Single Component"], + choices: [ + { name: "Single Component", value: "component" }, + { name: "Library", value: "library" }, + ], // filter(val) { // return val.toLowerCase(); // }, diff --git a/lib/create-files.ts b/lib/create-files.ts index d1b79b8..92fe04e 100644 --- a/lib/create-files.ts +++ b/lib/create-files.ts @@ -37,6 +37,7 @@ const createFile = (options, replaceData) => { newOptions.componentNamePascalCase = Case.pascal(newOptions.componentName); newOptions.componentNameKebabCase = Case.kebab(newOptions.componentName); newOptions.ts = newOptions.language === "ts"; + newOptions.component = newOptions.type === "component"; // read any file src/vite.config.js const file = path.resolve( diff --git a/package.json b/package.json index 4d08770..9113fd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-sfc-vite", - "version": "0.1.0-alpha-5", + "version": "0.1.1-alpha-0", "description": "Vue SFC Vite is a Vue 3 SFC template for Vite", "keywords": [ "vue", diff --git a/stubs/src/App.vue.ejs b/stubs/src/App.vue.ejs index 82c1a2b..7ed3119 100644 --- a/stubs/src/App.vue.ejs +++ b/stubs/src/App.vue.ejs @@ -1,5 +1,5 @@