Skip to content
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ coverage/
tmp/
npm-debug.log*
.DS_Store
.nyc_output/
23 changes: 16 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
node_js:
- stable
- 9
- 6
- 4
sudo: false
os: linux
dist: bionic
language: node_js
node_js:
- 12
- 10
- 8
script: "npm run test:cov"
after_script: "npm i -g codecov.io && cat ./coverage/lcov.info | codecov"

jobs:
include:
- node_js: stable
after_script: |
npm i -g codecov
npx nyc report --reporter=text-lcov | codecov --pipe
# Node.js 6 is not supported by nyc, so run tests without code coverage
- node_js: 6
script: npm run test
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function cssExtract (bundle, opts) {
var outFile = opts.out || opts.o || 'bundle.css'
var sourceMap = d(opts.sourceMap, bundle && bundle._options && bundle._options.debug, false)

assert.equal(typeof bundle, 'object', 'bundle should be an object')
assert.equal(typeof opts, 'object', 'opts should be an object')
assert.strictEqual(typeof bundle, 'object', 'bundle should be an object')
assert.strictEqual(typeof opts, 'object', 'opts should be an object')

// every time .bundle is called, attach hook
bundle.on('reset', addHooks)
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"deps": "dependency-check . && dependency-check . --extra --no-dev",
"test": "standard && npm run deps && NODE_ENV=test node test",
"test:cov": "standard && npm run deps && NODE_ENV=test istanbul cover ./test/index.js"
"test:cov": "standard && npm run deps && NODE_ENV=test nyc node test"
},
"repository": "stackcss/css-extract",
"keywords": [
Expand All @@ -20,21 +20,21 @@
],
"license": "MIT",
"dependencies": {
"bl": "^1.1.2",
"bl": "^4.0.2",
"defined": "^1.0.0",
"from2-string": "^1.1.0",
"static-module": "^3.0.0",
"through2": "^2.0.1"
"through2": "^4.0.2"
},
"devDependencies": {
"browserify": "^13.0.0",
"dependency-check": "^2.5.1",
"browserify": "^16.5.2",
"dependency-check": "^2.10.1",
"insert-css": "^2.0.0",
"istanbul": "^0.4.2",
"sheetify": "^6.0.0",
"standard": "^6.0.7",
"tape": "^4.5.0",
"tmp": "0.0.28"
"nyc": "^15.1.0",
"sheetify": "^8.0.0",
"standard": "^14.3.4",
"tape": "^5.0.1",
"tmp": "^0.2.1"
},
"files": [
"index.js",
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('css-extract', function (t) {

t.test('should extract sheetify css to file', function (t) {
t.plan(3)
tmpDir({unsafeCleanup: true}, onDir)
tmpDir({ unsafeCleanup: true }, onDir)

function onDir (err, dir, cleanup) {
t.ifError(err, 'no error')
Expand Down