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

sails-generate-gulp-bower

v0.2.2

Published

Generate Gulp and Bower configs and scaffolding for a sailsjs project

Downloads

9

Readme

Sails Generator for Gulp and Bower Support

This module provides a Sails.js generator. It provides configuration for the gulp.js build system and integrates it with the Bower package manager.

Install

Simply run

npm install sails-generate-gulp-bower

You should have sails installed globally, so now you can run

sails generate gulp-bower

inside of a sails project's folder. After this, you should execute

npm install
bower install

to install all new dependencies.

node-canvas

As our sprite module depends on node-canvas you will have to install some additional dependencies (if not already existing). Instructions for installing can be found here.

Usage

The gulp configuration provides several useful tasks, which are listed below. You can find configuration options and a more detailed description in the gulp folder.

build

Compiles all available and required files into the smallest amount of bundles possible and links them into all views.

This includes the following scripts:

  • Standard scripts
  • Scripts from bower packages
  • Compiled handlebars templates
  • Any specified modules

And the following styles:

  • Standard styles
  • Styles from bower packages
  • A stylesheet generated from images (includes sprite as base64 encoded image)

In addition, any specified assets are copied to the target folder as well.

watch

Does the same as the build task, except for compiling into single files. Instead it updates blazingly fast on any file changes.

lint

Runs jshint and csslint over all corresponding files in your project folder. Excludes anything in your .gitignore file.

clean

Removes all files created by gulp.

Considerations when switching from Grunt

Several things should be considered when you first start using the provided gulp tasks.

View Handling

As I do not consider it good style, to commit the automatically inserted scripts and styles to git each time gulp updates them, views are now stored in views-in. After injection is done, the views are written to the views folder, so you should exclude this folder from git.

In addition the injection comments have changed and are now:

<!-- //CSS// --><!-- \\CSS\\ -->
<!-- //JS// --><!-- \\JS\\ -->

Sails lift

Sails lift does not start grunt anymore, but it does not start gulp either. As far as I could see from the sails source, grunt integration was more of a hack, spawning grunt via forever in a child process. If this is wrong or anyone writes a good hook for gulp integration, let me know and I will include it. But for now, you will have to run gulp watch in a second terminal.

Bower Location

By default, your bower packages will be put into assets/components. You may wish to exlude this folder from your .gitignore.