From c65fbcc9e7ed12d0cfdae7460720387c029ecbf8 Mon Sep 17 00:00:00 2001 From: Will Mitchell Date: Wed, 8 Jan 2014 14:17:42 -0500 Subject: [PATCH] More JsSIP -> SIP.js changes --- BUILDING.md | 24 ++++++++++++------------ Gruntfile.js | 16 +++++++++++----- package.json | 15 ++++++++------- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index a3dcd4c94..4ebb0ff82 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -1,4 +1,4 @@ -## What you need to build JsSIP +## What you need to build SIP.js You just need to have [Node.js](http://nodejs.org/) and [Git](http://git-scm.com/). Optionally you also need [PhantomJS](http://phantomjs.org/) if you want to run test units. @@ -21,11 +21,11 @@ You just need to have [Node.js](http://nodejs.org/) and [Git](http://git-scm.com * In modern Debian/Ubuntu systems PhantomJS can be installed via `apt-get install phantomjs` -## How to build JsSIP +## How to build SIP.js -Clone a copy of the main JsSIP git repository by running: +Clone a copy of the main SIP.js git repository by running: ``` -$ git clone https://github.com/versatica/JsSIP.git +$ git clone https://github.com/onsip/SIP.js.git ``` Install grunt-cli globally: @@ -35,7 +35,7 @@ $ npm install -g grunt-cli Enter the directory and install the Node.js dependencies: ``` -$ cd JsSIP && npm install +$ cd SIP.js && npm install ``` Make sure you have `grunt` installed by testing: @@ -43,22 +43,22 @@ Make sure you have `grunt` installed by testing: $ grunt -version ``` -Finally, run `grunt` command with no arguments to get a complete version of JsSIP: +Finally, run `grunt` command with no arguments to get a complete version of SIP.js: ``` $ grunt ``` -The built version of JsSIP will be available in the `dist/` subdirectory in both flavors: normal (uncompressed) and minified, both linted with [JSLint](http://jslint.com/). There will be also a file named `dist/jssip-devel.js` which is an exact copy of the uncompressed file. +The built version of SIP.js will be available in the `dist/` subdirectory in both flavors: normal (uncompressed) and minified, both linted with [JSLint](http://jslint.com/). There will be also a file named `dist/sip-devel.js` which is an exact copy of the uncompressed file. ## Development version -Run `grunt devel` for just generating the `dist/jssip-devel.js` file. An uncompressed JsSIP source file named `jssip-devel.js` will be created in `dist` directory. +Run `grunt devel` for just generating the `dist/sip-devel.js` file. An uncompressed SIP.js source file named `sip-devel.js` will be created in `dist` directory. ## Test units -JsSIP includes test units based on [QUnit](http://qunitjs.com/). Test units use the `dist/jssip-devel.js` file. Run the tests as follows: +SIP.js includes test units based on [Jasmine](http://pivotal.github.io/jasmine/). Test units use the `dist/sip-devel.js` file. Run the tests as follows: ``` $ grunt test @@ -67,10 +67,10 @@ Testing testNoWebRTC.html.........OK >> 250 assertions passed (177ms) ``` -## Changes in JsSIP grammar +## Changes in SIP.js grammar -If you modify `src/Grammar/src/Grammar.pegjs` then you need to recompile JsSIP grammar files. For that run the following task: +If you modify `src/Grammar/src/Grammar.pegjs` then you need to recompile SIP.js grammar files. For that run the following task: ``` $ grunt grammar ``` -And then build JsSIP again as explained above. +And then build SIP.js again as explained above. diff --git a/Gruntfile.js b/Gruntfile.js index bed79a6de..15e9e3022 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -37,6 +37,12 @@ module.exports = function(grunt) { banner: '\ /*\n\ * SIP version <%= pkg.version %>\n\ + * Copyright (c) 2014-<%= grunt.template.today("yyyy") %> Junction Networks, Inc \n\ + * Homepage: http://sipjs.com\n\ + * License: http://sipjs.com/license\n\ + *\n\ + *\n\ + * Some portions of SIP.js adapted from JsSIP:\n\ * Copyright (c) 2012-<%= grunt.template.today("yyyy") %> José Luis Millán - Versatica \n\ * Homepage: http://jssip.net\n\ * License: http://jssip.net/license\n\ @@ -151,15 +157,15 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-jasmine'); - // Task for building JsSIP Grammar.js and Grammar.min.js files. + // Task for building SIP.js Grammar.js and Grammar.min.js files. grunt.registerTask('grammar', function(){ var done = this.async(); // This is an async task. var sys = require('sys'); var exec = require('child_process').exec; var child; - // First compile JsSIP grammar with PEGjs. - console.log('"grammar" task: compiling JsSIP PEGjs grammar into Grammar.js ...'); + // First compile SIP.js grammar with PEGjs. + console.log('"grammar" task: compiling SIP.js PEGjs grammar into Grammar.js ...'); child = exec('if [ -x "./node_modules/pegjs/bin/pegjs" ] ; then PEGJS="./node_modules/pegjs/bin/pegjs"; else PEGJS="pegjs" ; fi && $PEGJS -e SIP.Grammar src/Grammar/src/Grammar.pegjs src/Grammar/dist/Grammar.js', function(error, stdout, stderr) { if (error) { sys.print('ERROR: ' + stderr); @@ -179,7 +185,7 @@ module.exports = function(grunt) { }); }); - // Task for building JsSIP SDP.js and SDP.min.js files. + // Task for building SIP.js SDP.js and SDP.min.js files. grunt.registerTask('sdp', function(){ var done = this.async(); // This is an async task. var sys = require('sys'); @@ -198,7 +204,7 @@ module.exports = function(grunt) { }); }); - // Task for building jssip-devel.js (uncompressed), sip-X.Y.Z.js (uncompressed) + // Task for building sip-devel.js (uncompressed), sip-X.Y.Z.js (uncompressed) // and sip-X.Y.Z.min.js (minified). // Both sip-devel.js and sip-X.Y.Z.js are the same file with different name. grunt.registerTask('build', ['concat:devel', 'includereplace:devel', 'jshint:devel', 'concat:post_devel', 'concat:dist', 'includereplace:dist', 'jshint:dist', 'concat:post_dist', 'uglify:dist']); diff --git a/package.json b/package.json index a3c1c65ba..21b30cca7 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,25 @@ { "name": "sip", - "title": "JsSIP", + "title": "SIP.js", "description": "the Javascript SIP library", - "version": "0.4.0-devel", - "homepage": "http://jssip.net", - "author": "José Luis Millán ", + "version": "0.5.0-devel", + "homepage": "http://sipjs.com", + "author": "Will Mitchell ", "contributors": [ { - "url": "http://jssip.net/authors/" + "url": "http://sipjs.com/authors/" } ], "repository": { "type": "git", - "url": "https://github.com/versatica/JsSIP.git" + "url": "https://github.com/onsip/SIP.js.git" }, "keywords": [ "sip", "websocket", "webrtc", - "library" + "library", + "javascript" ], "devDependencies": { "grunt": "~0.4.0",