| Jeremy Mordkoff | e29efc3 | 2016-09-07 18:59:17 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # |
| 4 | # Copyright 2016 RIFT.IO Inc |
| 5 | # |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # |
| 18 | |
| 19 | |
| 20 | # change to the directory of this script |
| 21 | THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 22 | cd $THIS_DIR |
| 23 | cd .. |
| 24 | |
| 25 | echo "NPM config" |
| 26 | npm config ls |
| 27 | echo "Building RW.UI framework" |
| 28 | npm install |
| 29 | echo "RW.UI framework build... done" |
| 30 | |
| 31 | echo "Building RW.UI plugins" |
| 32 | cd plugins |
| 33 | for f in *; do |
| 34 | if [[ -d $f ]]; then |
| 35 | echo 'Building plugin '$f |
| 36 | cd $f |
| 37 | echo 'Fetching third-party node_modules for '$f |
| 38 | npm install |
| 39 | echo 'Fetching third-party node_modules for '$f'...done' |
| 40 | echo 'Packaging '$f' using webpack' |
| Bob Gallagher | 7ddd5bf | 2017-03-13 16:41:02 -0400 | [diff] [blame] | 41 | ./node_modules/.bin/webpack --optimize-minimize --progress --config webpack.production.config.js |
| Jeremy Mordkoff | e29efc3 | 2016-09-07 18:59:17 -0400 | [diff] [blame] | 42 | echo 'Packaging '$f' using webpack... done' |
| 43 | cd .. |
| 44 | echo 'Building plugin '$f'... done' |
| 45 | fi |
| 46 | done |
| 47 | |
| 48 | echo "Building RW.UI plugins... done" |
| 49 | |