当前位置: 首页 > 软件库 > 程序开发 > >

ember-cli-coffeescript

授权协议 MIT License
开发语言 JavaScript
所属分类 程序开发
软件类型 开源软件
地区 不详
投 递 者 宓季同
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

CoffeeScript support for ember-cli

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

Includes

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

Install

ember install ember-cli-coffeescript

NB: ember-cli-coffeescript is tested using ember-cli version 2.3.0 and up. Some of it probably works onearlier 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, to generate a component:

ember g component my-component

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

If you'd like to use ember-cli-coffeescript without the blueprints, you can addthe following to your config/environment.js:

ENV.coffeeOptions = {
  blueprints: false
}

This will make it fall back to the next blueprints in line (probably the onesfrom ember-cli).

Precompiling

This will happen automatically - no work necessary.

Linting

If you have a coffeelint.json file in the root of you project we will automatically pick up on it and start running linting on files when using the ember build and ember serve commands.If you do not want linting to run despite having a coffeelint.json file, use the following configurationin your config/environment.js.

ENV.coffeeOptions = {
  lint: false
}

You can set lint to true to enable linting with the default configurations even without a custom coffeelint.json file.

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)

ENV.coffeeOptions = {
  lint: {
    configPath: "configurations/coffeelint.json"
  }
}

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

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

NOTE: The lint results will show up twice when you build and run your app; oncefor the app files, and then once for the test files. On rebuild, only the changedfiles are linted.

Lintignore

To avoid linting specific files or folders, you can put a file named .coffeelintignorein the root of your project containing ignore-rules, one per line. This is just like a.gitignore-file, and it will follow the same rules.

Developing

  • git clone this repository
  • npm install
  • bower install
  • npm link

Because of the nature of this project, it needs to be consumed by an ember-cli project to be properly developed.

  • Add "ember-cli-coffeescript": "*" to your consuming project's package.json
  • From your project root run npm link ember-cli-coffeescript

Running Tests

  • ember test
  • npm run embertest
  • npm run nodetest

To run all the tests:

  • npm test
 相关资料
  • Ember CLI 是一个 Ember.js 命令行工具,提供了由 broccoli 提供的快速的资源管道和项目结构。 Ember CLI 基于 Ember App Kit Project 目前已经废弃。 Assets Compilation Ember CLI asset compilation is based on broccoli. Broccoli has support for: Ha

  • This repository is no longer maintained. As a replacement check out: https://github.com/sir-dunxalot/ember-tooltips Ember CLI Tooltipster An Ember CLI add-on that wraps Tooltipster into an ember compo

  • ember-cli-updater This ember-cli addon helps you update your ember-cli application or addon. The idea of this addon is to automate some parts of the upgrade process so it's simplified. Not every chang

  • Ember-cli-yadda This Ember CLI addon facilitates writing BDD tests in the Gherkin language and executing them against your Ember app. @mschinis (Micheal Schinis) Did a great talk at @emberlondon BDD a

  • Ember-cli-simditor Ember component wrapper for simditor. Changes 0.0.7 Different from previous version, you must wrap content in object. See issue 6 for why. Getting Started Installation In your ember

  • ember-cli-chai Chai assertions for Ember.js. Deprecated This package is deprecated. Please use ember-auto-import to use chai and chai plugins directly. If you'd like to use chai, or were previously us