Skip to content

Commit

Permalink
[fixed] visual testing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKVal committed Jul 14, 2015
1 parent 6c4b06f commit 7e15213
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,7 @@ Router.run(routes, function (Handler) {
## Contributing

See [CONTRIBUTING](CONTRIBUTING.md)

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.

URL for it: http://localhost:8080/public/visual#/
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "babel src --out-dir=lib && webpack && COMPRESS=1 webpack && npm run bower-prepare",
"test": "npm run lint && karma start --single-run",
"tdd": "karma start",
"visual-test": "webpack-dev-server --config webpack.test.config.babel.js",
"visual-test": "open http://localhost:8080/public/visual#/ && webpack-dev-server --config webpack.test.config.babel.js",
"lint": "eslint ./",
"bower-prepare": "babel-node scripts/bower-prepare.js",
"patch": "release patch",
Expand Down Expand Up @@ -45,6 +45,7 @@
"bootstrap": "^3.3.1",
"chai": "^3.0.0",
"colors": "^1.1.2",
"css-loader": "^0.15.3",
"eslint": "^0.24.0",
"eslint-plugin-babel": "^1.0.0",
"eslint-plugin-mocha": "^0.4.0",
Expand All @@ -55,6 +56,8 @@
"karma-mocha-reporter": "^1.0.2",
"karma-phantomjs-launcher": "^0.2.0",
"karma-webpack": "^1.5.0",
"less": "^2.5.1",
"less-loader": "^2.2.0",
"lodash": "^3.10.0",
"mocha": "^2.1.0",
"mt-changelog": "^0.6.1",
Expand All @@ -65,6 +68,8 @@
"react-router": ">=0.13.1",
"release-script": "^0.2.1",
"shelljs": "^0.5.1",
"style-loader": "^0.12.3",
"url-loader": "^0.5.6",
"webpack": "^1.4.15",
"webpack-dev-server": "^1.7.0",
"yargs": "^3.15.0"
Expand Down
5 changes: 4 additions & 1 deletion webpack.test.config.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ module.exports = {

module: {
loaders: [
{test: /\.js/, loader: 'babel', exclude: /node_modules/}
{test: /\.js/, loader: 'babel', exclude: /node_modules/},
{test: /\.less$/, loader: 'style!css!less'},
{test:/\.woff|\.woff2$/, loader: 'url?prefix=font/&limit=5000'},
{test:/\.eot$|\.ttf$|\.svg$/, loader: 'file?prefix=font/'}
]
}
};

0 comments on commit 7e15213

Please sign in to comment.