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

Switch from bower to npm #63

Closed
sbussard opened this issue Oct 10, 2015 · 8 comments
Closed

Switch from bower to npm #63

sbussard opened this issue Oct 10, 2015 · 8 comments

Comments

@sbussard
Copy link
Contributor

As a developer I would like to remove the bower dependency so there will be fewer moving parts and things will be easier to keep track of.

@ryanlelek
Copy link
Owner

Hi @sbussard,

Where is bower a dependency? I looked in the main Raneto repository as well as its package.json but don't see Bower listed anywhere. I'm still familiarizing myself with the project so I might have missed it.

@ryanlelek ryanlelek reopened this Oct 10, 2015
@vyp
Copy link
Contributor

vyp commented Oct 11, 2015

@ryanlelek https://github.com/gilbitron/Raneto/tree/master/public/bower_components. Although I'm not sure if npm can fulfill what bower does.

@ryanlelek
Copy link
Owner

Ahhh, thanks for that @vyp. I was looking in the project root for bower_components/ and bower.json. Didn't even occur to me to look in public/. You're right, Bower is pretty critical to this project.

@sbussard, Raneto is currently targeting a standalone installation on a subdomain or path URL, where all documentation is stored. Can you share your particular use-case with us so we can help find a solution for you?

Regardless, I'll run through the bower_components/ directory and get those modules and versions codified in a bower.json configuration file for documentation and easier upgrades + modifications.

@vyp
Copy link
Contributor

vyp commented Oct 11, 2015

Yeah normally I think the bower_components is under the root directory. But if not, I think there's usually a .bowerrc in the root directory specifying where the bower_components is. But it's been a while since I've used bower, so my knowledge may be rusty or not up to date.

@ryanlelek
Copy link
Owner

Still spot on @vyp , that's exactly how to do it.
Bower configuration bower.json has been added in v0.7.1 in addition to having all module dependencies upgraded to the latest version.

@sbussard, Could you and share more about your situation? I'm fine with removing Bower if it makes sense. Unfortunately, most Bower modules are not available on NPM because each targets and caters to a different audience. Open to simplification, but I don't yet see how we can remove Bower easily.

@ryanlelek ryanlelek added wontfix help-wanted Please join the discussion pending Pending Close. Respond and removed wontfix help-wanted Please join the discussion labels Oct 12, 2015
@sbussard
Copy link
Contributor Author

npm has grown substantially and it has most front end libraries. To use npm for front end packages you'll probably need to use a build system like grunt, gulp or webpack (my favorite). The simplest approach would probably be to use gulp and just have it copy specific files from node_modules to public.

To avoid having to install gulp globally you would change this line in package.json:

"postinstall": "npm update && ./node_modules/.bin/bower install"
to
"postinstall": "npm update && node_modules/gulp/bin/gulp.js"

Now I digress.

Almost all (if not all) of what Raneto does can be done through a build script to generate a static site, which would be extremely easy to deploy and scale. The advantage of running a node server is that it could be used to author new content. So in a larger scope, I would like to see this project move in that direction — run a server locally (or publicly with authentication) to author content, then build a static site to deploy.

@sbussard
Copy link
Contributor Author

I created a PR for this #64

@sbussard
Copy link
Contributor Author

Thanks for accepting my PR!

@ryanlelek ryanlelek removed the pending Pending Close. Respond label Jan 31, 2016
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

No branches or pull requests

3 participants