How to use the coffee-script.helpers function in coffee-script

To help you get started, we’ve selected a few coffee-script examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github peerplays-network / peerplays-core-gui / src / __tests__ / __tests__ / jest-preprocessor.js View on Github external
process: function(src, path) {
    src = babel_jest.process(src, path)
    // CoffeeScript files can be .coffee, .litcoffee, or .coffee.md
    if (coffee.helpers.isCoffee(path)) {
      return coffee.compile(src, {'bare': true});
    }
    return src;
  }
}
github facebook / jest / examples / coffeescript / preprocessor.js View on Github external
process: function(src, path) {
    // CoffeeScript files can be .coffee, .litcoffee, or .coffee.md
    if (coffee.helpers.isCoffee(path)) {
      return coffee.compile(src, {'bare': true});
    }
    return src;
  }
};
github mingliangfeng / flux-riot / build / support / preprocessor.js View on Github external
process: function(src, path) {
    if (coffee.helpers.isCoffee(path)) {
      return coffee.compile(src, {'bare': true})
    }
    if (path.match(/\.tag$/)) {
      return preamble + compiler.compile(src)
    }
    return src
  }
}
github jergason / unrequired-love / index.js View on Github external
function isCoffee(filePath) {
  return coffee.helpers.isCoffee(filePath)
}
github neftjs / neft / jest-preprocessor.js View on Github external
process: (src, path, ...rest) => {
    if (coffee.helpers.isCoffee(path)) {
      const compiled = coffee.compile(src, { bare: true, literate: path.endsWith('.litcoffee') })
      return babelJest.process(compiled, path, ...rest)
    }
    return src
  },
}