Skip to content

Commit

Permalink
Autoformat code using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Graham42 committed Oct 29, 2017
1 parent bb6cdc9 commit 33f16c5
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 38 deletions.
9 changes: 3 additions & 6 deletions app/styles/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
});
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}'"
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
26 changes: 15 additions & 11 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand All @@ -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]" },
],
},
};
28 changes: 14 additions & 14 deletions webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]" },
],
},
};

0 comments on commit 33f16c5

Please sign in to comment.