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

Install and use Rollup locally #2720

Closed
1 of 4 tasks
mesqueeb opened this issue Feb 25, 2019 · 10 comments · Fixed by #2995
Closed
1 of 4 tasks

Install and use Rollup locally #2720

mesqueeb opened this issue Feb 25, 2019 · 10 comments · Fixed by #2995

Comments

@mesqueeb
Copy link
Contributor

mesqueeb commented Feb 25, 2019

Documentation Is:

  • Missing
  • Needed
  • Confusing
  • Not Sure?

Please Explain in Detail...

The documentation says here:

(later on we'll learn how to install it locally to your project so that your build process is portable, but don't worry about that yet)

However, I searched and searched and couldn't find anywhere in the documentation that explains how to do this! 😂

Your Proposal for Changes

Add a section on how to install and use rollup in a project locally.

Other

(PS: I'm also having a hard time finding how to do this on Google even! If anyone can help me out with some sweet advice, that would be great!! 🎯)

@ashubham
Copy link

You can use this project as a starter https://github.com/rollup/rollup-starter-app

Basically,
npm i --save-dev rollup This will install it locally in your node_modules
Now you can run it:
./node_modules/.bin/rollup -c OR you can add a script in the package.json as mentioned in the package.json of the above project.

@ScottA38
Copy link

@ashubham your suggestion was very helpful to me but I also just found that you can run node exectuables more cleanly with npx --no-install [executable] (so npx --no-install rollup).

Technically this is off-topic as I arrived here due to the same issue as @mesqueeb explained but anyway..

@mesqueeb
Copy link
Contributor Author

What does --no-install do? 👨🏻‍🚀

BTW, I still believe that the Rollup docs should be updated !!! It's been almost an entire quarter of a year.

Anyway I could help make a PR?

@lukastaegert
Copy link
Member

Anyway I could help make a PR?

Yes, please! At the moment, this project is solely maintained by people who work on it in their spare time. Helping with documentation is an easy way to contribute that makes a big difference and is very much appreciated!

@ScottA38
Copy link

ScottA38 commented May 15, 2019

@mesqueeb npx searches for a node executable locally and if it can't find it tries to download it by default.

In order to prevent it from downloading unwanted packages/versions via your project's scripts or if you happen to be outside of the correct npm directory for a moment it is a safety net to use --no-install to prevent automatic install

Also if you are happy to make a PR I would be grateful, I am still really learning about how rollup actually works so I'm not sure I would be qualified for it :O

mesqueeb added a commit to mesqueeb/rollup that referenced this issue Jul 13, 2019
@mesqueeb
Copy link
Contributor Author

mesqueeb commented Jul 13, 2019

hi everyone. I added the PR! see #2995

greatly appreciate your review 🐶

@mesqueeb
Copy link
Contributor Author

@ashubham
This comment says that your proposed method of using rollup locally is not correct:
#2995 (comment)

and mentions down below another method:
#2995 (comment)

Can you please advise on how I should update my PR, since I originally used the info you gave me in this thread.

I'd like to get this PR merged, because Rollup has had this written in the docs:

(later on we'll learn how to install it locally to your project so that your build process is portable, but don't worry about that yet)

For several years, but still has 0 information on how to do this...... I'm sure a lot of newer developers need some extra help on this!!!

@ashubham
Copy link

@mesqueeb What @TrySound suggested on the Thread is better and is portable/future proof. So I would suggest going with npm run rollup instead of node_modules/.bin/rollup

shellscape pushed a commit that referenced this issue Aug 11, 2019
* Add info how to install locally

Fixes #2720

* typo 🦋

* change "./node_modules/.bin/rollup" with "rollup" 💎

* change `npm run` with `npx` 🙈

* docs: update verbiage and apply suggestions
@mesqueeb
Copy link
Contributor Author

Shellscape thanks so much. I can't wait until this goes live !!!

@shellscape
Copy link
Contributor

@mesqueeb thank you for starting the PR!

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 a pull request may close this issue.

5 participants