Coder Social home page Coder Social logo

jbrown / ember-try Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ember-cli/ember-try

0.0 2.0 0.0 106 KB

An ember-cli addon to test against multiple bower dependencies, such as ember and ember-data.

License: MIT License

JavaScript 89.16% HTML 10.49% Handlebars 0.35%

ember-try's Introduction

ember-try

An ember-cli addon to test against multiple bower dependencies, such as ember and ember-data.

Installation

ember install:addon ember-try

Limitations

Can only change versions for Ember 1.10+ due to template compiler changes that this addon does not attempt to handle.

Requirements

  • Git

Usage

This addon provides a few commands:

ember try:testall

This command will run ember test with each scenario's specified in the config and exit appropriately. Especially useful to use on CI to test against multiple ember versions.

ember try <scenario> <command (Default: test)>

This command will run any ember-cli command with the specified scenario. The command will default to ember test.

For example:

  ember try ember-1.11-with-ember-data-beta-16 test

or

  ember try ember-1.11-with-ember-data-beta-16 serve

ember try:reset

This command checks out bower.json from git, rm -rfs bower_components and runs bower install. For use if any of the other commands fail to clean up after (they run this by default on completion).

Config

Configuration will be read from a file in your ember app in config/ember-try.js. It should look like:

module.exports = {
  scenarios: [
    {
      name: "Ember 1.10 with ember-data",
      dependencies: {
        "ember": "1.10.0",
        "ember-data": "1.0.0-beta.15"
      }
    },
    {
      name: "Ember 1.11.0-beta.5",
      dependencies: {
        "ember": "1.11.0-beta.5"
      }
    }
  ]
};

Scenarios are sets of dependencies (bower only). They can be specified exactly as in the bower.json The name can be used to try just one scenario using the ember try command.

If no config/ember-try.js file is present, the default config will be used. This is the current default config:

{
  scenarios: [
    {
      name: 'ember-1.10',
      dependencies: {
        "ember": "1.10.0"
      }
    },
    {
      name: 'ember-1.11.0-beta.5',
      dependencies: {
        "ember": "1.11.0-beta.5"
      }
    }
  ]
}

See an example of using ember-try for CI here, and the resulting build output.

Special Thanks

  • Much credit is due to Edward Faulkner The scripts in liquid-fire that test against multiple ember versions were the inspriation for this project.

TODO

  • Add tests
  • Add a blueprint for the config
  • Add 'force' option to commands to proceed even if bower.json is dirty
  • Look into SilentError as seen on other ember-cli addons to see if its preferable to throw new Error for preconditions.

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.