steal.static.coffee  function     

plugin: steal/coffee

Requires a CoffeeScript script.

CoffeeScript is a more 'refined' version of JavaScript that lets you write code like:

number = -42 if opposite
CoffeeScript is normally used on the server, but steal lets you load CoffeeScripts in the browser, and compress their JavaScript output into your production builds.

Use

First, create a coffee script like:

console.log "There are no () around this string!"

Save this in a file named log.coffee.

Next, you have to require the steal/coffee plugin and then use steal.coffee to load your coffee script:

steal.plugins('steal/coffee').then(function(){
  steal.coffee('log');
});

Loads CoffeeScript files relative to the current file. It's expected that all CoffeeScript files end with coffee.

steal.coffee(path) -> steal
{String+}

the relative path from the current file to the coffee file. You can pass multiple paths.

{steal}

returns the steal function.

© Jupiter IT - JavaScriptMVC Training and Support