diff --git a/app/styles/index.less b/app/styles/index.less index 762a58c..ac603c8 100644 --- a/app/styles/index.less +++ b/app/styles/index.less @@ -56,10 +56,8 @@ footer { .form-control:focus { border-color: #e0e0e0; outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), - 0 0 8px rgba(102, 175, 233, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), - 0 0 8px rgba(224, 224, 224, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(224, 224, 224, 0.6); } .btn, @@ -231,8 +229,7 @@ li.modeNavItem.active a { } .transition { - transition: max-height 0.4s ease, height 0.4s ease, margin 0.4s ease, - opacity 0.75s ease; + transition: max-height 0.4s ease, height 0.4s ease, margin 0.4s ease, opacity 0.75s ease; opacity: 1; overflow: hidden; } diff --git a/karma.conf.js b/karma.conf.js index a6a3f15..4b72538 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -20,18 +20,18 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { // add webpack as preprocessor - "scripts/spec/*.js": ["webpack", "sourcemap"] + "scripts/spec/*.js": ["webpack", "sourcemap"], }, webpack: { devtool: "inline-source-map", - module: webpackConfig.module + module: webpackConfig.module, }, webpackMiddleware: { // webpack-dev-middleware configuration // i. e. - noInfo: true + noInfo: true, }, // test results reporter to use @@ -58,6 +58,6 @@ module.exports = function(config) { // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits - singleRun: false + singleRun: false, }); }; diff --git a/package.json b/package.json index 4954165..c408942 100644 --- a/package.json +++ b/package.json @@ -65,8 +65,7 @@ }, "scripts": { "start": "node server.js", - "build": - "BABEL_ENV=production webpack --config webpack.config.production.js && node pre-render.js", + "build": "BABEL_ENV=production webpack --config webpack.config.production.js && node pre-render.js", "lint": "eslint . && prettier --list-different '**/*.{js,jsx,ts,css,less,scss,json}'", "test": "karma start --single-run --browsers PhantomJS", "pretty": "prettier --write '**/*.{js,jsx,ts,css,less,scss,json}'" diff --git a/server.js b/server.js index 44ad718..73a6baf 100644 --- a/server.js +++ b/server.js @@ -8,7 +8,7 @@ new WebpackDevServer(webpack(config), { publicPath: config.output.publicPath, contentBase: "./app/", hot: true, - historyApiFallback: true + historyApiFallback: true, }).listen(port, "localhost", function(err) { if (err) { console.log(err); diff --git a/webpack.config.js b/webpack.config.js index 9c0fe0d..e72bdc4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -47,17 +47,21 @@ var port = 1234; module.exports = { port: port, - entry: ["webpack-dev-server/client?http://localhost:" + port, "webpack/hot/dev-server", "./app/scripts/index.js"], + entry: [ + "webpack-dev-server/client?http://localhost:" + port, + "webpack/hot/dev-server", + "./app/scripts/index.js", + ], output: { path: path.resolve(__dirname, "build"), filename: "bundle.js", - publicPath: "/" + publicPath: "/", }, resolve: { - extensions: ["", ".js"] + extensions: ["", ".js"], }, resolveLoader: { - root: path.join(__dirname, "node_modules") + root: path.join(__dirname, "node_modules"), }, devtool: "inline-source-map", plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin()], @@ -66,21 +70,21 @@ module.exports = { { test: /\.jsx?$/, loaders: ["babel"], - include: path.join(__dirname, "app", "scripts") + include: path.join(__dirname, "app", "scripts"), }, { test: /\.less$/, - loader: "style!css!less" + loader: "style!css!less", }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: "url-loader?limit=10000&minetype=application/font-woff" + loader: "url-loader?limit=10000&minetype=application/font-woff", }, { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: "file-loader" + loader: "file-loader", }, - { test: /\.html/, loader: "file?name=[name].[ext]" } - ] - } + { test: /\.html/, loader: "file?name=[name].[ext]" }, + ], + }, }; diff --git a/webpack.config.production.js b/webpack.config.production.js index 0a2061c..acdad22 100644 --- a/webpack.config.production.js +++ b/webpack.config.production.js @@ -47,45 +47,45 @@ module.exports = { output: { path: path.join(__dirname, "dist/Piano-Trainer"), filename: "bundle.js", - publicPath: "./" + publicPath: "./", }, resolve: { - extensions: ["", ".js"] + extensions: ["", ".js"], }, resolveLoader: { - root: path.join(__dirname, "node_modules") + root: path.join(__dirname, "node_modules"), }, devtool: "source-map", plugins: [ new webpack.optimize.OccurenceOrderPlugin(), new webpack.DefinePlugin({ "process.env": { - NODE_ENV: JSON.stringify("production") - } + NODE_ENV: JSON.stringify("production"), + }, }), new webpack.optimize.UglifyJsPlugin({ compress: { - warnings: false - } - }) + warnings: false, + }, + }), ], module: { loaders: [ { test: /\.jsx?$/, loaders: ["babel"], - include: path.join(__dirname, "app", "scripts") + include: path.join(__dirname, "app", "scripts"), }, { test: /\.less$/, - loader: "style!css!less" + loader: "style!css!less", }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: "url-loader?limit=10000&minetype=application/font-woff" + loader: "url-loader?limit=10000&minetype=application/font-woff", }, { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }, - { test: /\.html/, loader: "file?name=[name].[ext]" } - ] - } + { test: /\.html/, loader: "file?name=[name].[ext]" }, + ], + }, };