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

generator-gulp-project

v1.0.0

Published

Yeoman generator that scaffolds out a new front-end web project that uses Gulp.

Downloads

4

Readme

generator-gulp-project

Yeoman generator that scaffolds out a new front-end web project that uses Gulp. This Yeoman generator will set up your directories and provide you with two Gulp tasks: $ gulp for development and $ gulp build to compile your project.

Requirements

Installing generator-gulp-project

Run $ npm install -g generator-gulp-project

Setup a new project

  1. Create an empty directory for your project: $ mkdir ~/Sites/my_new_project && cd $_
  2. Run the generator: $ yo gulp-project

Project directories

You will be asked a couple basic questions to start your project up. When you are done you should have a project directory that looks like this (depending on your choices):

+ app
  + bower_components/
  + assets/images/
  + assets/javascripts/
  + assets/stylesheets/
  .htaccess
  index.html
+ dist
  + assets/javascripts/
  + assets/images/
  + assets/stylesheets/
  .htaccess
  index.html
+ gulp
		+ tasks
	index.js
.bowerrc
.gitignore
bower.json
Gemfile
gulpfile.js
package.json

About your new project

bower_components/

Bower will manage your project dependencies. If you run jQuery, Fancybox, Flexsider or any other libraries this is where they'll live.

Adding libraries to your project

If you need to add Fancybox to your project you can search the Bower library for it by running $ bower search fancybox. Once you find the one you are looking for, just run $ bower install fancybox -S and the Fancybox library will now be in app/bower_components. You can also remove a dependency by running $ bower uninstall fancybox -S.

Note: You must use -S in your bower command to add the dependency to your bower.json file.

Related files

.bowerrc: Configures the path to the bower_components directory (don't change this) bower.json: Specifies all of the dependencies used in the project.

images/

Place any project images in this directory. Running $ gulp build will move your images to dist/images and compress them.

Using CoffeeScript

CoffeeScript files must be referenced with a .js extension. For example, if your CoffeeScript file is located at javascripts/form/myfile.coffee your HTML should be <script src="/_tmp/javascripts/form/myfile.js"></script>.

stylesheets/

You are able to use .scss and .css files (though I'd recommend just using .scss). If you are running the $ gulp process, you may want to restart it when creating new files.

Paths

If you want to reference a .scss or .css file in your template you must use _tmp in your path. For example, if your .scss file is located at stylesheets/myfile.scss your HTML should be <link rel="stylesheet" href="/_tmp/stylesheets/myfile.css">.

dist/

This is the compiled version of your web project. You deploy this, and only this, folder to the web server.

Miscellaneous files

  • .gitignore: A standard gitignore file to ignore compiled directories and other OS-based files and folders.
  • .htaccess: A basic htaccess file provided by the HTML5 Boilerplate.
  • gulpfile.js: A list of the tasks that run on $ gulp and $ gulp build
  • package.json: A list of dependencies for the Gulp tasks.

Release History

  • 2015-3-25 - v1.0.0 - Initial release