Skip to content

Commit 43df050

Browse files
ryan-roemerparkerziegler
authored andcommitted
CI: Add windows. (#285)
1 parent d1bee82 commit 43df050

8 files changed

Lines changed: 61 additions & 12 deletions

File tree

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"endOfLine": "auto"
3+
}

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: node_js
33
node_js:
44
- "8"
55
- "10"
6+
- "11"
67

78
sudo: false
89

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
This project adheres to [Semantic Versioning](http://semver.org/).
44
Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/FormidableLabs/webpack-dashboard/releases) page.
55

6+
## Unreleased
7+
8+
- Very minor path normalization for windows in displaying modules paths.
9+
610
## [3.0.6] - 2019-05-09
711

812
### Features

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# webpack-dashboard
22

3-
![](https://img.shields.io/npm/v/webpack-dashboard.svg?style=flat)
3+
[![npm version][npm_img]][npm_site]
4+
[![Travis Status][trav_img]][trav_site]
5+
[![AppVeyor Status][appveyor_img]][appveyor_site]
46
[![Maintenance Status][maintenance-image]](#maintenance-status)
57

68
A CLI dashboard for your webpack dev server
@@ -159,3 +161,9 @@ Error output deeply inspired by: [https://github.com/facebookincubator/create-re
159161
**Active:** Formidable is actively working on this project, and we expect to continue for work for the foreseeable future. Bug reports, feature requests and pull requests are welcome.
160162

161163
[maintenance-image]: https://img.shields.io/badge/maintenance-active-green.svg
164+
[npm_img]: https://img.shields.io/npm/v/webpack-dashboard.svg?style=flat
165+
[npm_site]: https://github.com/FormidableLabs/webpack-dashboard/
166+
[trav_img]: https://api.travis-ci.org/FormidableLabs/webpack-dashboard.svg
167+
[trav_site]: https://travis-ci.org/FormidableLabs/webpack-dashboard
168+
[appveyor_img]: https://ci.appveyor.com/api/projects/status/github/formidablelabs/webpack-dashboard?branch=master&svg=true
169+
[appveyor_site]: https://ci.appveyor.com/project/FormidableLabs/webpack-dashboard

appveyor.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
environment:
2+
matrix:
3+
- nodejs_version: "8"
4+
- nodejs_version: "10"
5+
- nodejs_version: "11"
6+
7+
# Install scripts. (runs after repo cloning)
8+
install:
9+
- ps: Install-Product node $env:nodejs_version
10+
- yarn install
11+
12+
# Post-install test scripts.
13+
test_script:
14+
- node --version
15+
- yarn --version
16+
- yarn run check-ci
17+
18+
# Don't actually build.
19+
build: off
20+
21+
matrix:
22+
fast_finish: true
23+
24+
branches:
25+
only:
26+
- master
27+
28+
cache:
29+
- node_modules
30+
- "%LOCALAPPDATA%/Yarn"

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
},
1010
"types": "index.d.ts",
1111
"scripts": {
12-
"test": "mocha 'test/**/*.spec.js'",
13-
"test-cov": "nyc mocha 'test/**/*.spec.js'",
12+
"test": "mocha \"test/**/*.spec.js\"",
13+
"test-cov": "nyc mocha \"test/**/*.spec.js\"",
1414
"lint": "eslint .",
1515
"check": "run-s format-check lint test check-ts",
1616
"check-ci": "run-s format-check lint test-cov check-ts",
1717
"check-ts": "tsc index.d.ts --noEmit",
1818
"dev": "cross-env EXAMPLE=duplicates-esm node bin/webpack-dashboard.js -- webpack-cli --config examples/config/webpack.config.js --watch",
19-
"format": "prettier --write './{bin,examples,plugin,test,utils}/**/*.js'",
20-
"format-check": "prettier --list-different './{bin,examples,plugin,test,utils}/**/*.js'"
19+
"format": "prettier --write \"./{bin,examples,plugin,test,utils}/**/*.js\"",
20+
"format-check": "prettier --list-different \"./{bin,examples,plugin,test,utils}/**/*.js\""
2121
},
2222
"repository": {
2323
"type": "git",

test/utils/format-modules.spec.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
"use strict";
22

3+
const { normalize, sep } = require("path");
34
const { _formatFileName, _formatPercentage } = require("../../utils/format-modules");
45

56
describe("format-modules", () => {
67
describe("#_formatFileName", () => {
78
it("returns a blessed green colored file name", () => {
89
const mod = {
9-
fileName: "foo/bar/test.js"
10+
fileName: normalize("foo/bar/test.js")
1011
};
11-
expect(_formatFileName(mod)).to.equal("{green-fg}./foo/bar/test.js{/}");
12+
expect(_formatFileName(mod)).to.equal(`{green-fg}.${sep}foo${sep}bar${sep}test.js{/}`);
1213
});
1314

1415
context("when there is a baseName", () => {
1516
it("returns a blessed yellow colored file name", () => {
1617
const mod = {
1718
fileName: "test.js",
18-
baseName: "/home/bar/test.js"
19+
baseName: normalize("/home/bar/test.js")
1920
};
2021
expect(_formatFileName(mod)).to.equal("{yellow-fg}test.js{/}");
2122
});
@@ -24,10 +25,12 @@ describe("format-modules", () => {
2425
context("when node_modules is present in fileName", () => {
2526
it("returns a blessed yellow colored file name", () => {
2627
const mod = {
27-
fileName: "/node_modules/@foo/test.js",
28-
baseName: "/home/bar/node_modules/@foo/test.js"
28+
fileName: normalize("/node_modules/@foo/test.js"),
29+
baseName: normalize("/home/bar/node_modules/@foo/test.js")
2930
};
30-
expect(_formatFileName(mod)).to.equal("~/{yellow-fg}@foo{/}/{yellow-fg}test.js{/}");
31+
expect(_formatFileName(mod)).to.equal(
32+
`~${sep}{yellow-fg}@foo{/}${sep}{yellow-fg}test.js{/}`
33+
);
3134
});
3235
});
3336
});

utils/format-modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function _formatFileName(mod) {
1717

1818
// Source file.
1919
if (!baseName) {
20-
return `{green-fg}./${relative(process.cwd(), resolve(fileName))}{/}`;
20+
return `{green-fg}.${sep}${relative(process.cwd(), resolve(fileName))}{/}`;
2121
}
2222

2323
// Package

0 commit comments

Comments
 (0)