Add Travis-CI build + restore stylelint

This commit is contained in:
Lucas Verney 2016-07-30 19:50:04 +02:00
parent 42662200aa
commit 1add19319d
9 changed files with 40 additions and 17 deletions

View File

@ -1,7 +1,13 @@
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4
"indentation": 4,
"selector-pseudo-class-no-unknown": [true, {
ignorePseudoClasses: ["global"]
}],
"no-unsupported-browser-features": [true, {
browsers: "ie >= 9, > 1%, last 3 versions, not op_mini all"
}]
},
"defaultSeverity": "error"
}

13
.travis.yml Normal file
View File

@ -0,0 +1,13 @@
---
sudo: required
dist: trusty
language: node_js
node_js:
- 4
install:
- npm install
script:
- "npm run build:dev"
- "npm run clean"
- "npm run build:prod"
- "npm test"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
app/dist/style.css vendored

File diff suppressed because one or more lines are too long

View File

@ -39,6 +39,7 @@ $lightgrey: #eee;
composes: link;
background-color: $activeBackground !important;
}
.active:focus {
background-color: $activeBackground !important;
}

View File

@ -16,7 +16,7 @@ then
fi
echo "Rebuilding dist JavaScript files…"
export NODE_ENV=production
npm run clean
npm run build
npm run build:prod
npm test
git add app/dist

View File

@ -7,11 +7,18 @@
"homepage": "https://github.com/Phyks/ampache_react",
"repository": "git+https://github.com/Phyks/ampache_react.git",
"scripts": {
"build": "./node_modules/.bin/webpack --progress",
"watch": "./node_modules/.bin/webpack --progress --watch",
"prod": "NODE_ENV=production ./node_modules/.bin/webpack --progress",
"extractTranslations": "./node_modules/.bin/babel-node scripts/extractTranslations.js",
"clean": "./node_modules/.bin/rimraf .cache && ./node_modules/.bin/rimraf app/dist"
"clean": "rimraf .cache && rimraf app/dist",
"build:dev": "webpack --progress",
"build:prod": "NODE_ENV=production webpack --progress",
"watch:dev": "webpack --progress --watch",
"watch:prod": "NODE_ENV=production webpack --progress --watch",
"extractTranslations": "babel-node scripts/extractTranslations.js",
"lint:scss": "stylelint './app/**/*.scss' --syntax scss",
"lint:js": "eslint './app/**/*.js' './app/**/*.jsx'",
"test": "npm run lint:scss && npm run lint:js"
},
"dependencies": {
"babel-polyfill": "^6.9.1",
@ -60,7 +67,6 @@
"postcss": "^5.1.0",
"postcss-loader": "^0.9.1",
"postcss-reporter": "^1.4.1",
"precss": "^1.4.0",
"react-a11y": "^0.3.3",
"react-intl-webpack-plugin": "0.0.3",
"redbox-react": "^1.2.10",

View File

@ -3,9 +3,6 @@ var webpack = require("webpack");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var postcssReporter = require("postcss-reporter");
var doiuse = require("doiuse");
var stylelint = require("stylelint");
var precss = require("precss");
var autoprefixer = require("autoprefixer");
var browsers = ["ie >= 9", "> 1%", "last 3 versions", "not op_mini all"];
@ -53,7 +50,7 @@ module.exports = {
loader: ExtractTextPlugin.extract(
"style-loader",
"css-loader?modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]" +
// TODO: "!postcss-loader" +
"!postcss-loader" +
"!sass-loader"
)
},
@ -84,7 +81,7 @@ module.exports = {
new ExtractTextPlugin("style.css", { allChunks: true })
],
postcss: [doiuse({ browsers: browsers }), stylelint, precss, autoprefixer({ browsers: browsers }), postcssReporter({ throwError: true, clearMessages: true })],
postcss: [autoprefixer({ browsers: browsers }), postcssReporter({ throwError: true, clearMessages: true })],
resolve: {
// Include empty string "" to resolve files by their explicit extension