Sha256: ed19314d1512126faef3b401a03ee86cef531408e07e6336b8f0aa852655e9e7

Contents?: true

Size: 1.82 KB

Versions: 27

Compression:

Stored size: 1.82 KB

Contents

// Generated by CoffeeScript 1.12.7
(function() {
  var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, i, len, loadFile, path, ref;

  CoffeeScript = require('./coffee-script');

  child_process = require('child_process');

  helpers = require('./helpers');

  path = require('path');

  loadFile = function(module, filename) {
    var answer;
    answer = CoffeeScript._compileFile(filename, false, true);
    return module._compile(answer, filename);
  };

  if (require.extensions) {
    ref = CoffeeScript.FILE_EXTENSIONS;
    for (i = 0, len = ref.length; i < len; i++) {
      ext = ref[i];
      require.extensions[ext] = loadFile;
    }
    Module = require('module');
    findExtension = function(filename) {
      var curExtension, extensions;
      extensions = path.basename(filename).split('.');
      if (extensions[0] === '') {
        extensions.shift();
      }
      while (extensions.shift()) {
        curExtension = '.' + extensions.join('.');
        if (Module._extensions[curExtension]) {
          return curExtension;
        }
      }
      return '.js';
    };
    Module.prototype.load = function(filename) {
      var extension;
      this.filename = filename;
      this.paths = Module._nodeModulePaths(path.dirname(filename));
      extension = findExtension(filename);
      Module._extensions[extension](this, filename);
      return this.loaded = true;
    };
  }

  if (child_process) {
    fork = child_process.fork;
    binary = require.resolve('../../bin/coffee');
    child_process.fork = function(path, args, options) {
      if (helpers.isCoffee(path)) {
        if (!Array.isArray(args)) {
          options = args || {};
          args = [];
        }
        args = [path].concat(args);
        path = binary;
      }
      return fork(path, args, options);
    };
  }

}).call(this);

Version data entries

27 entries across 27 versions & 4 rubygems

Version Path
epuber-stylus-source-0.56.0 vendor/node_modules/coffee-script/lib/coffee-script/register.js
epuber-stylus-source-0.54.8 vendor/node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.6 node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.5 node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.4 node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.3 node_modules/coffee-script/lib/coffee-script/register.js
lux_assets-0.2.11 ./node_modules/coffee-script/lib/coffee-script/register.js
lux_assets-0.2.9 ./node_modules/coffee-script/lib/coffee-script/register.js
lux_assets-0.2.4 ./node_modules/coffee-script/lib/coffee-script/register.js
lux_assets-0.2.2 ./node_modules/coffee-script/lib/coffee-script/register.js
lux_assets-0.2.1 ./node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.2 node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.1 node_modules/coffee-script/lib/coffee-script/register.js
ela-4.1.0 node_modules/coffee-script/lib/coffee-script/register.js
cortex-0.1.3 spec/dummy/node_modules/coffeescript/lib/coffee-script/register.js
ela-4.0.0 node_modules/coffee-script/lib/coffee-script/register.js
ela-3.4.3 node_modules/coffee-script/lib/coffee-script/register.js
ela-3.4.2 node_modules/coffee-script/lib/coffee-script/register.js
ela-3.4.0 node_modules/coffee-script/lib/coffee-script/register.js
ela-3.3.1 node_modules/coffee-script/lib/coffee-script/register.js