Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Improve docs for contributing #1257

Closed
JohnAlbin opened this issue Nov 11, 2015 · 3 comments
Closed

Improve docs for contributing #1257

JohnAlbin opened this issue Nov 11, 2015 · 3 comments

Comments

@JohnAlbin
Copy link
Contributor

Most of the contributing docs are great. But since node-sass requires a binary of libSass being built, if you want to contribute a fix to node-sass's code, it requires "rebuilding the bindings" either due to node-sass binding code or a new libSass release.

And the docs don't explain how to do that.

For example, 3rd-party importers for node-sass are currently broken with node-sass 3.4.1. This #1220 issue may have fixed the problem. But this #1248 issue may have introduced more problems? I don't know and I can't help out because I don't know how to get started with this kind of bugfix.

  • How do I rebuild the binding.cpp that was updated?
  • If I need to bumb libsass to a newer version, how do I build it and get node-sass to use it? (Also, if I install node-sass locally in a project (npm without -g) is libSass still global?)

(I put "rebuilding the bindings" in quotes since I don't really understand/know what needs to be done and may be using completely wrong wording.)

And, unfortunately, I can't find any contributing docs for https://github.com/sass/libsass

Also, thanks for having a CONTRIBUTING.md doc! I need to add them to my own open-source repositories.

@xzyfer
Copy link
Contributor

xzyfer commented Nov 11, 2015

Thanks for the discussion @JohnAlbin. Much of the this has been covered sporadically within issues in the past. Being the maintainers makes it can be hard for us to create documentation that's newcommer friendly.

We're very open to pull requests improving documentation. Feel to ask any specific question you might have.

How do I rebuild the binding.cpp that was updated?

node scripts/build.js -f

If I need to bump libsass to a newer version, how do I build it and get node-sass to use it?

There a couple was to do this. LibSass is a submodule of node-sass so you can bump the commit of the submodule.

cd src/libsass
git fetch
git checkout <commit>

Then you need to rebuild the binary as show above.

if I install node-sass locally in a project (npm without -g) is libSass still global?

No. Just like any node module installing locally only makes it local. You can install LibSass globally using brew (on osx), and some other os specific package mangers.

@JohnAlbin
Copy link
Contributor Author

Thanks! I'll start writing updates to CONTRIBUTING.md as I get things working and then do a PR.

@JohnAlbin
Copy link
Contributor Author

Thanks for your help, @xzyfer! PR is over here: #1264

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants