Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 91c29ab

Browse files
committed
Merge pull request #96 from AlexKVal/visual-testing
Fix visual testing
2 parents 6c4b06f + 7e15213 commit 91c29ab

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,7 @@ Router.run(routes, function (Handler) {
119119
## Contributing
120120

121121
See [CONTRIBUTING](CONTRIBUTING.md)
122+
123+
Use `npm run visual-test` command to check components appearance in browser. It will open browser with a blank page. Then after `webpack-server` finishes its bundling, the browser automatically will refresh the page.
124+
125+
URL for it: http://localhost:8080/public/visual#/

‎package.json‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"build": "babel src --out-dir=lib && webpack && COMPRESS=1 webpack && npm run bower-prepare",
99
"test": "npm run lint && karma start --single-run",
1010
"tdd": "karma start",
11-
"visual-test": "webpack-dev-server --config webpack.test.config.babel.js",
11+
"visual-test": "open http://localhost:8080/public/visual#/ && webpack-dev-server --config webpack.test.config.babel.js",
1212
"lint": "eslint ./",
1313
"bower-prepare": "babel-node scripts/bower-prepare.js",
1414
"patch": "release patch",
@@ -45,6 +45,7 @@
4545
"bootstrap": "^3.3.1",
4646
"chai": "^3.0.0",
4747
"colors": "^1.1.2",
48+
"css-loader": "^0.15.3",
4849
"eslint": "^0.24.0",
4950
"eslint-plugin-babel": "^1.0.0",
5051
"eslint-plugin-mocha": "^0.4.0",
@@ -55,6 +56,8 @@
5556
"karma-mocha-reporter": "^1.0.2",
5657
"karma-phantomjs-launcher": "^0.2.0",
5758
"karma-webpack": "^1.5.0",
59+
"less": "^2.5.1",
60+
"less-loader": "^2.2.0",
5861
"lodash": "^3.10.0",
5962
"mocha": "^2.1.0",
6063
"mt-changelog": "^0.6.1",
@@ -65,6 +68,8 @@
6568
"react-router": ">=0.13.1",
6669
"release-script": "^0.2.1",
6770
"shelljs": "^0.5.1",
71+
"style-loader": "^0.12.3",
72+
"url-loader": "^0.5.6",
6873
"webpack": "^1.4.15",
6974
"webpack-dev-server": "^1.7.0",
7075
"yargs": "^3.15.0"

‎webpack.test.config.babel.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ module.exports = {
1515

1616
module: {
1717
loaders: [
18-
{test: /\.js/, loader: 'babel', exclude: /node_modules/}
18+
{test: /\.js/, loader: 'babel', exclude: /node_modules/},
19+
{test: /\.less$/, loader: 'style!css!less'},
20+
{test:/\.woff|\.woff2$/, loader: 'url?prefix=font/&limit=5000'},
21+
{test:/\.eot$|\.ttf$|\.svg$/, loader: 'file?prefix=font/'}
1922
]
2023
}
2124
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /