Initial commit
[yaffs-website] / node_modules / node-sass / src / libsass / docs / setup-environment.md
1 ## Requirements
2 In order to install and setup your local development environment, there are some prerequisites:
3
4 * git
5 * gcc/clang/llvm (Linux: build tools, Mac OS X: XCode w/ Command Line Tools)
6 * ruby w/ bundler
7
8 OS X:
9 First you'll need to install XCode which you can now get from the AppStore installed on your mac. After you download that and run it, then run this on the command line:
10
11 ````
12 xcode-select --install
13 ````
14
15 ## Cloning the Projects
16
17 First, clone the project and then add a line to your `~/.bash_profile` that will let other programs know where the LibSass dev files are.
18
19 ````
20 git clone git@github.com:sass/libsass.git
21 cd libsass
22 echo "export SASS_LIBSASS_PATH=$(pwd)" >> ~/.bash_profile
23
24 ````
25
26 Then, if you run the "bootstrap" script, it should clone all the other required projects.
27
28 ````
29 ./script/bootstrap
30 ````
31
32 You should now have a `sass-spec` and `sassc` folder within the libsass folder. Both of these are clones of their respective git projects. If you want to do a pull request, remember to work in those folders. For instance, if you want to add a test (see other documentation for how to do that), make sure to commit it to your *fork* of the sass-spec github project. Also, whenever you are running tests, make sure to `pull` from the origin! We want to make sure we are testing against the newest libsass, sassc, and sass-spec!
33
34 Now, try and see if you can build the project. We do that with the `make` command.
35
36 ````
37 make
38 ````
39
40 At this point, if you get an error, something is most likely wrong with your compiler installation. Yikes. It's hard to cover how to fix this in an article. Feel free to open an issue and we'll try and help! But, remember, before you do that, googling the error message is your friend! Many problems are solved quickly that way.
41
42 ## Running The Spec Against LibSass
43
44 Then, to run the spec against LibSass, just run:
45
46 ````
47 ./script/spec
48 ````
49
50 If you get an error about `SASS_LIBSASS_PATH`, you may still need to set a variable pointing to the libsass folder, like this:
51
52 ````
53 export SASS_LIBSASS_PATH=/Users/you/path/libsass
54 ````
55
56 ...where the latter part is to the `libsass` directory you've cloned. You can get this path by typing `pwd` in the Terminal
57
58 ## Running the Spec Against Ruby Sass
59
60 Go into the sass-spec folder that should have been cloned earlier with the "bootstrap" command. Run the following.
61
62 ````
63 bundle install
64 ./sass-spec.rb
65 ````
66
67 Voila! Now you are testing against Sass too!
68