Commits

Anonymous committed 6254a00

move tinyjs-external code over moduleMisc

Comments (0)

Files changed (4)

       EXPORTS.requireFsExtra = EXPORTS.requireFsExtra || require('fs-extra');
       EXPORTS.requireHttp = EXPORTS.requireHttp || require('http');
       EXPORTS.requireIstanbul = EXPORTS.requireIstanbul || require('istanbul');
-      EXPORTS.requireJslintLinter = EXPORTS.requireJslintLinter || require('./node_modules/jslint/lib/linter');
-      EXPORTS.requireJslintReporter = EXPORTS.requireJslintReporter || require('./node_modules/jslint/lib/reporter');
+      EXPORTS.requireJslintLinter = EXPORTS.requireJslintLinter || require('jslint/lib/linter');
+      EXPORTS.requireJslintReporter = EXPORTS.requireJslintReporter || require('jslint/lib/reporter');
       EXPORTS.requireMime = EXPORTS.requireMime || require('mime');
       EXPORTS.requireModule = EXPORTS.requireModule || require('module');
       EXPORTS.requirePath = EXPORTS.requirePath || require('path');
       EXPORTS.COVER_FILE = EXPORTS.COVER_FILE || {};
       EXPORTS.FS_CWD = EXPORTS.FS_CWD || process.cwd();
       EXPORTS.FS_MODULE = EXPORTS.FS_MODULE || EXPORTS.requirePath.dirname(module.filename);
+      EXPORTS.FS_MODULE_EXTERNAL = EXPORTS.FS_MODULE_EXTERNAL || EXPORTS.requirePath.dirname(require.resolve('tinyjs-external'));
       EXPORTS.IS_CLI = EXPORTS.IS_CLI || module === require.main;
       EXPORTS.JSLINT_WATCH = EXPORTS.JSLINT_WATCH || {};
       EXPORTS.MODULE = EXPORTS.MODULE || module;
       return content.replace((/^\/\*FILE_BEG (.*?)\*\/$([\S\s]*?)^\/\*FILE_END\*\/$/gm), function (_, file, code, start) {
         file = JSON.parse(file);
         //// filename
-        file.name = file.name.replace((/\/FS_MODULE\b/), EXPORTS.FS_MODULE);
+        file.name = file.name
+          .replace((/\/FS_MODULE_EXTERNAL\b/), EXPORTS.FS_MODULE_EXTERNAL)
+          .replace((/\/FS_MODULE\b/), EXPORTS.FS_MODULE);
         //// preserve line number position
         code = (content.slice(0, start).match(/\n/g) || []).join('') + code;
         //// save source code
     _init: function () {
       //// EXPORTS
       EXPORTS.exportLocal(local);
-      EXPORTS.requireTinyjsExternal = EXPORTS.requireTinyjsExternal || require('tinyjs-external');
       EXPORTS.EXTERNAL_URL = {
         //// jquery
         'aa.jquery.js': 'http://code.jquery.com/jquery-1.9.1.js',
         //// image ajax loader
         //// 'ajaxLoader.gif': 'http://www.ajaxload.info/download.php?img=cache/FF/FF/FF/00/00/00/26-1.gif',
       };
-      EXPORTS.FS_EXTERNAL = EXPORTS.FS_EXTERNAL || EXPORTS.requirePath.dirname(EXPORTS.MODULE_EXTERNAL.filename);
       //// load public external assets
       [
         'externalRollup.css',
   }
 }
 /*FILE_END*/
+
+
+
+/*FILE_BEG {"actions": ["write"], "name": "/FS_MODULE_EXTERNAL/.gitignore"}*/
+.DS_Store
+.gitignore
+/*FILE_END*/
+
+
+
+/*FILE_BEG {"actions": ["jslint", "write"], "name": "/FS_MODULE_EXTERNAL/package.json"}*/
+{
+  "author": "kai zhu <kaizhu256@gmail.com>",
+  "description": "tinyjs external dependencies",
+  "files": [
+    "externalRollup.css",
+    "externalRollup.js",
+    "README.md"
+  ],
+  "homepage": "https://bitbucket.org/kaizhu/tinyjs-external",
+  "license": "BSD",
+  "name": "tinyjs-external",
+  "repository": {"type": "git", "url": "https://bitbucket.org/kaizhu/tinyjs-external.git"},
+  "version": "{{EXPORTS.VERSION}}"
+}
+/*FILE_END*/
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },
-  "version": "2013.03.19-17.07.18"
+  "version": "2013.03.19-17.37.29"
 }