New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blade

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blade

  • 0.7.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 12 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc