This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-fds.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a01b44  NIFI-6453 - OS agnostic build scripts
2a01b44 is described below

commit 2a01b445dc38ad11b30b0a6f423e04556d9611c3
Author: Rob Fellows <[email protected]>
AuthorDate: Thu Aug 22 16:41:43 2019 -0400

    NIFI-6453 - OS agnostic build scripts
    
    NIFI-6543 - addresing items from code review relating to building on 
Windows.
    
    NIFI-6453 - removing --prefix flags in favor of changing into the proper 
directory to support windows.
    
    This closes #54
    
    Signed-off-by: Scott Aslan <[email protected]>
---
 .eslintrc.js                    |   3 +-
 package-lock.json               | 209 +++++++++++++++++++++++++++++++++++++++-
 package.json                    |  25 ++---
 scripts/clean-install           |  46 ---------
 scripts/clean-install-skipTests |  41 --------
 scripts/clean.js                |  21 ++++
 scripts/copy-files.js           |  40 ++++++++
 scripts/dev-install             |  41 --------
 scripts/dev-install-skipTests   |  38 --------
 9 files changed, 282 insertions(+), 182 deletions(-)

diff --git a/.eslintrc.js b/.eslintrc.js
index 3639b7d..8b794c0 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -85,6 +85,7 @@ module.exports = {
         "prefer-promise-reject-errors": 0,
         "object-curly-newline": 0,
         "no-restricted-globals": 0,
-        "import/prefer-default-export": 0
+        "import/prefer-default-export": 0,
+        "linebreak-style": 0
     }
 };
diff --git a/package-lock.json b/package-lock.json
index 0856f1d..de5e673 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3913,6 +3913,152 @@
             "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
             "dev": true
         },
