diff options
author | Joe George <joe@zeroc.com> | 2015-04-14 14:34:44 -0400 |
---|---|---|
committer | Joe George <joe@zeroc.com> | 2015-04-14 14:34:44 -0400 |
commit | 3517c1a97c080c4a239a7b4749884e6e28144c21 (patch) | |
tree | 3d3047c84b258666190f017f0234a300bf283bc5 | |
parent | Make javascript bulid use gulp-ice-builder package (diff) | |
download | ice-3517c1a97c080c4a239a7b4749884e6e28144c21.tar.bz2 ice-3517c1a97c080c4a239a7b4749884e6e28144c21.tar.xz ice-3517c1a97c080c4a239a7b4749884e6e28144c21.zip |
Npm changes
- js/ will be the 'root' for the npm package
- Add Readme.md
- Update package.json and bower.json
-rw-r--r-- | js/.npmignore | 2 | ||||
-rw-r--r-- | js/README.md | 54 | ||||
-rw-r--r-- | js/bower.json | 2 | ||||
-rw-r--r-- | js/package.json | 9 |
4 files changed, 61 insertions, 6 deletions
diff --git a/js/.npmignore b/js/.npmignore new file mode 100644 index 00000000000..ef91312dd9f --- /dev/null +++ b/js/.npmignore @@ -0,0 +1,2 @@ +Makefile +Makefile.mak diff --git a/js/README.md b/js/README.md new file mode 100644 index 00000000000..cf84d9ba13b --- /dev/null +++ b/js/README.md @@ -0,0 +1,54 @@ +# ice +Ice for JavaScript runtime + +## Install + +You can install Ice for JavaScript with either `npm` or `bower`. + +### npm +```bash +$ npm install ice --save +``` + +## Usage + +### npm + +```js +var Ice = require('ice').Ice; +var Glacier2 = require('ice').Glacier2; +var IceStorm = require('ice').IceStorm; +var IceGrid = require('ice').IceGrid; + +var communicator = Ice.initialize(process.argv); +var proxy = communicator.stringToProxy("hello:tcp -h localhost -p 10000"); +``` + +The npm package also includes the browser version of Ice for JavaScript. Add the necessary `<script>` tags to your html to include the Ice for JavaScript components you require. `node_modules` must server out from the root directory of your web server. + +```html +<script src="/node_modules/ice/lib/Ice.js"></script> +<script src="/node_modules/ice/lib/Glacier2.js"></script> +<script src="/node_modules/ice/lib/IceStorm.js"></script> +<script src="/node_modules/ice/lib/IceGrid.js"></script> +<script type="text/javascript"> + var communicator = Ice.initialize(); + var proxy = communicator.stringToProxy("hello:ws -h localhost -p 10002"); +</script> +``` + +Minified versions are available with the `.min.js` extension. + +## Documentation + +See the [Ice Documentation](https://doc.zeroc.com/display/Ice36/JavaScript+Mapping). + +## Slice2js Compiler + +To compile [Slice](https://doc.zeroc.com/display/Ice36/The+Slice+Language) files to JavaScript see the following: +- [slice2js](https://github.com/zeroc-ice/slice2js) +- [gulp-ice-builder](https://github.com/zeroc-ice/gulp-ice-builder) + +## Demos + +A collection of demos for Ice for JavaScript (and other language mappings) can be found [here](https://github.com/zeroc-ice/ice-demos). diff --git a/js/bower.json b/js/bower.json index 09a6a286758..d7bfbcc2499 100644 --- a/js/bower.json +++ b/js/bower.json @@ -6,7 +6,7 @@ "homepage": "https://zeroc.com", "repository": { "type": "git", - "url": "https://github.com/zeroc-inc/bower-icejs.git" + "url": "https://github.com/zeroc-ice/bower-ice.git" }, "license": "GPL-2.0", "main": [ diff --git a/js/package.json b/js/package.json index f52f15e6bd2..446c10feb47 100644 --- a/js/package.json +++ b/js/package.json @@ -1,13 +1,12 @@ { - "name": "zeroc-icejs", + "name": "ice", "version": "3.6.0", "description": "Ice (Internet Communications Engine)", "author": "Zeroc, Inc.", - "homepage": "https://www.zeroc.com", - "repository": "https://github.com/zeroc-inc/zeroc-icejs.git", + "homepage": "https://zeroc.com", + "repository": "https://github.com/zeroc-ice/ice.git", "license": "GPL-2.0", "main": "src/zeroc-icejs", - "private": "true", "devDependencies": { "bower": "^1.3.12", "browser-sync": "^2.2.2", @@ -18,7 +17,7 @@ "gulp-ext-replace": "^0.1.0", "gulp-gzip": "1.0.0", "gulp-jshint": "^1.9.2", - "gulp-ice-builder": "git+ssh://github.com:zeroc-ice/gulp-ice-builder.git", + "gulp-ice-builder": "zeroc-ice/gulp-ice-builder", "gulp-minify-css": "^0.5.1", "gulp-newer": "^0.5.0", "gulp-open": "^0.3.2", |