-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release version 1.0 See the README.md and linked documentation pages for deatils.
- Loading branch information
0 parents
commit 9c12130
Showing
40 changed files
with
3,454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.swp | ||
._* | ||
.idea | ||
.DS_Store | ||
*.min.js | ||
docs/ | ||
node_modules/ | ||
config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!index.js | ||
!lib/*.min.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Copyright (c) 2016, Cisco Systems, Inc. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Project target files | ||
# | ||
TARGETS = \ | ||
lib/client.min.js \ | ||
lib/endpoints.min.js \ | ||
lib/auth.min.js \ | ||
lib/errors.min.js \ | ||
lib/spec.min.js | ||
|
||
# Project source files | ||
# | ||
SOURCE = \ | ||
lib/client.js \ | ||
lib/endpoints.js \ | ||
lib/auth.js \ | ||
lib/errors.js \ | ||
lib/spec.js | ||
|
||
.PHONY: all clean fake publish test test-util test-extended test-kubernetes test-oshift | ||
|
||
all : $(TARGETS) | ||
|
||
# Publish the project to NPM | ||
# | ||
publish : all | ||
npm publish | ||
|
||
# Create a tar file of the project | ||
# | ||
tar : | ||
npm pack | ||
|
||
# Run project unit tests | ||
# | ||
test : test-util test-kubernetes test-extended | ||
|
||
# Test utility methods | ||
# | ||
test-util : all | ||
node_modules/.bin/mocha --timeout $(TIMEOUT) --recursive test/util | ||
|
||
# Test extended methods | ||
# | ||
test-extended : all | ||
node_modules/.bin/mocha --timeout $(TIMEOUT) --recursive test/extended | ||
|
||
# Test core Kubernetes methods | ||
# | ||
test-kubernetes : all | ||
node_modules/.bin/mocha --timeout $(TIMEOUT) --recursive test/kubernetes | ||
|
||
# Test core OpenShift methods | ||
# | ||
test-oshift : all | ||
node_modules/.bin/mocha --timeout $(TIMEOUT) --recursive test/oshift | ||
|
||
# Generate project documentation using JSDoc and the jsdoc-oblivion theme | ||
# | ||
docs : node_modules/.bin/jsdoc $(SOURCE) jsdoc.conf.json | ||
node_modules/.bin/jsdoc -c jsdoc.conf.json --verbose | ||
|
||
# Pretend to minimize by creating symbolic links | ||
# | ||
fake : | ||
ln -sf client.js lib/client.min.js | ||
ln -sf endpoints.js lib/endpoints.min.js | ||
ln -sf auth.js lib/auth.min.js | ||
|
||
# Remove target files and documentation | ||
# | ||
clean : | ||
rm -rf $(TARGETS) docs/*.html docs/scripts docs/styles | ||
|
||
# Minimize the target javascript file using uglifyjs | ||
# | ||
%.min.js : %.js node_modules/.bin/uglifyjs | ||
node_modules/.bin/uglifyjs $< -o $@ -cmv | ||
|
||
# Install a missing npm package | ||
# | ||
node_modules/.bin/uglifyjs : | ||
npm install uglify-js | ||
|
||
node_modules/.bin/jsdoc : | ||
npm install jsdoc | ||
|
||
node_modules/.bin/mocha : | ||
npm install mocha should |
Oops, something went wrong.