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

Add "info": "npm-scripts-info" under scripts #870

Closed
vringar opened this issue Mar 16, 2021 · 16 comments · Fixed by #908
Closed

Add "info": "npm-scripts-info" under scripts #870

vringar opened this issue Mar 16, 2021 · 16 comments · Fixed by #908
Labels
developer-experience Workflow improvements enhancement Not a bug or a feature request extension Relates to the WebExtension written in TS and JS good-first-bug Bugs that are good for a first-time committer to tackle

Comments

@vringar
Copy link
Contributor

vringar commented Mar 16, 2021

We should probably add "info": "npm-scripts-info" under scripts as described here so that the descriptions under scripts-info can be displayed. But it's probably best if I open another PR for that as it's out of the scope of this one.

Originally posted by @boolean5 in #865 (comment)

@vringar vringar added developer-experience Workflow improvements enhancement Not a bug or a feature request extension Relates to the WebExtension written in TS and JS labels Mar 16, 2021
@vringar vringar added the good-first-bug Bugs that are good for a first-time committer to tackle label Apr 12, 2021
@Ayushsunny
Copy link
Contributor

is this still open sir @vringar ?

@vringar
Copy link
Contributor Author

vringar commented Apr 26, 2021

Hey @Ayushsunny,
Yes, this issue is still open. Do you want to work on it?

@Ayushsunny
Copy link
Contributor

Hey @Ayushsunny,
Yes, this issue is still open. Do you want to work on it?

Hello @vringar can you guide me on this? Yes I want to work on this issue

@vringar
Copy link
Contributor Author

vringar commented Apr 26, 2021

Sure :)
How familiar are you with Javascript and npm?

@Ayushsunny
Copy link
Contributor

Sure :)
How familiar are you with Javascript and npm?

Okay I'm familiar with Javascript but "npm" I am still looking for a nice tutorial

@vringar
Copy link
Contributor Author

vringar commented Apr 26, 2021

Okay, so for this change you only need a rough understanding of npm.
npm is a package manager for Node.js which is a program you can use to run Javascript outside of the browser.
We use node to run certain checks and build the WebExtension that powers the data collection in OpenWPM.

The central entry point for node and npm is the package.json file. There you define among other thingds your projects metadata, dependencies and scripts.

Scripts are tasks you want to be able to easily execute as part of your project.
As you can see in our top-level package.json we define a bunch of tasks
https://github.com/mozilla/OpenWPM/blob/cc10baebee4a0f3fbec38eeac17586448c903e60/package.json#L5-L10
And we also document what each task is supposed to do
https://github.com/mozilla/OpenWPM/blob/cc10baebee4a0f3fbec38eeac17586448c903e60/package.json#L11-L16

However right now to see the description of each task we need to look at the package.json what we want to be able to do instead is to run npm run info and see all available commands.

For this you need to add "info": "npm-scripts-info" to the scripts object in package.json and add npm-scripts-info to our dependencies.

@vringar
Copy link
Contributor Author

vringar commented Apr 26, 2021

Please feel free to ask any questions that you have

@Ayushsunny
Copy link
Contributor

For this you need to add "info": "npm-scripts-info" to the scripts object in package.jsonand add npm-scripts-info to our dependencies.

@vringar Sir in this line I didn't get that and add npm-scripts-info to our dependencies.

@vringar
Copy link
Contributor Author

vringar commented Apr 27, 2021

For that you'll need to run npm install --save-dev npm-scripts-info after you have set up the environment.

@Ayushsunny
Copy link
Contributor

Hello @vringar I have made the changes and also run this command npm install --save-dev npm-scripts-info and suddenly a new package-lock.json generated with changes.
Now what to do sir?

@vringar
Copy link
Contributor Author

vringar commented Apr 29, 2021

Please commit both the changes to package.json and package-lock.json and create a Pull Request with your changes.

@Ayushsunny
Copy link
Contributor

Ayushsunny commented Apr 29, 2021

Hello @vringar I have made a PR here
could you review please

@vringar
Copy link
Contributor Author

vringar commented Apr 29, 2021

Thank you for your PR. I'll just wait for the tests to pass and then merge it.

@Ayushsunny
Copy link
Contributor

Ayushsunny commented Apr 29, 2021

Thank you for your PR. I'll just wait for the tests to pass and then merge it.

np Sir, I wanna work more under you sir.
as a new contributor you helped me in a nice way.
Vielen Dank für Ihre Unterstützung

@vringar
Copy link
Contributor Author

vringar commented Apr 29, 2021

:) I'm always happy to help new contributors!
Do you want to work on #678 next?

@Ayushsunny
Copy link
Contributor

:) I'm always happy to help new contributors!
Do you want to work on #678 next?

yes sir, Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Workflow improvements enhancement Not a bug or a feature request extension Relates to the WebExtension written in TS and JS good-first-bug Bugs that are good for a first-time committer to tackle
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants