Skip to content
Permalink
Browse files

chore(ci): add AppVeyor for windows builds (#351)

* chore(ci): add AppVeyor support

* add appveyor badge

* move env vars outside package.json

* fix test on windows

* same
  • Loading branch information...
Kocal committed May 7, 2019
1 parent 66e4704 commit d0e491018ecd4b2485601dd526cecfac98f41e67
Showing with 46 additions and 19 deletions.
  1. +20 −0 .appveyor.yml
  2. +4 −0 .travis.yml
  3. +13 −10 README.md
  4. +1 −1 package.json
  5. +1 −1 test/functional/api/commands/build.test.ts
  6. +7 −7 test/functional/api/commands/lint.test.ts
@@ -0,0 +1,20 @@
environment:
FORCE_COLOR: 1
matrix:
- nodejs_version: "10"
- nodejs_version: ""

cache:
- node_modules
- '%APPDATA%\npm-cache'
- '%USERPROFILE%\.npm'
- '%USERPROFILE%\.cache'

install:
- ps: Install-Product node $env:nodejs_version
- npm install -g yarn
- yarn install --frozen-lockfile

test_script:
- yarn build
- yarn test -i
@@ -5,6 +5,10 @@ node_js:
- 10
- node

env:
global:
- FORCE_COLOR=1

branches:
except:
- /^v\d+\.\d+\.\d+$/
@@ -1,7 +1,8 @@
# yProx-CLI

[![npm (scoped)](https://img.shields.io/npm/v/@yproximite/yprox-cli.svg)](https://www.npmjs.com/package/@yproximite/yprox-cli)
[![Build Status](https://travis-ci.com/Yproximite/yProx-cli.svg?token=pNBs2oaRpfxdyhqWf28h&branch=master)](https://travis-ci.com/Yproximite/yProx-cli)
[![Build Status (Travis)](https://travis-ci.com/Yproximite/yProx-cli.svg?token=pNBs2oaRpfxdyhqWf28h&branch=master)](https://travis-ci.com/Yproximite/yProx-cli)
[![Build status (AppVeyor)](https://ci.appveyor.com/api/projects/status/y9h3n3w20m06aoo8?svg=true)](https://ci.appveyor.com/project/Kocal/yprox-cli)

> A tool for bulk linting and building assets.
@@ -10,20 +11,22 @@
Yes, but linting and building **a lot** of assets is now easier than ever!

Out of the box, yProx-CLI comes with:
- JavaScript support (+ [Buble](https://github.com/bublejs/buble))
- CSS and Sass support
- Rollup support (JavaScript, Vue, [GraphQL](https://github.com/Kocal/rollup-plugin-graphql)) for modern apps
- ESLint for linting JavaScript files
- Stylelint for linting CSS and Sass support
- Copy/Paste files
- Images optimization

- JavaScript support (+ [Buble](https://github.com/bublejs/buble))
- CSS and Sass support
- Rollup support (JavaScript, Vue, [GraphQL](https://github.com/Kocal/rollup-plugin-graphql)) for modern apps
- ESLint for linting JavaScript files
- Stylelint for linting CSS and Sass support
- Copy/Paste files
- Images optimization

yProx-CLI is really useful for us because it allowed us to package all the tools we need in only big package.

We have ~150 WordPress projects and it was really hard to maintain ~25 dev dependencies (for Gulp) for each project.
Using yProx-CLI saves us some huge amount of time because:
- we were able to externalize all those dependencies in one package
- we were able to externalize the tooling in one package. Before, **everything** was in a Gulp file configuration

- we were able to externalize all those dependencies in one package
- we were able to externalize the tooling in one package. Before, **everything** was in a Gulp file configuration

## Documentation

@@ -17,7 +17,7 @@
"semantic-release": "semantic-release",
"build": "tsc && chmod +x ./dist/bin/yprox-cli.js",
"watch": "tsc --watch",
"test": "FORCE_COLOR=1 jest",
"test": "jest",
"lint": "eslint --ext .ts bin lib types test"
},
"publishConfig": {
@@ -102,7 +102,7 @@ describe('command: build', () => {
} catch (e) {
expect(e.stdout).toContain('rollup :: start bundling "button.js"');
expect(e.stderr).toContain("SyntaxError: Unexpected character '@' (2:10)");
expect(e.stderr).toContain('/src/button/Button.vue (2:10)');
expect(e.stderr).toContain('Button.vue (2:10)');
expect(e.stdout).toContain(chalk`If you try to building Vue code, try to run {blue.bold yarn add -D vue-template-compiler}.`);
expect(e.stdout).not.toContain('rollup :: finished bundling "button.js"');
expect(e.code).toBe(1);
@@ -54,11 +54,11 @@ describe('command: lint', () => {

// @ts-ignore
const eslintOutput = console.log.mock.calls[0][0];
expect(eslintOutput).toContain('src/hello-world.js:1:34');
expect(eslintOutput).toContain('hello-world.js:1:34');
expect(eslintOutput).toContain('Unnecessary semicolon');
expect(eslintOutput).toContain("console.log('Hello world from!');;");

expect(eslintOutput).toContain('src/es6.js:2:48');
expect(eslintOutput).toContain('es6.js:2:48');
expect(eslintOutput).toContain('Unnecessary semicolon');
expect(eslintOutput).toContain('console.log(`The constant value: ${constant}`);;');

@@ -133,11 +133,11 @@ describe('command: lint', () => {
const eslintOutput = console.log.mock.calls[0][0];

expect(eslintOutput).toContain('Unnecessary semicolon');
expect(eslintOutput).toContain('src/hello-world.js:1:34');
expect(eslintOutput).toContain('hello-world.js:1:34');
expect(eslintOutput).toContain("console.log('Hello world from!');;");

expect(eslintOutput).toContain('Unnecessary semicolon');
expect(eslintOutput).toContain('src/es6.js:2:48');
expect(eslintOutput).toContain('es6.js:2:48');
expect(eslintOutput).toContain('console.log(`The constant value: ${constant}`);;');

expect(eslintOutput).toContain('2 warnings found.');
@@ -182,13 +182,13 @@ describe('command: lint', () => {

// @ts-ignore
const eslintOutput = console.log.mock.calls[0][0];
expect(eslintOutput).toContain('src/button/Button.vue:2:11');
expect(eslintOutput).toContain('Button.vue:2:11');
expect(eslintOutput).toContain('Event "click" should be on a new line');

expect(eslintOutput).toContain('src/button/Button.vue:16:3');
expect(eslintOutput).toContain('Button.vue:16:3');
expect(eslintOutput).toContain('The "props" property should be above the "data" property on line 11');

expect(eslintOutput).toContain('src/button/index.js:6:37');
expect(eslintOutput).toContain('index.js:6:37');
expect(eslintOutput).toContain('Unnecessary semicolon');

expect(eslintOutput).toContain('1 error and 3 warnings found.');

0 comments on commit d0e4910

Please sign in to comment.
You can’t perform that action at this time.