From c3aa467ad70df58250acd0724f5c820a998ec628 Mon Sep 17 00:00:00 2001 From: Matthew Mihok <4d.69.68.6f.6b@gmail.com> Date: Mon, 19 Jun 2017 07:31:51 -0400 Subject: [PATCH] Fixing Makefile to handle more granular releases --- Makefile | 52 ++++++++++++++++++++++------ package.json | 7 ++++ src/components/InputBar/InputBar.jsx | 1 + 3 files changed, 49 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 9108898..0128095 100644 --- a/Makefile +++ b/Makefile @@ -33,23 +33,53 @@ build: $(NPM_CMD) run build -compile: build - @echo - @# SUPER HACKY - mkdir -p $(ASSETS)/css - sed 's/\.\.\/resources/\.\./g' assets/css/blueprint.css - sed 's/\.\.\/resources/\.\./g' assets/css/blueprint.css.map - mkdir -p $(ASSETS)/icons - cp -r node_modules/@blueprintjs/core/resources/icons/*.{eot,ttf,woff} $(ASSETS)/icons/ - - $(NPM_CMD) run compile -- \ +compile-linux: + @echo "\nLinux\n" + + $(NPM_CMD) run compile:linux -- \ --ignore=README.md \ --ignore=webpack.config.js \ --ignore=Makefile \ --ignore=yarn.lock \ --ignore=.gitignore \ --ignore=src \ - --ignore=node_modules + --ignore=node_modules \ + --win32metadata.CompanyName='Minimal Chat' \ + --win32metadata.ProductName=Operator \ + --appname=Operator \ + --app-copyright=BSD-3 + +compile-win: + @echo "\nWindows\n" + $(NPM_CMD) run compile:win -- \ + --ignore=README.md \ + --ignore=webpack.config.js \ + --ignore=Makefile \ + --ignore=yarn.lock \ + --ignore=.gitignore \ + --ignore=src \ + --ignore=node_modules \ + --win32metadata.CompanyName='Minimal Chat' \ + --win32metadata.ProductName=Operator \ + --appname=Operator \ + --app-copyright=BSD-3 + +compile-osx: + @echo "\nOSX\n" + $(NPM_CMD) run compile:osx -- \ + --ignore=README.md \ + --ignore=webpack.config.js \ + --ignore=Makefile \ + --ignore=yarn.lock \ + --ignore=.gitignore \ + --ignore=src \ + --ignore=node_modules \ + --win32metadata.CompanyName='Minimal Chat' \ + --win32metadata.ProductName=Operator \ + --appname=Operator \ + --app-copyright=BSD-3 + +compile: build compile-linux compile-win compile-osx distribute: @echo diff --git a/package.json b/package.json index ce10d18..393ee45 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,9 @@ "build": "webpack --progress --colors", "build:watch": "webpack --progress --colors --watch", "compile": "electron-packager . --all --out=dist/", + "compile:win": "electron-packager . Operator --platform=win32 --arch=all --out=dist/", + "compile:osx": "electron-packager . Operator --platform=darwin --platform=mas --arch=all --out=dist/", + "compile:linux": "electron-packager . operator --platform=linux --arch=all --out=dist/", "start": "electron ." }, "jest": { @@ -90,5 +93,9 @@ "react-test-renderer": "^15.4.1", "style-loader": "^0.13.1", "webpack": "^2.2.0" + }, + "optionalDependencies": { + "bufferutil": "^3.0.1", + "utf-8-validate": "^3.0.2" } } diff --git a/src/components/InputBar/InputBar.jsx b/src/components/InputBar/InputBar.jsx index ef3333c..b5bf3f3 100644 --- a/src/components/InputBar/InputBar.jsx +++ b/src/components/InputBar/InputBar.jsx @@ -65,6 +65,7 @@ class InputBar extends Component { onChange={this.handleChange} onKeyDown={this.onKeyPress} name="chatText" + value={this.state.chatText} placeholder="Say something meaningful …" />