Skip to content
This repository was archived by the owner on Jul 14, 2023. It is now read-only.

Commit 2089166

Browse files
chriseppsteinTyson Gach
authored and
Tyson Gach
committed
Add eyeglass support
1 parent 824e86b commit 2089166

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,23 @@ For command line help, visit our wiki page on Neat’s [command line interface](
9090

9191
It should be noted that `@import` rules are not compatible with Sprockets directives. You need to use one or the other.
9292

93+
## Installing with npm and using a Node-based asset pipeline
94+
95+
1. Add Neat as a dependency:
96+
97+
```bash
98+
npm install --save bourbon-neat
99+
```
100+
101+
1. If you’re using [Eyeglass](http://eyeglass.rocks), skip to Step 3. Otherwise, you’ll need to add Bourbon and Neat to your node-sass `includePaths` option. `require("bourbon-neat").includePaths` is an array of directories that you should pass to node-sass. How you do this depends on how node-sass is integrated into your project. You will also need to ensure that Bourbon is in the `includePaths` passed to node-sass.
102+
103+
1. Import Neat into your Sass files, after Bourbon:
104+
105+
```scss
106+
@import "bourbon";
107+
@import "neat";
108+
```
109+
93110
## Installing older versions of Neat
94111

95112
1. Uninstall any Neat gem versions you already have:

eyeglass-exports.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var neat = require("./index");
2+
3+
module.exports = function(eyeglass, sass) {
4+
return {
5+
sassDir: neat.includePaths[0]
6+
};
7+
};

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
var path = require('path');
1+
var path = require("path");
22

33
module.exports = {
44
includePaths: [
5-
path.join(__dirname, 'app/assets/stylesheets'),
5+
path.join(__dirname, "app/assets/stylesheets"),
66
]
77
};

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"queries",
1414
"sass",
1515
"scss",
16-
"semantic"
16+
"semantic",
17+
"eyeglass-module"
1718
],
1819
"homepage": "http://neat.bourbon.io",
1920
"bugs": {
@@ -38,5 +39,10 @@
3839
"gulp-connect": "^2.2.0",
3940
"gulp-sass": "^2.0.2",
4041
"node-bourbon": "^4.2.3"
42+
},
43+
"eyeglass": {
44+
"name": "neat",
45+
"needs": "*",
46+
"exports": "eyeglass-exports.js"
4147
}
4248
}

0 commit comments

Comments
 (0)