Skip to content

Commit

Permalink
Merge pull request #503 from kevva/coverage
Browse files Browse the repository at this point in the history
Move coverage script to Makefile
  • Loading branch information
andrew committed Oct 31, 2014
2 parents a19ed3d + 17e11ae commit 8ac7c03
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 52 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[Makefile]
indent_style = tab
29 changes: 5 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

node_modules
npm-debug.log

build
vagrant
.lock-wscript
.DS_Store
.sass-cache

bin/*-v8-*

lib-coverage/
sass-coverage.js
**/fixtures/**/build.*
bin
!bin/node-sass
build
lib-cov
node_modules
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
BIN = ./node_modules/.bin
REPORTER = spec

clean:
@rm -rf lib-cov test/fixtures/*/build.css

lint:
@$(BIN)/jshint bin lib test

node_modules: package.json
@npm install
@touch node_modules

test: clean lint node_modules
@$(BIN)/_mocha \
--reporter $(REPORTER)

test-cov: clean lint node_modules
@$(BIN)/jscoverage lib lib-cov
@NODESASS_COV=1 $(BIN)/_mocha \
--reporter mocha-lcov-reporter | $(BIN)/coveralls

.PHONY: test clean
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"gypfile": true,
"scripts": {
"coverage": "node scripts/coverage",
"coverage": "make test-cov",
"install": "node lib/build.js",
"prepublish": "node scripts/prepublish",
"pretest": "node_modules/.bin/jshint bin lib test",
Expand Down
26 changes: 0 additions & 26 deletions scripts/coverage

This file was deleted.

2 changes: 1 addition & 1 deletion test/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var assert = require('assert'),
fs = require('fs'),
path = require('path'),
read = fs.readFileSync,
sass = require('../lib'),
sass = process.env.NODESASS_COV ? require('../lib-cov') : require('../lib'),
fixture = path.join.bind(null, __dirname, 'fixtures'),
resolveFixture = path.resolve.bind(null, __dirname, 'fixtures');

Expand Down

0 comments on commit 8ac7c03

Please sign in to comment.