Code Monkey home page Code Monkey logo

blade's Introduction

Blade

A Sprockets Toolkit for Building and Testing JavaScript Libraries

Getting Started

Add Blade to your Gemfile.

source "https://rubygems.org"

gem 'blade'

Create a .blade.yml (or blade.yml) file in your project’s root, and define your Sprockets load paths and logical paths. Example:

# .blade.yml
load_paths:
  - src
  - test/src
  - test/vendor

logical_paths:
  - widget.js
  - test.js

Compiling

Configure your build paths and compressors:

# .blade.yml

build:
  logical_paths:
    - widget.js
  path: dist
  js_compressor: uglifier # Optional

Run bundle exec blade build to compile dist/widget.js.

Testing Locally

By default, Blade sets up a test runner using QUnit via the blade-qunit_adapter gem.

Run bundle exec blade runner to launch Blade’s test console and open the URL it displays in one or more browsers. Blade detects changes to your logical paths and automatically restarts the test suite.

Blade Runner

Testing on CI

Run bundle exec blade ci to start Blade’s test console in non-interactive CI mode, and launch a browser pointed at Blade’s testing URL (usually http://localhost:9876). The process will return 0 on success and non-zero on failure.

To test on multiple browsers with Sauce Labs, see the Sauce Labs plugin.

Projects Using Blade


Licensed under the MIT License

© 2016 Javan Makhmali

blade's People

Contributors

byroot avatar javan avatar jsierles avatar lsylvester avatar y-yagi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

blade's Issues

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.