diff options
author | Jose <jose@zeroc.com> | 2015-01-14 09:22:33 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-01-14 09:22:33 +0100 |
commit | 195454df0895051579cd83d6e64d2308a8f42c16 (patch) | |
tree | 6527548e026a929f410aef51ad467b26c4e8bf2c /distribution/src/js/zeroc-slice2js/slice2js.js | |
parent | Fix another bug with hello demos. (diff) | |
download | ice-195454df0895051579cd83d6e64d2308a8f42c16.tar.bz2 ice-195454df0895051579cd83d6e64d2308a8f42c16.tar.xz ice-195454df0895051579cd83d6e64d2308a8f42c16.zip |
JavaScript updates to use gulp and add npm and bower packages
Diffstat (limited to 'distribution/src/js/zeroc-slice2js/slice2js.js')
-rw-r--r-- | distribution/src/js/zeroc-slice2js/slice2js.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/distribution/src/js/zeroc-slice2js/slice2js.js b/distribution/src/js/zeroc-slice2js/slice2js.js new file mode 100644 index 00000000000..ed7a8f52226 --- /dev/null +++ b/distribution/src/js/zeroc-slice2js/slice2js.js @@ -0,0 +1,28 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. +// +// This copy of Ice is licensed to you under the terms described in the +// ICE_LICENSE file included in this distribution. +// +// ********************************************************************** + +var spawn = require('child_process').spawn; +var path = require('path'); +var os = require('os'); +var platform = os.platform(); +var arch = os.arch(); + +module.exports = function(args, options) +{ + var bin_dir = path.join(__dirname, 'build', 'Release'); + var slice2js = platform === 'win32' ? 'slice2js.exe' : 'slice2js'; + slice2js = path.join(bin_dir, slice2js); + + var slice_dir = path.resolve(path.join(__dirname, 'slice')); + + var slice2js_args = args.slice(); + slice2js_args.push('-I' + slice_dir); + + return spawn(slice2js, slice2js_args, options); +}; |