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-compass-bootstrap

v0.0.6

Published

Ember CLI add-on to install sass, compass and bootstrap-sass

Downloads

8

Readme

ember-cli-compass-bootstrap

Note that this package is not as useful since releases 0.1.x of ember-cli as it now makes using sass really painless. Look for an alternative to using this package at the bottom of this README (section Alternative)

This is an addon for ember-cli that adds support for:

It requires ember 0.1.5+.

The package is using libsass (coming with ember-cli through broccoli-sass and node-sass) to benefit from ultra fast preprocessing. Compass and Bootstrap for Sass are installed using bower.

Usage

It is a two-steps installation process. You install the npm module, ember-cli will automatically pick up the addon. You also need to generate a scss file, which will also update npm and bower configuration files with the necessary packages and install them.

First install the npm package:

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

Then generate a new app.scss file and delete the old app.css file (after copying any custom content to the new app.scss):

ember g scss app
rm app/styles/app.css

Blueprints

Besides the scss blueprint intended to setup an application to use Compass and Bootstrap, another blueprint bootstrap can be used to generate templates using Bootstrap markup.

ember g bootstrap application type:navbar-fixed

Current supported types are:

  • navbar
  • navbar-fixed
  • sign-in
  • started (default)

Alternative

If all you want is using Bootstrap with Sass (and maybe Compass Mixins), you can very well add the packages and do some configuration yourself and avoid a package dependency.

Here is how I'd do it from a freshly generated app using ember-cli v0.1.5:

ember install:npm broccoli-sass
mv app/styles/app.css app/styles/app.scss
ember install:bower bootstrap-sass-official
ember install:bower compass-mixins

You can then edit your Brocfile.js file and replace content with:

/* global require, module */

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

var app = new EmberApp();

var bootstrapDir = app.bowerDirectory + '/bootstrap-sass-official/assets';

// select bootstrap JavaScript components to include
var bootstrapComponents = ['dropdown', 'alert', 'transition'];

for (var index in bootstrapComponents) {
  app.import(bootstrapDir + '/javascripts/bootstrap/' + bootstrapComponents[index] + '.js');
}

module.exports = app.toTree();

And finally create your custom app/styles/_bootstrap.scss partial to customize bootstrap to your needs:

cp bower_components/bootstrap-sass-official/assets/stylesheets/_bootstrap.scss app/styles

Edit the file to update the paths from "bootstrap/xxx" to "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/xxx" (i.e.: @import "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/variables";) and append the following to your app/styles/app.scss file:

@import "bootstrap";

You're now ready to customize app/styles/_bootstrap.scss to your needs by commenting out the components you don't use or adjusting bootstrap variables such as the number of columns in one row (i.e.: prepend to the top of the _bootstrap.scss file: $grid-columns: 24; to get 24 columns instead of 12).