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

Developer Quick Start Command Lines in ReadMe.md #913

Open
dj-kmuldoon opened this issue Aug 10, 2023 · 1 comment
Open

Developer Quick Start Command Lines in ReadMe.md #913

dj-kmuldoon opened this issue Aug 10, 2023 · 1 comment
Labels
triage This issue will be reviewed by the team

Comments

@dj-kmuldoon
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

As a developer who does not code daily in NewsKit rep, it would be helpful to provide a list of common commands in the ReadMe.md to allow me to quickly do basic tasks. The package.json file has 72 commands and difficult to know which to run or next steps required.

Describe the solution you'd like

  1. Document how to run the documentation site locally (with the URL we need to launch in the browser)
  2. Document how to run specific tests (running all will run out of memory).
  3. Best practice to implement dark-mode in your app (perhaps a link to the doc site that describes)
  4. More to come, I'm sure.

Describe alternatives you've considered

Developers who are not day-to-day familiar with NewsKit could store commands in a code snippet manager, but seems unlikely that would be scalable.

Additional context

A Dow Jones developer asked about how to implement dark-mode in the NewsKit way, and I had difficulty finding basic commands to verify I was giving the correct information. Additionally, with a quick start command line documentation, the developer could have self-discovered the answers needed.

@dj-kmuldoon dj-kmuldoon added the triage This issue will be reviewed by the team label Aug 10, 2023
@mutebg
Copy link
Contributor

mutebg commented Aug 14, 2023

Hey @dj-kmuldoon here is a list of npm scripts -> https://github.com/newscorp-ghfb/NewsKit/blob/main/docs/scripts.md
We need to make this more evident so it is not so difficult to find.

Quick answers to you questions:
1 -> If you want to run site locally it is dev:docs I think the console/terminal will show you the URL ( http://localhost:8081/ )

2 -> About that we rely on jest, for example, you can run "yarn test:unit:watch" which will run all unit tests in "watch" mode, which means every time you update test or file it will run only related tests. You can also press "P" and it will show you Usage menu where you can filter or execute other commands
Screenshot 2023-08-14 at 9 48 45

3 -> I guess this is up to the developers, I personally don't think there is best "practice" about it, at the end of the day for devs is just switching 2 themes. There are too many variables for how to do that like do you rely on OS theme, do you give option to user to switch it, if so where do you save the current theme like, cooking, localstorage, user preferences?

Happy to discuss in more details any of these and help with improving docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This issue will be reviewed by the team
Projects
None yet
Development

No branches or pull requests

2 participants