Permalink
Browse files

Add support for node-webkit environment.

Node-webkit allows loading with require in node's context, so just just
skip the node support if it is node-webkit.
  • Loading branch information...
1 parent 712f2d8 commit 0799c791ee66b2903f6474c8c86c84268e8d064d @busykai busykai committed Jul 1, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 text.js
View
@@ -237,7 +237,8 @@ define(['module'], function (module) {
if (masterConfig.env === 'node' || (!masterConfig.env &&
typeof process !== "undefined" &&
process.versions &&
- !!process.versions.node)) {
+ !!process.versions.node &&
+ !process.versions['node-webkit'])) {
//Using special require.nodeRequire, something added by r.js.
fs = require.nodeRequire('fs');

0 comments on commit 0799c79

Please sign in to comment.