From 089c7d1e16cafb03cc6a847f793121913ba8a44a Mon Sep 17 00:00:00 2001 From: Arpan Nanavati Date: Mon, 19 Sep 2016 12:19:19 -0700 Subject: [PATCH] fix linter error (#10) * fix linter error * update node.js version to 6 * add install task for yo and gulp in travis ci * fix the order of install generator-electrode-component * bump version of karma firefox launcher for fixing CI tests * try to fix Firefox launcher issue https://karma-runner.github.io/0.8/plus/Travis-CI.html * adding build image --- .../electrode-archetype-react-component-dev/package.json | 2 +- packages/electrode-archetype-react-component/.travis.yml | 9 ++++++--- packages/electrode-archetype-react-component/README.md | 2 ++ .../config/webpack/partial/css.js | 4 ++-- .../electrode-archetype-react-component/package.json | 5 +++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/electrode-archetype-react-component-dev/package.json b/packages/electrode-archetype-react-component-dev/package.json index 36ff4c61b..b63acd471 100644 --- a/packages/electrode-archetype-react-component-dev/package.json +++ b/packages/electrode-archetype-react-component-dev/package.json @@ -56,7 +56,7 @@ "karma": "^0.13.19", "karma-chrome-launcher": "^0.2.0", "karma-coverage": "^0.4.2", - "karma-firefox-launcher": "^0.1.6", + "karma-firefox-launcher": "^1", "karma-ie-launcher": "^0.2.0", "karma-intl-shim": "^1.0.0", "karma-mocha": "^0.2.0", diff --git a/packages/electrode-archetype-react-component/.travis.yml b/packages/electrode-archetype-react-component/.travis.yml index a7ba452b4..aa42b9bda 100644 --- a/packages/electrode-archetype-react-component/.travis.yml +++ b/packages/electrode-archetype-react-component/.travis.yml @@ -1,25 +1,28 @@ language: node_js node_js: - - "4.2" - - "5.0" + - v6 brances: only: - master before_install: + - npm install -g gulp yo generator-electrode-component - currentfolder=${PWD##*/} - if [ "$currentfolder" != 'electrode-archetype-react-component' ]; then cd .. && eval "mv $currentfolder electrode-archetype-react-component" && cd electrode-archetype-react-component; fi - npm install - cd dev ; npm install ; cd .. +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + script: # run the archetype check task. - gulp archetype:check # create a new component using electrode-component yeoman generator to run the components unit-tests. - - npm install -g yo gulp generator-electrode-component - yo electrode-component --projectName=product-card --packageName=product-card --packageGitHubOrg=walmartlabs --developerName="Arpan Nanavati" --ghUser=ananavati --ghRepo=product-card --createDirectory=Y - cd product-card diff --git a/packages/electrode-archetype-react-component/README.md b/packages/electrode-archetype-react-component/README.md index 26a937d6a..0fa1f0017 100644 --- a/packages/electrode-archetype-react-component/README.md +++ b/packages/electrode-archetype-react-component/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/electrode-io/electrode-archetype-react-component.svg?branch=master)](https://travis-ci.org/electrode-io/electrode-archetype-react-component) + # Archetype: Electrode React Component Electrode flavored react component archetype. diff --git a/packages/electrode-archetype-react-component/config/webpack/partial/css.js b/packages/electrode-archetype-react-component/config/webpack/partial/css.js index 641b8fc35..8f62385fa 100644 --- a/packages/electrode-archetype-react-component/config/webpack/partial/css.js +++ b/packages/electrode-archetype-react-component/config/webpack/partial/css.js @@ -23,8 +23,8 @@ const postcssLoader = archDevRequire.resolve("postcss-loader"); * case 4: *none* demo.css & demo.styl exists => CSS-Modules + CSS-Next takes priority */ -const cssNextExists = (glob.sync(Path.join(process.cwd() + "/demo/*.css")).length > 0); -const stylusExists = (glob.sync(Path.join(process.cwd() + "/demo/*.styl")).length > 0); +const cssNextExists = glob.sync(Path.join(process.cwd() + "/demo/*.css")).length > 0; +const stylusExists = glob.sync(Path.join(process.cwd() + "/demo/*.styl")).length > 0; // By default, this archetype assumes you are using CSS-Modules + CSS-Next let cssModuleSupport = "?modules!" + postcssLoader; diff --git a/packages/electrode-archetype-react-component/package.json b/packages/electrode-archetype-react-component/package.json index b3498918f..ec0753723 100644 --- a/packages/electrode-archetype-react-component/package.json +++ b/packages/electrode-archetype-react-component/package.json @@ -23,13 +23,14 @@ "scripts": {}, "dependencies": {}, "devDependencies": { + "electrode-gulp-helper": "^1.0.4", "eslint": "^1.10.1", "eslint-config-defaults": "^9.0.0", "eslint-plugin-filenames": "^0.1.2", "gulp": "^3.9.1", + "opener": "^1.4.1", "package-json-validator": "^0.6.1", - "shelljs": "^0.7.0", - "opener": "^1.4.1" + "shelljs": "^0.7.0" }, "engines": { "node": "^4.2.6",