npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-cli-bootstrap

v0.0.15

Published

Include bootstrap into an ember-cli app

Downloads

43

Readme

ember-cli-bootstrap

###Warning - this is still a WIP

###ember-cli-bootstrap requires ember-cli version '0.0.41' or later

This is an ember-cli addon that includes styles from Twitter Bootstrap into your ember-cli project.

This addon utilizes the bootstrap_for_ember library, which provides a collection of Ember components based on Twitter Bootstrap V3. You can find documentation for usage here.

#Usage

In the root of your ember-cli project directory, run:

npm install --save-dev ember-cli-bootstrap

Then, from the root of you ember-cli project, run:

ember generate ember-cli-bootstrap

To prevent JSHint errors, you can import Bootstrap as a module with:

import Bootstrap from 'bootstrap';

You should now have access to bootstrap styles and the components provided by bootstrap_for_ember. Enjoy!

##Importing specific bootstrap_for_ember components By default, all of the bootstrap_for_ember components will be imported into the project. You can optionally specify exactly which components should be imported into the project via the component option, which accepts an array of component names:

//your-bootstrap-app/Brocfile.js

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({
  'ember-cli-bootstrap': {
    'components': ['bs-alert', 'bs-notifications', 'bs-nav']
  }
});

module.exports = app.toTree();

Importing javascript from Twitter Bootstrap

The goal of this addon is to utilize the bootstrap_for_ember library to be able to implement Twitter Bootstrap's styles and components in a more 'Embery' way. As such, the addon does not include the javascript from Twitter Bootstrap by default.

In situations where you need functionality that is not provided by bootstrap_for_ember, you can optionally import the Twitter Bootstrap javascript into your ember-cli project by setting the importBootstrapJS option to true in your Brocfile.js:

//your-bootstrap-app/Brocfile.js

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({
  'ember-cli-bootstrap': {
    'importBootstrapJS': true
  }
});

module.exports = app.toTree();

Importing Twitter Bootstrap Theme

Bootstrap comes with an optional theme CSS with various visual enhancements. To include this file you can import it by setting importBootstrapTheme to true in your Brocfile.js:

//your-bootstrap-app/Brocfile.js

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({
  'ember-cli-bootstrap': {
    'importBootstrapTheme': true
  }
});

module.exports = app.toTree();

Opting out of Bootstrap CSS

In situations where you prefer to use another strategy for importing Bootstrap CSS, you can opt out of CSS import by setting the importBootstrapCSS option to false in your Brocfile.js:

//your-bootstrap-app/Brocfile.js

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({
  'ember-cli-bootstrap': {
    'importBootstrapCSS': false
  }
});

module.exports = app.toTree();

Opting out of Bootstrap Font

In situations where you prefer to use another strategy for importing the Bootstrap font, you can opt out of the font import by setting the importBootstrapFont option to false in your Brocfile.js:

//your-bootstrap-app/Brocfile.js

/* global require, module */

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({
  'ember-cli-bootstrap': {
    'importBootstrapFont': false
  }
});

module.exports = app.toTree();