Skip to content

Commit

Permalink
Put the 3rd party JavaScript and CSS files under the third_party dire…
Browse files Browse the repository at this point in the history
…ctory. (#24)
  • Loading branch information
ZhangLe2016 authored and jwhui committed Jun 7, 2017
1 parent 0276872 commit 349e3e3
Show file tree
Hide file tree
Showing 16 changed files with 605 additions and 33 deletions.
7 changes: 0 additions & 7 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ set -e

case $TRAVIS_OS_NAME in
linux)
# Bower
[ $BUILD_TARGET != posix-check ] || {
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm -g install bower
}

# Uncrustify
[ $BUILD_TARGET != pretty-check ] || [ "$($TOOLS_HOME/usr/bin/uncrustify --version)" = 'Uncrustify-0.65' ] || (cd /tmp &&
wget https://github.com/uncrustify/uncrustify/archive/uncrustify-0.65.tar.gz &&
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ third_party/libcoap/Makefile
third_party/mbedtls/Makefile
third_party/wpantund/Makefile
third_party/mdl/Makefile
third_party/angular/Makefile
third_party/angular-material/Makefile
include/Makefile
src/Makefile
src/agent/Makefile
Expand Down
8 changes: 0 additions & 8 deletions script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,6 @@ install_packages_apt()
# Boost
sudo apt-get install -y libboost-dev libboost-filesystem-dev libboost-system-dev

# npm bower
if ! which bower; then
sudo apt-get install -y curl
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm -g install bower
fi

# nat64
sudo apt-get install -y tayga
}
Expand Down
18 changes: 0 additions & 18 deletions src/web/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -95,26 +95,9 @@ libotbr_web_la_CPPFLAGS = \
-std=c++11 \
$(NULL)

bower_dir = web-service/frontend/bower_components

JS_FILES = \
$(bower_dir)/angular/angular.min.js \
$(bower_dir)/angular-animate/angular-animate.min.js \
$(bower_dir)/angular-aria/angular-aria.min.js \
$(bower_dir)/angular-material/angular-material.min.js \
$(NULL)

CSS_FILES = \
$(bower_dir)/angular-material/angular-material.min.css \
$(NULL)

$(JS_FILES) $(CSS_FILES):
cd web-service/frontend && bower install angular-material

jsdir = $(datadir)/border-router/frontend/res/js
js_DATA = \
web-service/frontend/res/js/app.js \
$(JS_FILES) \
$(NULL)

imgdir = $(datadir)/border-router/frontend/res/img
Expand All @@ -130,7 +113,6 @@ img_DATA = \
cssdir = $(datadir)/border-router/frontend/res/css
css_DATA = \
web-service/frontend/res/css/styles.css \
$(CSS_FILES) \
$(NULL)

htmldir = $(datadir)/border-router/frontend
Expand Down
2 changes: 2 additions & 0 deletions third_party/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ SUBDIRS = \
libcoap \
Simple-web-server \
mdl \
angular \
angular-material \
$(NULL)

include $(abs_top_nlbuild_autotools_dir)/automake/post.am
46 changes: 46 additions & 0 deletions third_party/angular-material/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Copyright (c) 2017, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

include $(abs_top_nlbuild_autotools_dir)/automake/pre.am

jsdir = $(datadir)/border-router/frontend/res/js
js_DATA = \
repo/angular-material.min.js \
$(NULL)

cssdir = $(datadir)/border-router/frontend/res/css
css_DATA = \
repo/angular-material.min.css \
$(NULL)

EXTRA_DIST = \
$(js_DATA) \
$(css_DATA) \
$(NULL)

include $(abs_top_nlbuild_autotools_dir)/automake/post.am
22 changes: 22 additions & 0 deletions third_party/angular-material/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Material Design for AngularJS

## URL

https://github.com/angular/bower-material/releases/tag/v1.1.4-master-e1345ae

## Version

1.1.4

## License

MIT License

## License File

[LICENSE](repo/LICENSE)

## Description
Material Design is a specification for a unified system of visual, motion, and interaction design that adapts across different devices. Our goal is to deliver a lean, lightweight set of AngularJS-native UI elements that implement the material design specification for use in AngularJS single-page applications (SPAs).

Note: only the minimum set of files necessary to support the OpenThread project are included here.
21 changes: 21 additions & 0 deletions third_party/angular-material/repo/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2014-2017 Google, Inc. http://angularjs.org

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 6 additions & 0 deletions third_party/angular-material/repo/angular-material.min.css

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions third_party/angular-material/repo/angular-material.min.js

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions third_party/angular/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) 2017, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the copyright holder nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#

include $(abs_top_nlbuild_autotools_dir)/automake/pre.am

jsdir = $(datadir)/border-router/frontend/res/js
js_DATA = \
repo/angular.min.js \
repo/angular-animate.min.js \
repo/angular-aria.min.js \
$(NULL)

EXTRA_DIST = \
$(js_DATA) \
$(NULL)

include $(abs_top_nlbuild_autotools_dir)/automake/post.am
22 changes: 22 additions & 0 deletions third_party/angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# AngularJS

## URL

https://code.angularjs.org/1.6.4/

## Version

v1.6.4

## License

MIT License

## License File

[LICENSE](repo/angular/LICENSE.md)

## Description
Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages.

Note: only the minimum set of files necessary to support the OpenThread project are included here.
21 changes: 21 additions & 0 deletions third_party/angular/repo/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2016 Angular

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 349e3e3

Please sign in to comment.