From 5a1fa0f1c4360562daff93ae0cb7ee24db6064e8 Mon Sep 17 00:00:00 2001 From: Matthew Casperson Date: Thu, 27 Dec 2018 20:11:26 +1000 Subject: [PATCH] Windows build fixes (#192) * Forced checkouts to use LF line endings and added NPM cripts for windows * Updated the readme * Removed verbose logs --- .gitattributes | 1 + app/README.rst | 13 +++++++++++++ app/package.json | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..07764a7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text eol=lf \ No newline at end of file diff --git a/app/README.rst b/app/README.rst index b12d516..a6ea632 100644 --- a/app/README.rst +++ b/app/README.rst @@ -12,3 +12,16 @@ Frontend development is supported by watching the source code and continuously r .. code-block:: bash $ npm start + +Windows uses slightly different scripts. This will build the JavaScript app in Windows: + +.. code-block:: powershell + + $ npm install + $ npm run buildwin + +This will start the code watch and rebuild script in Windows: + +.. code-block:: powershell + + $ npm run startwin diff --git a/app/package.json b/app/package.json index 198e02d..3884466 100644 --- a/app/package.json +++ b/app/package.json @@ -9,8 +9,10 @@ "scripts": { "prestart": "npm install", "start": "NODE_ENV=development webpack --watch", + "startwin": "SET NODE_ENV=development & webpack --watch", "webpack": "webpack -p --config ./webpack.config.js", "build": "NODE_ENV=production npm run webpack", + "buildwin": "SET NODE_ENV=production & npm run webpack", "prewebpack": "npm run clean", "lint": "eslint ./src/**/*.js", "clean": "rimraf $npm_package_config_buildDir && mkdir $npm_package_config_buildDir"