blob: 31c58c3347907c23e2fce6c4dde8c445b6f5f173 [file] [log] [blame]
# 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 ./src/demo-app/ ./target/demo-app
cp -Rf ./src/platform/ ./target/platform
cp package.json ./target/package.json
cp package-lock.json ./target/package-lock.json
cp README.md ./target/README.md
cp LICENSE ./target/LICENSE
cp NOTICE ./target/NOTICE
cp ./src/demo-app/index.html ./target/index.html
cp ./test/karma.conf.js ./target/karma.conf.js
cp ./test/karma-test-shim.js ./target/karma-test-shim.js
cp Gruntfile.js ./target/Gruntfile.js
cp ./src/demo-app/gh-pages.* ./target/
cd ./target
npm install
# build platform base styles
npm run build:platform
# simulate npm install of @nifi-fds/core
rm -rf ./node_modules/@nifi-fds
mkdir ./node_modules/@nifi-fds
mv ./platform/core/ ./node_modules/@nifi-fds
cp ../README.md ./node_modules/@nifi-fds/core/
cp ../LICENSE ./node_modules/@nifi-fds/core/
cp ../NOTICE ./node_modules/@nifi-fds/core/
# build demo theme
npm run build:demo-app
# clean up
rm -rf ./platform