Skip to content

Commit

Permalink
Move stylus style sheets into web, compile as assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhanson committed Dec 22, 2017
1 parent 1992367 commit d3d71c9
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 16 deletions.
16 changes: 5 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
site:
all: pages assets

pages:
node site

app:
assets:
make -C web


BIN ?= ./node_modules/.bin

STYLUS ?= $(BIN)/stylus

css:
$(STYLUS) public/stylesheets/app.styl


.PHONY: site app
.PHONY: pages assets
2 changes: 0 additions & 2 deletions app/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ exports = module.exports = function(repoHandler, logging) {
service.set('view engine', 'pug');
service.locals.pretty = true;

service.use(require('stylus').middleware(__dirname + '/../public/stylesheets'));

service.use(logging());
service.use(bodyParser.json());
service.use(bodyParser.urlencoded({ extended: false }));
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"pug": "^2.0.0-rc.4",
"request": "^2.55.0",
"serve-favicon": "~2.2.0",
"stylus": "*",
"superagent": "^1.2.0",
"supermarked": "^2.0.0"
},
Expand Down
9 changes: 8 additions & 1 deletion web/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
BIN ?= ./node_modules/.bin

RJS ?= $(BIN)/r.js
STYLUS ?= $(BIN)/stylus


all: js
all: css js

css: node_modules
$(STYLUS) styles/app.styl -o ../public/stylesheets/app.css

js: node_modules
$(RJS) -o build.js

node_modules:
npm install


.PHONY: css js
3 changes: 2 additions & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"events": "git+https://github.com/anchorjs/events.git#193b88e"
},
"devDependencies": {
"requirejs": "^2.3.5"
"requirejs": "^2.3.5",
"stylus": "^0.54.5"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d3d71c9

Please sign in to comment.