From 9e9cbd36b255a2fd3d7ca6a7a247e8ebcfc2dc5e Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 8 Sep 2019 08:26:23 +0800 Subject: [PATCH] build: add travis.yml (#1985) --- .travis.yml | 19 +++++++++++++++++++ package.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..a91d7aca --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +language: node_js +sudo: required +addons: + chrome: stable +node_js: + - 10 +os: linux +cache: + yarn: true +branches: + only: + - master + - dev +install: + - | + yarn install +script: + - | + npm run lint diff --git a/package.json b/package.json index 65aa427b..117fa694 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "description": "轻量、可靠的小程序 UI 组件库", "scripts": { "dev": "node build/dev.js", - "lint": "eslint ./packages --ext .js,.ts", + "lint": "eslint ./packages --ext .js,.ts && stylelint \"packages/**/*.less\" --fix", "release": "sh build/release.sh", "release:site": "sh build/release-site.sh", "build:lib": "yarn && npx gulp -f build/compiler.js --series buildEs buildLib",