| # 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/ |
| cd ./target/frontend-working-directory |
| npm install |
| |
| # test |
| npm test |
| |
| # build js bundle |
| npm run build:webapp:bundle:production |
| |