-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix #775: Introduce SASS_BINARY_SITE environment, refactor tests/api.js #847
Conversation
This pull request also includes #847; I propose we discuss refactoring of tests here - it makes no sense to introduce another PR just for commit 565ece9. including commit 31321b9 here makes sense as a justification why I needed to refactor this. Unfortunately, unlike in Gerrit Code Review, I cannot stack pull requests on top of another. If you think that |
I'll look at this post #775. |
if (site) { | ||
return [site, 'v' + package.version, sass.binaryName].join('/'); | ||
} else { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shoyldn't be possible. We should default to 'https://github.com/sass/node-sass/releases/download/v
if the users has give no proeference.
Provide ability to locally mirror node-sass binaries for various versions and platforms. SASS_BINARY_SITE needs to be an URL pointing to a collection of files organized like the Github repository. If SASS_BINARY_SITE is set to http://myhost:8080/local/node-sass-bin/ then http://myhost:8080/local/node-sass-bin/v3.0.0-beta.5/freebsd-x64-14_binding.node should point to the FreeBSD 64 bit binary for node 0.12.0 The URL can be also specified as the --sass-binary-site commandline option or in the package.json: "nodeSassConfig": { "binarySite": <url> } Remove --sass-binary-url and friends. Also change priority and use package.json defaults last, after command line arguments and the environment.
Separate testing of all configuration and runtime paramenters into a separate file. Reduce bolierplate code and use startup/teardown to restore test context. Implement additional single-parameter tests for configuration variable.
Superseded by #901. |
Improve interpolate parsing and unquote output
Factor out
tests/render.js
out oftests/api.js
,reducing boilerplate and allowing easier save and
restore of the environment.
Add tests for #775