From 0511c25a27226d236df342b859162792088a49cc Mon Sep 17 00:00:00 2001 From: Joshua Wiens Date: Wed, 14 Jun 2017 12:49:23 -0500 Subject: [PATCH] chore: build and package updates to allow use of webpack 3 (#475) --- .travis.yml | 53 ++++++++++++++++++++++++++++++++++++++------ README.md | 8 +++---- appveyor.yml | 30 ++++++++++++------------- package.json | 62 ++++++++++++++++++++++++++++------------------------ 4 files changed, 98 insertions(+), 55 deletions(-) diff --git a/.travis.yml b/.travis.yml index 20b24a0d..26f89cae 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,49 @@ sudo: false +dist: trusty language: node_js -node_js: - - "7" - - "6" - - "4" - +branches: + only: + - master + - feature/webpack3 +jobs: + fast_finish: true + allow_failures: + - env: WEBPACK_VERSION=canary + include: + - &test-latest + stage: Webpack latest + nodejs: 6 + env: WEBPACK_VERSION=latest JOB_PART=test + script: npm run travis:$JOB_PART + - <<: *test-latest + nodejs: 4.3 + env: WEBPACK_VERSION=latest JOB_PART=test + script: npm run travis:$JOB_PART + - <<: *test-latest + node_js: 8 + env: WEBPACK_VERSION=latest JOB_PART=lint + script: npm run travis:$JOB_PART + - <<: *test-latest + node_js: 8 + env: WEBPACK_VERSION=latest JOB_PART=coverage + script: npm run travis:$JOB_PART + after_success: 'bash <(curl -s https://codecov.io/bash)' + - stage: Webpack canary + before_script: npm i --no-save git://github.com/webpack/webpack.git#master + script: npm run travis:$JOB_PART + node_js: 8 + env: WEBPACK_VERSION=canary JOB_PART=test +before_install: + - 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi' + - nvm --version + - node --version + - npm --version +before_script: + - |- + if [ "$WEBPACK_VERSION" ]; then + npm i --no-save webpack@$WEBPACK_VERSION + fi +script: + - 'npm run travis:$JOB_PART' after_success: - - npm install coveralls - - npm run coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage + - 'bash <(curl -s https://codecov.io/bash)' diff --git a/README.md b/README.md index b6ff483a..8611b9f1 100644 --- a/README.md +++ b/README.md @@ -227,11 +227,11 @@ If you want to prepend Sass code before the actual entry file, you can set the ` [travis]: http://img.shields.io/travis/webpack-contrib/sass-loader.svg [travis-url]: https://travis-ci.org/webpack-contrib/sass-loader -[appveyor-url]: https://ci.appveyor.com/project/jhnns/sass-loader/branch/master -[appveyor]: https://ci.appveyor.com/api/projects/status/github/webpack-contrib/sass-loader?svg=true +[appveyor-url]: https://ci.appveyor.com/project/webpack-contrib/sass-loader/branch/master +[appveyor]: https://ci.appveyor.com/api/projects/status/rqpy1vaovh20ttxs/branch/master?svg=true -[cover]: https://coveralls.io/repos/github/webpack-contrib/sass-loader/badge.svg -[cover-url]: https://coveralls.io/github/webpack-contrib/sass-loader +[cover]: https://codecov.io/gh/webpack-contrib/sass-loader/branch/master/graph/badge.svg +[cover-url]: https://codecov.io/gh/webpack-contrib/sass-loader [chat]: https://badges.gitter.im/webpack/webpack.svg [chat-url]: https://gitter.im/webpack/webpack diff --git a/appveyor.yml b/appveyor.yml index 98d6c1eb..d257e41d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,28 +1,28 @@ -# appveyor file -# http://www.appveyor.com/docs/appveyor-yml - +branches: + only: + - master init: - git config --global core.autocrlf input - -# what combinations to test environment: matrix: - - nodejs_version: 7 + - nodejs_version: '8' + webpack_version: latest job_part: test - - nodejs_version: 6 + - nodejs_version: '6' + webpack_version: latest job_part: test - - nodejs_version: 4 + - nodejs_version: '4' + webpack_version: latest job_part: test - +build: 'off' +matrix: + fast_finish: true install: - ps: Install-Product node $env:nodejs_version x64 + - npm i -g npm@^5.0.0 - npm install - -build: off - -matrix: - fast_finish: true - +before_test: + - cmd: npm i --no-save webpack@%webpack_version% test_script: - node --version - npm --version diff --git a/package.json b/package.json index 5bc95472..a9056ea1 100644 --- a/package.json +++ b/package.json @@ -2,38 +2,27 @@ "name": "sass-loader", "version": "6.0.5", "description": "Sass loader for webpack", + "author": "J. Tangelder", + "license": "MIT", "main": "lib/loader.js", + "files": [ + "lib" + ], "scripts": { + "appveyor:test": "npm test", "create-spec": "node test/tools/runCreateSpec.js", - "pretest": "npm run create-spec", + "lint": "eslint lib test", "test": "nyc --all mocha -R spec -t 10000", - "posttest": "npm run lint", "test-bootstrap-sass": "webpack-dev-server --config test/bootstrapSass/webpack.config.js --content-base ./test/bootstrapSass", "test-source-map": "webpack-dev-server --config test/sourceMap/webpack.config.js --content-base ./test/sourceMap --inline", "test-watch": "webpack --config test/watch/webpack.config.js", "test-extract-text": "webpack --config test/extractText/webpack.config.js", "test-hmr": "webpack-dev-server --config test/hmr/webpack.config.js --content-base ./test/hmr --hot --inline", - "lint": "eslint lib test", - "appveyor:test": "npm test" - }, - "keywords": [ - "sass", - "libsass", - "webpack", - "loader" - ], - "repository": { - "type": "git", - "url": "git://github.com/webpack-contrib/sass-loader.git" - }, - "author": "J. Tangelder", - "license": "MIT", - "engines": { - "node": ">=4.0.0" - }, - "peerDependencies": { - "node-sass": "^4.0.0", - "webpack": "^2.0.0" + "travis:lint": "npm run lint", + "travis:test": "npm run test", + "travis:coverage": "npm run test", + "pretest": "npm run create-spec", + "posttest": "npm run lint" }, "dependencies": { "async": "^2.1.5", @@ -55,13 +44,28 @@ "raw-loader": "^0.5.1", "should": "^11.2.0", "style-loader": "^0.18.2", - "webpack": "^2.2.1", "webpack-dev-server": "^2.4.1", "webpack-merge": "^4.0.0" }, - "files": [ - "lib", - "README", - "LICENSE" - ] + "engines": { + "node": ">= 4.3 < 5.0.0 || >= 5.10" + }, + "peerDependencies": { + "node-sass": "^4.0.0", + "webpack": "^2.0.0 || >= 3.0.0-rc.0 || ^3.0.0" + }, + "keywords": [ + "sass", + "libsass", + "webpack", + "loader" + ], + "repository": { + "type": "git", + "url": "git://github.com/webpack-contrib/sass-loader.git" + }, + "bugs": { + "url": "https://github.com/webpack-contrib/sass-loader/issues" + }, + "homepage": "https://github.com/webpack-contrib/sass-loader" }