Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move coverage script to Makefile #503

Merged
merged 1 commit into from
Oct 31, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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