forked from onsip/SIP.js
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use require() and browserify to organize dependencies and compilation.
This is a squashed cherry-pick of the first three commits of onsip#30, plus a small fix to the Timers module, and slight updates to package.json and .npmignore. The reason this isn't in separate commits is that the first three didn't work individually. Squashing them together allows: - the automated tests to pass - <script src="dist/sip.js"></script> to work as usual - a Node.js phone to be tested as follows: npm install ws node WebSocket = require('ws') var SIP = require('./.'); var ua = new SIP.UA({traceSip: true}); ua.message('[email protected]', 'Node says hi!'); For completeness, unsquashed commit messages are listed below: 1: Use require() and browserify to organize dependencies and compilation. Conflicts: Gruntfile.js package.json src/tail.js Cherry-picked from: josephfrazier@df33833 2: Clean up module dependencies. - LoggerFactory does not depend on SIP - Constants depends only on SIP.name and SIP.version - Exceptions does not depend on SIP - Timers does not depend on SIP - Transport depends on window - SIP.MediaHandler depends on EventEmitter, not SIP - WebRTC depends on Utils, not SIP - Hacks depends on window, not SIP - DigestAuthentication depends on Utils, not SIP Conflicts: src/Timers.js src/WebRTC.js Cherry-picked from: josephfrazier@9af96e9 3: Grammar module depends on SIP Cherry-picked from: josephfrazier@3e0c165 4: Timers module depends on window See: josephfrazier@2510347#diff-7f75ad1c8b0a978a180c50fe4c649e8bL25 5: package.json: set "main": "src/SIP.js" Now that our src/ files are modules, we don't have to compile the module before require()ing it. 6: .npmignore dist/sip* There's no need for `npm install` to bring in dist/ files. Leave that to bower.
- Loading branch information
1 parent
2dfcb49
commit ba42061
Showing
36 changed files
with
185 additions
and
229 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
dist/sip* | ||
.grunt | ||
_SpecRunner.html |
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
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"title": "SIP.js", | ||
"description": "A simple, intuitive, and powerful JavaScript signaling library", | ||
"version": "0.6.0", | ||
"main": "dist/sip.js", | ||
"main": "src/SIP.js", | ||
"homepage": "http://sipjs.com", | ||
"author": "Will Mitchell <[email protected]>", | ||
"contributors": [ | ||
|
@@ -23,19 +23,19 @@ | |
"javascript" | ||
], | ||
"devDependencies": { | ||
"browserify": "~2.36.0", | ||
"grunt": "~0.4.0", | ||
"grunt-cli": "~0.1.6", | ||
"grunt-contrib-concat": "~0.1.3", | ||
"grunt-contrib-jasmine": "~0.6.0", | ||
"grunt-contrib-jshint": ">0.5.0", | ||
"grunt-contrib-uglify": "~0.2.0", | ||
"grunt-include-replace": "~0.1.0", | ||
"grunt-peg": "~1.3.1", | ||
"grunt-trimtrailingspaces": "^0.4.0", | ||
"node-minify": "~0.7.2", | ||
"pegjs": "0.8.0", | ||
"sdp-transform": "~0.4.0" | ||
"sdp-transform": "~0.4.0", | ||
"grunt-contrib-copy": "^0.5.0", | ||
"browserify": "^4.1.8", | ||
"grunt-browserify": "^2.1.0" | ||
}, | ||
"engines": { | ||
"node": ">=0.8" | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.