+        "copyfiles": {
+            "version": "2.1.1",
+            "resolved": 
"https://registry.npmjs.org/copyfiles/-/copyfiles-2.1.1.tgz";,
+            "integrity": 
"sha512-y6DZHve80whydXzBal7r70TBgKMPKesVRR1Sn/raUu7Jh/i7iSLSyGvYaq0eMJ/3Y/CKghwzjY32q1WzEnpp3Q==",
+            "dev": true,
+            "requires": {
+                "glob": "7.0.6",
+                "minimatch": "3.0.4",
+                "mkdirp": "0.5.1",
+                "noms": "0.0.0",
+                "through2": "2.0.5",
+                "yargs": "13.3.0"
+            },
+            "dependencies": {
+                "ansi-regex": {
+                    "version": "4.1.0",
+                    "resolved": 
"https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz";,
+                    "integrity": 
"sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+                    "dev": true
+                },
+                "ansi-styles": {
+                    "version": "3.2.1",
+                    "resolved": 
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz";,
+                    "integrity": 
"sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+                    "dev": true,
+                    "requires": {
+                        "color-convert": "1.9.3"
+                    }
+                },
+                "camelcase": {
+                    "version": "5.3.1",
+                    "resolved": 
"https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz";,
+                    "integrity": 
"sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+                    "dev": true
+                },
+                "cliui": {
+                    "version": "5.0.0",
+                    "resolved": 
"https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz";,
+                    "integrity": 
"sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+                    "dev": true,
+                    "requires": {
+                        "string-width": "3.1.0",
+                        "strip-ansi": "5.2.0",
+                        "wrap-ansi": "5.1.0"
+                    }
+                },
+                "find-up": {
+                    "version": "3.0.0",
+                    "resolved": 
"https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz";,
+                    "integrity": 
"sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+                    "dev": true,
+                    "requires": {
+                        "locate-path": "3.0.0"
+                    }
+                },
+                "get-caller-file": {
+                    "version": "2.0.5",
+                    "resolved": 
"https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz";,
+                    "integrity": 
"sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+                    "dev": true
+                },
+                "is-fullwidth-code-point": {
+                    "version": "2.0.0",
+                    "resolved": 
"https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz";,
+                    "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+                    "dev": true
+                },
+                "require-main-filename": {
+                    "version": "2.0.0",
+                    "resolved": 
"https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz";,
+                    "integrity": 
"sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+                    "dev": true
+                },
+                "string-width": {
+                    "version": "3.1.0",
+                    "resolved": 
"https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz";,
+                    "integrity": 
"sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+                    "dev": true,
+                    "requires": {
+                        "emoji-regex": "7.0.3",
+                        "is-fullwidth-code-point": "2.0.0",
+                        "strip-ansi": "5.2.0"
+                    }
+                },
+                "strip-ansi": {
+                    "version": "5.2.0",
+                    "resolved": 
"https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz";,
+                    "integrity": 
"sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+                    "dev": true,
+                    "requires": {
+                        "ansi-regex": "4.1.0"
+                    }
+                },
+                "which-module": {
+                    "version": "2.0.0",
+                    "resolved": 
"https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz";,
+                    "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+                    "dev": true
+                },
+                "wrap-ansi": {
+                    "version": "5.1.0",
+                    "resolved": 
"https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz";,
+                    "integrity": 
"sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+                    "dev": true,
+                    "requires": {
+                        "ansi-styles": "3.2.1",
+                        "string-width": "3.1.0",
+                        "strip-ansi": "5.2.0"
+                    }
+                },
+                "y18n": {
+                    "version": "4.0.0",
+                    "resolved": 
"https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz";,
+                    "integrity": 
"sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
+                    "dev": true
+                },
+                "yargs": {
+                    "version": "13.3.0",
+                    "resolved": 
"https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz";,
+                    "integrity": 
"sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==",
+                    "dev": true,
+                    "requires": {
+                        "cliui": "5.0.0",
+                        "find-up": "3.0.0",
+                        "get-caller-file": "2.0.5",
+                        "require-directory": "2.1.1",
+                        "require-main-filename": "2.0.0",
+                        "set-blocking": "2.0.0",
+                        "string-width": "3.1.0",
+                        "which-module": "2.0.0",
+                        "y18n": "4.0.0",
+                        "yargs-parser": "13.1.1"
+                    }
+                },
+                "yargs-parser": {
+                    "version": "13.1.1",
+                    "resolved": 
"https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz";,
+                    "integrity": 
"sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
+                    "dev": true,
+                    "requires": {
+                        "camelcase": "5.3.1",
+                        "decamelize": "1.2.0"
+                    }
+                }
+            }
+        },
         "core-js": {
             "version": "2.5.5",
             "resolved": 
"https://registry.npmjs.org/core-js/-/core-js-2.5.5.tgz";,
@@ -6300,14 +6446,22 @@
             }
         },
         "fs-extra": {
-            "version": "7.0.1",
-            "resolved": 
"https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz";,
-            "integrity": 
"sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+            "version": "8.1.0",
+            "resolved": 
"https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz";,
+            "integrity": 
"sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
             "dev": true,
             "requires": {
-                "graceful-fs": "4.1.11",
+                "graceful-fs": "4.2.2",
                 "jsonfile": "4.0.0",
                 "universalify": "0.1.2"
+            },
+            "dependencies": {
+                "graceful-fs": {
+                    "version": "4.2.2",
+                    "resolved": 
"https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz";,
+                    "integrity": 
"sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==",
+                    "dev": true
+                }
             }
         },
         "fs-write-stream-atomic": {
@@ -10819,6 +10973,42 @@
                 }
             }
         },
