Skip to content

Commit 137c112

Browse files
authored
Merge pull request #47 from fredosauce/master
Fix 'npm run prod' hang
2 parents d725a41 + bbba708 commit 137c112

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

__tests__/componentReducer.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ describe('Testing componentReducer functionality', function () {
7373
})
7474

7575
// TEST 'UPDATE CSS'
76-
76+
describe('UPDATE CSS reducer', () => {
77+
it('should update background color of focused component', () => {
78+
79+
})
80+
})
7781

7882
// TEST 'RESET STATE'
7983

app/electron/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ app.on('window-all-closed', () => {
202202
app.quit();
203203
});
204204

205-
app.on('activate', async () => {
205+
app.on('activate', () => {
206206
// On macOS it's common to re-create a window in the app when the
207207
// dock icon is clicked and there are no other windows open.
208208
if (win === null) {
209-
await createWindow();
209+
createWindow();
210210
}
211211
});
212212

app/src/helperFunctions/generateCode.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Component, State, ChildElement } from '../interfaces/InterfacesNew';
22
import HTMLTypes from '../context/HTMLTypes';
3-
const { format } = require('prettier');
3+
4+
45

56
declare global {
67
interface Window {
@@ -222,6 +223,7 @@ const formatCode = (code: string) => {
222223
// in test environment, window.api is not defined,
223224
// so we reference original prettier format function instead
224225
if (process.env.NODE_ENV === 'test') {
226+
const { format } = require('prettier');
225227
return format(code, {
226228
singleQuote: true,
227229
trailingComma: 'es5',

app/src/utils/createNonce.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ const { v4: uuidv4 } = require('uuid');
33
// Generate an arbitrary number
44
// this arbitrary number will be used in CspHtmlWebpackPlugin and HtmlWebpackPlugin configuration in webpack
55
module.exports = function() {
6-
return new Buffer(uuidv4()).toString('base64');
6+
return new Buffer.from(uuidv4()).toString('base64');
77
};

0 commit comments

Comments
 (0)