Skip to content

Commit

Permalink
chore(ci): add AppVeyor for windows builds (#351)
Browse files Browse the repository at this point in the history
* 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 d0e4910
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 19 deletions.
20 changes: 20 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ node_js:
- 10
- node

env:
global:
- FORCE_COLOR=1

branches:
except:
- /^v\d+\.\d+\.\d+$/
Expand Down
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/api/commands/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 7 additions & 7 deletions test/functional/api/commands/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);;');

Expand Down Expand Up @@ -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.');
Expand Down Expand Up @@ -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.');
Expand Down

0 comments on commit d0e4910

Please sign in to comment.