+        "noms": {
+            "version": "0.0.0",
+            "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz";,
+            "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=",
+            "dev": true,
+            "requires": {
+                "inherits": "2.0.3",
+                "readable-stream": "1.0.34"
+            },
+            "dependencies": {
+                "isarray": {
+                    "version": "0.0.1",
+                    "resolved": 
"https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz";,
+                    "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
+                    "dev": true
+                },
+                "readable-stream": {
+                    "version": "1.0.34",
+                    "resolved": 
"https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz";,
+                    "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+                    "dev": true,
+                    "requires": {
+                        "core-util-is": "1.0.2",
+                        "inherits": "2.0.3",
+                        "isarray": "0.0.1",
+                        "string_decoder": "0.10.31"
+                    }
+                },
+                "string_decoder": {
+                    "version": "0.10.31",
+                    "resolved": 
"https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";,
+                    "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
+                    "dev": true
+                }
+            }
+        },
         "nopt": {
             "version": "3.0.6",
             "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz";,
@@ -14155,6 +14345,17 @@
                         "ms": "2.1.2"
                     }
                 },
+                "fs-extra": {
+                    "version": "7.0.1",
+                    "resolved": 
"https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz";,
+                    "integrity": 
"sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
+                    "dev": true,
+                    "requires": {
+                        "graceful-fs": "4.1.11",
+                        "jsonfile": "4.0.0",
+                        "universalify": "0.1.2"
+                    }
+                },
                 "lodash": {
                     "version": "4.17.14",
                     "resolved": 
"https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz";,
diff --git a/package.json b/package.json
index 45a2cb2..be69c6f 100644
--- a/package.json
+++ b/package.json
@@ -16,22 +16,23 @@
     "name": "nifi-fds",
     "version": "0.3.0-SNAPSHOT",
     "scripts": {
-        "start": "./node_modules/http-server/bin/http-server --gzip -p 28080 
.",
+        "start": "http-server --gzip -p 28080 .",
+        "clean-and-copy": "node scripts/clean.js && node 
scripts/copy-files.js",
         "build:webapp:bundle:development": "npm run webpack:development",
         "build:webapp:bundle:production": "npm run webpack:production",
-        "clean:install": "bash ./scripts/clean-install",
-        "clean:install:skipTests": "bash ./scripts/clean-install-skipTests",
-        "dev:install": "bash ./scripts/dev-install",
-        "dev:install:skipTests": "bash ./scripts/dev-install-skipTests",
+        "clean:install": "npm run clean-and-copy && cd 
./target/frontend-working-directory && npm install && npm test && npm run 
build:webapp:bundle:production",
+        "clean:install:skipTests": "npm run clean-and-copy && cd 
./target/frontend-working-directory && npm install && npm run 
build:webapp:bundle:production",
+        "dev:install": "node scripts/copy-files.js && cd 
./target/frontend-working-directory && npm install && npm test && npm  run 
build:webapp:bundle:development",
+        "dev:install:skipTests": "node scripts/copy-files.js && cd 
./target/frontend-working-directory && npm install && npm run 
build:webapp:bundle:development",
         "publish": "bash ./scripts/npm-publish",
         "test": "karma start karma.conf.js --single-run",
         "test:dev": "karma start karma.conf.js",
-        "watch": "npm run webpack:development && 
./node_modules/.bin/webpack-dev-server --config webpack.dev.js",
-        "webpack:analyze": "./node_modules/.bin/webpack-bundle-analyzer 
webpack-build-log.json ./",
-        "webpack:development": "./node_modules/.bin/webpack --config 
webpack.dev.js",
-        "webpack:production": "npm run lint && ./node_modules/.bin/webpack 
--config webpack.prod.js --json --progress --profile > webpack-build-log.json",
-        "eslint": "./node_modules/.bin/eslint './webapp/**/*.js' 
'./platform/**/*.js'",
-        "stylelint": "./node_modules/.bin/stylelint 
'./webapp/theming/**/*.scss' './platform/**/*.scss'",
+        "watch": "npm run webpack:development && webpack-dev-server --config 
webpack.dev.js",
+        "webpack:analyze": "webpack-bundle-analyzer webpack-build-log.json ./",
+        "webpack:development": "webpack --config webpack.dev.js",
+        "webpack:production": "npm run lint && webpack --config 
webpack.prod.js --json --progress --profile > webpack-build-log.json",
+        "eslint": "eslint ./webapp/**/*.js ./platform/**/*.js",
+        "stylelint": "stylelint ./webapp/theming/**/*.scss 
./platform/**/*.scss",
         "lint": "npm run eslint && npm run stylelint"
     },
     "husky": {
@@ -95,6 +96,7 @@
         "babel-polyfill": "6.26.0",
         "cache-loader": "4.0.1",
         "compression-webpack-plugin": "3.0.0",
+        "copyfiles": "2.1.1",
         "css-loader": "3.0.0",
         "dtsgenerator": "2.0.8",
         "eslint": "6.0.1",
@@ -103,6 +105,7 @@
         "eslint-plugin-jsx-a11y": "6.2.3",
         "eslint-plugin-react": "7.14.2",
         "file-loader": "4.0.0",
+        "fs-extra": "8.1.0",
         "grunt": "1.0.4",
         "grunt-bump": "0.8.0",
         "grunt-cli": "1.3.2",
diff --git a/scripts/clean-install b/scripts/clean-install
deleted file mode 100755
index 6643c7e..0000000
--- a/scripts/clean-install
+++ /dev/null
@@ -1,46 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#!/usr/bin/env bash
-set -e
-
-# build
-rm -rf ./target
-mkdir target
-mkdir ./target/frontend-working-directory
-
-cp -R ./webapp/ ./target/frontend-working-directory/webapp
-cp -R ./platform/ ./target/frontend-working-directory/platform
-cp package.json ./target/frontend-working-directory/package.json
-cp package-lock.json ./target/frontend-working-directory/package-lock.json
-cp README.md ./target/frontend-working-directory/README.md
-cp LICENSE ./target/frontend-working-directory/LICENSE
-cp NOTICE ./target/frontend-working-directory/NOTICE
-cp ./webpack.*.js ./target/frontend-working-directory/
-cp ./karma.conf.js ./target/frontend-working-directory/karma.conf.js
-cp ./karma-test-shim.js ./target/frontend-working-directory/karma-test-shim.js
-cp Gruntfile.js ./target/frontend-working-directory/Gruntfile.js
-cp ./webapp/gh-pages.* ./target/frontend-working-directory/
-cp angular-url-loader.js ./target/frontend-working-directory/
-cp .eslint* ./target/frontend-working-directory/
-cd ./target/frontend-working-directory
-
-npm install
-
-# test
-npm test
-
-# build js bundle
-npm run build:webapp:bundle:production
-
diff --git a/scripts/clean-install-skipTests b/scripts/clean-install-skipTests
deleted file mode 100644
index ac3fe7e..0000000
--- a/scripts/clean-install-skipTests
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#!/usr/bin/env bash
-set -e
-
-# build
-rm -rf ./target
-mkdir target
-mkdir ./target/frontend-working-directory
-cp -R ./webapp/ ./target/frontend-working-directory/webapp
-cp -R ./platform/ ./target/frontend-working-directory/platform
-cp package.json ./target/frontend-working-directory/package.json
-cp package-lock.json ./target/frontend-working-directory/package-lock.json
-cp README.md ./target/frontend-working-directory/README.md
-cp LICENSE ./target/frontend-working-directory/LICENSE
-cp NOTICE ./target/frontend-working-directory/NOTICE
-cp ./webpack.*.js ./target/frontend-working-directory/
-cp ./karma.conf.js ./target/frontend-working-directory/karma.conf.js
-cp ./karma-test-shim.js ./target/frontend-working-directory/karma-test-shim.js
-cp Gruntfile.js ./target/frontend-working-directory/Gruntfile.js
-cp ./webapp/gh-pages.* ./target/frontend-working-directory/
-cp angular-url-loader.js ./target/frontend-working-directory/
-cp .eslint* ./target/frontend-working-directory/
-cd ./target/frontend-working-directory
-npm install
-
-# build js bundle
-npm run build:webapp:bundle:production
-
diff --git a/scripts/clean.js b/scripts/clean.js
new file mode 100644
index 0000000..711212e
--- /dev/null
+++ b/scripts/clean.js
@@ -0,0 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const fse = require('fs-extra');
+
+// blow away the target folder and everything in it
+fse.removeSync('./target');
diff --git a/scripts/copy-files.js b/scripts/copy-files.js
new file mode 100644
index 0000000..33eb71e
--- /dev/null
+++ b/scripts/copy-files.js
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const fse = require('fs-extra');
+const copyfiles = require('copyfiles');
+
+fse.copySync('./webapp/', './target/frontend-working-directory/webapp');
+fse.copySync('./platform/', './target/frontend-working-directory/platform');
+
+const paths = [
+    'package.json',
+    'package-lock.json',
+    'README.md',
+    'LICENSE',
+    'NOTICE',
+    './webpack.*.js',
+    'karma.conf.js',
+    'karma-test-shim.js',
+    'Gruntfile.js',
+    './webapp/gh-pages.*',
+    'angular-url-loader.js',
+    '.eslint*',
+    './target/frontend-working-directory' // destination
+];
+
+copyfiles(paths, { all: true }, () => { console.log('Copy files complete.') });
diff --git a/scripts/dev-install b/scripts/dev-install
deleted file mode 100644
index b297517..0000000
--- a/scripts/dev-install
+++ /dev/null
@@ -1,41 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#!/usr/bin/env bash
-set -e
-
-# build
-cp -Rf ./webapp/ ./target/frontend-working-directory/webapp
-cp -Rf ./platform/ ./target/frontend-working-directory/platform
-cp package.json ./target/frontend-working-directory/package.json
-cp package-lock.json ./target/frontend-working-directory/package-lock.json
-cp README.md ./target/frontend-working-directory/README.md
-cp LICENSE ./target/frontend-working-directory/LICENSE
-cp NOTICE ./target/frontend-working-directory/NOTICE
-cp ./webpack.*.js ./target/frontend-working-directory/
-cp ./karma.conf.js ./target/frontend-working-directory/karma.conf.js
-cp ./karma-test-shim.js ./target/frontend-working-directory/karma-test-shim.js
-cp Gruntfile.js ./target/frontend-working-directory/Gruntfile.js
-cp ./webapp/gh-pages.* ./target/frontend-working-directory/
-cp angular-url-loader.js ./target/frontend-working-directory/
-cp .eslint* ./target/frontend-working-directory/
-cd ./target/frontend-working-directory
-npm install
-
-# test
-npm test
-
-# build js bundle
-npm run build:webapp:bundle:development
-
diff --git a/scripts/dev-install-skipTests b/scripts/dev-install-skipTests
deleted file mode 100644
index a246b7d..0000000
--- a/scripts/dev-install-skipTests
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#!/usr/bin/env bash
-set -e
-
-# build
-cp -Rf ./webapp/ ./target/frontend-working-directory/webapp
-cp -Rf ./platform/ ./target/frontend-working-directory/platform
-cp package.json ./target/frontend-working-directory/package.json
-cp package-lock.json ./target/frontend-working-directory/package-lock.json
-cp README.md ./target/frontend-working-directory/README.md
-cp LICENSE ./target/frontend-working-directory/LICENSE
-cp NOTICE ./target/frontend-working-directory/NOTICE
-cp ./webpack.*.js ./target/frontend-working-directory/
-cp ./karma.conf.js ./target/frontend-working-directory/karma.conf.js
-cp ./karma-test-shim.js ./target/frontend-working-directory/karma-test-shim.js
-cp Gruntfile.js ./target/frontend-working-directory/Gruntfile.js
-cp ./webapp/gh-pages.* ./target/frontend-working-directory/
-cp angular-url-loader.js ./target/frontend-working-directory/
-cp .eslint* ./target/frontend-working-directory/
-cd ./target/frontend-working-directory
-npm install
-
-# build js bundle
-npm run build:webapp:bundle:development
-

Reply via email to