Skip to content

Commit 83de408

Browse files
committed
switching example to use bower-installed library (still symlinked to root when developing)
1 parent 225418e commit 83de408

26 files changed

+42
-27
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ env:
2424
- secure: NDOdoAt1bjGspsU9CZl494GW9OEC9J56OCJloyfd0KGkDmKLNpYGw5eHXmJfLVqKAvldhOpjp0aNSrrwVcT2qvE2dhtYkL+a5hVMZFr7DdfOtZze/MIdCpoQhZQz8+wQa82crGgf+cTL2Y+BndkQoDk5mMo/3sAf512euHTHJXb+9DZ36ZJYIK/hVTfzZMdUUH7059rYeUADhXXcbu1Va+cJHXr2xRFI8ZEdZfZ0V1jDEqPyi/hwDYODgsTpk/4jRFlkZu2Agxq2kOETeuJYiTJ7O9Q1qhY3rSAgu/rvQK8+Y7ngTxWS8rStOOr8CNXJtmZdM0zpz6RbmQEhR5Xk4s8aX1rxPDj06/Cx7BVWKZWb7wGJETjKq/+NLv/tK9tXDVZ5oBj/H9VkUm2gWqWCKaAge9xW+wuh/LluGMZIx+pTDI94AbgIZnxP2HoALmGIvyim7AquvQqaqIqVR3XTXZUccYM5yRCkxHknZbbL/hX4GOM/I1Ue24d5wt4okkGV2R/DNWYfnajB7GZOTvK5/kn7x6bJpU0Ls9ZYW+4V0zUO/3g5KalU3Cire/dSOC7WzrL823koEgpF9KCVjtCCsj1wMZI099FTGFljqfzlVKMy4Sw4tafRjpkQQT3GLoX1CV/B4n4BDOySoGBPlM0JYiEua+J5GNpeq34n38bwn4g=
2525
before_deploy:
2626
- npm run build
27-
# cf push ignores symlinks, so copy the file manually
28-
# https://github.com/cloudfoundry/cli/issues/108
29-
- rm examples/static/watson-speech.js
30-
- cp dist/watson-speech.js examples/static/watson-speech.js
3127
- npm install -g cf-blue-green
3228
deploy:
3329
- provider: releases

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "watson-speech",
33
"description": "IBM Watson Speech to Text and Text to Speech SDK for web browsers.",
4-
"main": "dist/watson-speech.min.js",
4+
"main": "dist/watson-speech.js",
55
"authors": [
66
"Nathan Friedly <http://nfriedly.com>"
77
],

examples/.bowerrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"directory": "public/bower_components"
2+
"directory": "static/bower_components/"
33
}

examples/.cfignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules/
22
keys/
3-
static/bower_components/jquery/src/
3+
static/bower_components/

examples/bower.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "watson-speech-examples",
3+
"main": "dist/watson-speech.js",
4+
"authors": [
5+
"Nathan Friedly <http://nfriedly.com>"
6+
],
7+
"license": "Apache-2.0",
8+
"homepage": "https://watson-speech.mybluemix.net/",
9+
"ignore": [
10+
"**/*"
11+
],
12+
"private": true,
13+
"dependencies": {
14+
"watson-speech": "*",
15+
"fetch": "^2.0.2",
16+
"jquery": "^3.1.1"
17+
}
18+
}

examples/readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ Notes
4444
[Python](https://github.com/watson-developer-cloud/python-sdk/blob/master/examples/authorization_v1.py),
4545
and there is a [REST API](http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/getting_started/gs-tokens.shtml)
4646
for use with other languages (or `curl`).
47-
* The Speech SDK may be used in browserify or as a standalone library; all of the current examples use it as a standalone library for simplicity.
47+
* The Speech SDK may be used in browserify, Webpack, or as a standalone library.
48+
Most of the examples use the standalone version either installed via bower or symlinked to the root directory when developing locally.
4849

4950

5051
More Examples
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../dist/

examples/static/file-ajax.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>Output:</h2>
1919
<div id="output">--</div>
2020
</section>
2121

22-
<script src="watson-speech.js"></script>
22+
<script src="bower_components/watson-speech/dist/watson-speech.js"></script>
2323
<!-- window.fetch pollyfill for IE/Edge & Older Chrome/FireFox -->
2424
<script src="bower_components/fetch/fetch.js"></script>
2525

examples/static/file-upload.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>Output:</h2>
1919
<div id="output">--</div>
2020
</section>
2121

22-
<script src="watson-speech.js"></script>
22+
<script src="bower_components/watson-speech/dist/watson-speech.js"></script>
2323
<!-- window.fetch pollyfill for IE/Edge & Older Chrome/FireFox -->
2424
<script src="bower_components/fetch/fetch.js"></script>
2525

examples/static/file-url.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>Output:</h2>
1919
<div id="output">--</div>
2020
</section>
2121

22-
<script src="watson-speech.js"></script>
22+
<script src="bower_components/watson-speech/dist/watson-speech.js"></script>
2323
<!-- window.fetch pollyfill for IE/Edge & Older Chrome/FireFox -->
2424
<script src="bower_components/fetch/fetch.js"></script>
2525

0 commit comments

Comments
 (0)