Skip to content

Commit 70d2cca

Browse files
committed
Adding PrettierPlugin to build process
1 parent 05976e0 commit 70d2cca

File tree

7 files changed

+414
-363
lines changed

7 files changed

+414
-363
lines changed

config/webpack.config.prod.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ const TerserPlugin = require('terser-webpack-plugin');
1111
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
1212
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
1313
const safePostCssParser = require('postcss-safe-parser');
14-
const ManifestPlugin = require('webpack-manifest-plugin');
1514
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
16-
const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
1715
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
1816
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
1917
const paths = require('./paths');
@@ -23,7 +21,7 @@ const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt')
2321
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
2422
const CopyWebpackPlugin = require('copy-webpack-plugin');
2523
const getPackageJson = require('./getPackageJson');
26-
24+
var PrettierPlugin = require("prettier-webpack-plugin");
2725

2826
// Webpack uses `publicPath` to determine where the app is being served from.
2927
// It requires a trailing slash, or the file assets will get an incorrect path.
@@ -517,6 +515,7 @@ module.exports = {
517515
to: paths.appBuild
518516
}
519517
]),
518+
new PrettierPlugin(),
520519
// Generate a service worker script that will precache, and keep up to date,
521520
// the HTML & assets that are part of the Webpack build.
522521
/*new WorkboxWebpackPlugin.GenerateSW({

src/lib/components/Keyboard.css

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
body, html {
1+
body,
2+
html {
23
margin: 0;
34
padding: 0;
45
}
56

67
.simple-keyboard {
7-
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
8+
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue",
9+
Helvetica, Arial, "Lucida Grande", sans-serif;
810
width: 100%;
911
user-select: none;
1012
box-sizing: border-box;
@@ -38,13 +40,13 @@ body, html {
3840
* hg-theme-default theme
3941
*/
4042
.simple-keyboard.hg-theme-default {
41-
background-color: rgba(0,0,0,0.1);
43+
background-color: rgba(0, 0, 0, 0.1);
4244
padding: 5px;
4345
border-radius: 5px;
44-
}
46+
}
4547

4648
.simple-keyboard.hg-theme-default .hg-button {
47-
box-shadow: 0px 0px 3px -1px rgba(0,0,0,0.3);
49+
box-shadow: 0px 0px 3px -1px rgba(0, 0, 0, 0.3);
4850
height: 40px;
4951
border-radius: 5px;
5052
box-sizing: border-box;
@@ -55,18 +57,18 @@ body, html {
5557
display: flex;
5658
align-items: center;
5759
justify-content: center;
58-
}
60+
}
5961

60-
/* When using option "useButtonTag" */
61-
.simple-keyboard button.hg-button {
62+
/* When using option "useButtonTag" */
63+
.simple-keyboard button.hg-button {
6264
border-width: 0;
6365
outline: 0;
6466
font-size: inherit;
6567
}
6668

67-
.simple-keyboard.hg-theme-default .hg-button:active {
69+
.simple-keyboard.hg-theme-default .hg-button:active {
6870
background: #e4e4e4;
69-
}
71+
}
7072

7173
.simple-keyboard.hg-theme-default.hg-layout-numeric .hg-button {
7274
width: 33.3%;
@@ -107,4 +109,4 @@ body, html {
107109

108110
.simple-keyboard.hg-theme-default .hg-button.hg-standardBtn[data-skbtn="@"] {
109111
max-width: 60px;
110-
}
112+
}

0 commit comments

Comments
 (0)