Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/#37 cli generate entity #125

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sanglt1902
Copy link

This PR to create a new js file to help generate entity file

To test please follow these steps.

cd  <your_workspace>/aloxide
node generate-entity.js

And then answers the questions that will be appeared on your screen to generate your entities

@sanglt1902 sanglt1902 changed the base branch from master to develop November 24, 2020 09:26
@codecov-io
Copy link

codecov-io commented Nov 24, 2020

Codecov Report

Merging #125 (701009f) into develop (f2fcf20) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #125   +/-   ##
========================================
  Coverage    95.16%   95.16%           
========================================
  Files           69       69           
  Lines         1096     1096           
  Branches       129      129           
========================================
  Hits          1043     1043           
  Misses          53       53           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2fcf20...701009f. Read the comment docs.

Copy link
Contributor

@danielvo11 danielvo11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Handle file type
if (FILE_TYPE.JSON == fileType) {
writeJSONFile(`${fullPath}.${fileType.toLowerCase()}`, aloxideEntities);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should write json file as pretty format!

const ENTITY_NAME_QUESTION = "What's your entity name?\n";
const PROP_NAME_QUESTION = "What's your property name?\n";
const PROP_TYPE_QUESTION = "What's your property type?\n";
const CONFIRM_PROP_QUESTION = "Do you want to continue create new Entity's property?\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question ask for y/n, but when I type anythings else, it still process as case n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants