Skip to content

Commit

Permalink
Typescript schema (#8)
Browse files Browse the repository at this point in the history
* Rename Package

* Remove Mongoose Schema Choice, It's must

* Update Readme File

* Temporary Disable Typescript Schema Option

* Create Schema Within the root
  • Loading branch information
khattakdev authored Aug 14, 2020
1 parent 3d2d168 commit a56da04
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
19 changes: 10 additions & 9 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ async function promptForMissingOptions(options) {
// }

const questions = [];
if (!options.language) {
questions.push({
type: "list",
name: "language",
message: "Please choose which language Schema to use",
choices: ["JavaScript", "TypeScript"],
default: defaultOptions.language,
});
}
//@TODO: Temporary Disabled, Uncomment after adding Typescript Schema
// if (!options.language) {
// questions.push({
// type: "list",
// name: "language",
// message: "Please choose which language Schema to use",
// choices: ["JavaScript", "TypeScript"],
// default: defaultOptions.language,
// });
// }

questions.push({
type: "input",
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async function createSchema(options, schemaKeyValues) {
const schemaOptions = {
...options,
dirPath: path.resolve(__dirname, "../template"),
outPath: path.resolve(process.cwd(), "./models/"`./${options.schema}.js`),
outPath: path.resolve(process.cwd(), `./${options.schema}.js`),
};

console.log();
Expand Down

0 comments on commit a56da04

Please sign in to comment.