Coder Social home page Coder Social logo

myztiq / ember-cli-coffeescript Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kimroen/ember-cli-coffeescript

0.0 1.0 0.0 222 KB

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.

License: MIT License

CoffeeScript 30.00% JavaScript 70.00%

ember-cli-coffeescript's Introduction

CoffeeScript support for ember-cli

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command, as well as linting.

Includes

  • Generating files in CoffeeScript with ember generate
  • Preprocessing CoffeeScript-files in your app
  • Linting your CoffeeScript-files.

Install

npm install ember-cli-coffeescript --save-dev

NB: This addon requires ember-cli version 0.1.0 and up. It might work on earlier versions, but I wouldn't know.

How to use

Blueprints

Run ember help generate to get a list of available blueprints. Use them by running ember g <blueprint> <args>, for instance ember g controller pants --type=array

ember-cli-coffeescript comes with pod-support for the same blueprints as ember-cli does. Check out the ember-cli docs for pods for instructions on how to use it.

Precompiling

This will happen automatically - no work necessary.

Linting

If you have a coffeelint.json file we will automatically pick up on it and start running linting. If you do not want linting to run when you have a coffeelint.json file use the following configuration in your Brocfile.js.

new EmberApp({
  "coffeeOptions": { lint: false }
})

You can set lint to true to enable linting with the default configurations, but you will probably want to add a coffeelint.json file to the root of your project either way, for instance to turn off the error for backticks.

Example coffeelint.json:

{
    "no_backticks": {
        "level": "ignore"
    }
}

You can find all the available options on the website for coffeelint.

If you want to specify a different path for your coffeelint.json file you can specify the path (relative to the project directory or absolute)

new EmberApp({
  "coffeeOptions":{
    lint:{
      configPath: "configurations/coffeelint.json"
    }
  }
})

If you want to change the way we format the output you can specify a custom error output and stats output

new EmberApp({
  "coffeeOptions":{
    lint:{
      formatter: function(filePath, lintResults){  },
      statsFormatter: function(stats){ console.log('Files: ', stats.fileCount, "Errors: ", stats.errorCount) }
    }
  }
})

ember-cli-coffeescript's People

Contributors

kimroen avatar myztiq avatar rpieciorak avatar rwjblue avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.