blob: 044268d4cbaabbeedbadd347cb9a797fcc92f9bf [file] [log] [blame]
Jeremy Mordkoffe29efc32016-09-07 18:59:17 -04001#!/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
21THIS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
22cd $THIS_DIR
23cd ..
24
25echo "NPM config"
26npm config ls
27echo "Building RW.UI framework"
28npm install
29echo "RW.UI framework build... done"
30
31echo "Building RW.UI plugins"
32cd plugins
33for 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'
41 ./node_modules/.bin/webpack --progress --config webpack.production.config.js
42 echo 'Packaging '$f' using webpack... done'
43 cd ..
44 echo 'Building plugin '$f'... done'
45 fi
46done
47
48echo "Building RW.UI plugins... done"
49