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

Make example folder self-contained #340

Merged
merged 8 commits into from
Feb 11, 2024

Conversation

orangain
Copy link
Sponsor Contributor

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 the schmealint 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.

Comment on lines -31 to -33
"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",
Copy link
Sponsor Contributor Author

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.

"author": "",
"license": "ISC",
"devDependencies": {
"schemalint": "^1.1.0"
Copy link
Owner

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 "*"?

Copy link
Sponsor Contributor Author

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.

@kristiandupont
Copy link
Owner

Let me know if you agree with my comment, if not I am happy to just merge this.

@kristiandupont kristiandupont merged commit a905e0e into kristiandupont:main Feb 11, 2024
1 check passed
@kristiandupont
Copy link
Owner

🙏

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.

2 participants