-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Make example folder self-contained #340
Make example folder self-contained #340
Conversation
"run-example": "node build/cli -c ./example/.schemalintrc", | ||
"start-example-db": "docker run -d --name dvd-rental -p 54321:5432 kristiandupont/dvdrental-image", | ||
"stop-example-db": "docker stop dvd-rental", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These scripts have been moved to example/package.json
. If you are using the scripts to run the example against a local version of the library, I would revert this change.
example/package.json
Outdated
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"schemalint": "^1.1.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should just be version "*"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. Using "*"
would save us the trouble of keeping up with the latest version. Update in 954dd48.
Let me know if you agree with my comment, if not I am happy to just merge this. |
🙏 |
Motivation
Currently, the instructions for running the example folder use the npm scripts that is defined in the parent folder. This makes it a bit difficult for a user to copy the contents in the example folder to their project and run it.
Instead, I would propose to create a
package.json
file in the example folder and define the npm scripts in it. I would also propose that theschmealint
library be installed from the npm registry in the example folder.This way, the user can simply copy the contents of the example folder to their project and run it. I believe this will make it easier for the user to start using the library.