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-start-site

v1.1.0

Published

Yeoman generator to make a starter site for beginning development quickly and easily using html or Jade templates

Downloads

3

Readme

generator-start-site

A Yeoman generator that creates a basic site template with grunt setup ready for development and distribution.

Includes

  • Grunt setup for sass and distribution
  • Sass project scafolding. As minimal as possible.
  • jQuery & Modernizer (using Bower package manager) so you can get working straight way.
  • index.html so you can start building your site template asap.

Getting Started

Requirements

  • Yeoman
  • Bower
  • Grunt
  • Sass

Yeoman, Grunt & Bower (Best buddies!)

Not every new computer comes with a Yeoman pre-installed. He lives in the npm package repository. You only have to ask for him once, then he packs up and moves into your hard drive. Make sure you clean up, he likes new and shiny things. If you'd like to get to know Yeoman better and meet some of his friends, Grunt and Bower, check out the complete Getting Started Guide.

Installing the start-site generator requirements

Some of the following code may need a 'sudo' before it to work depending on your setup.

Install Sass

gem install sass

Install Node.js from http://nodejs.org/

  • If you get some errors after this it might be that your node packages are out of date.
#Try this if you get some package errors
npm cache clean
#Followed by
npm update 

Install Bower

npm install -g bower

Install the Grunt CLI (Command line interface)

npm install -g grunt-cli

Install Yeoman

npm install -g yo

##Install the generator

(See above for all the )

To install generator-start-site, run:

npm install -g generator-start-site
#Lots of code will happen... This is npm installing what it needs

When you want to create a new site simply run:

yo start-site

Answer the questions and Yeoman will sort you out!

Basic workflow

Grunt lives in the tasks folder. Navigate to this folder and run (Stop grunt watch running using cmd + c):

#ignore this if your in the 'tasks' folder already
cd /yourproject/tasks/

#run
grunt watch

Your HTML templates and css/scss live in the dev folder. Any changes you make to the 'dev/src/scss' files will be compiled into the 'dev/static/css' folder. you can make as many HTML file as you need in the dev folder - they will all be copied to the dist folder when you're ready to go live!

Once your site is ready to go live you will need to run:

#ignore this if your in the 'tasks' folder already
cd /yourproject/tasks/  

#run
grunt dist

Grunt will process all your sass, minify and copy it, concatonate and minify your js to the header and footer scripts (pre & post) and copy and html files across to the dist folder. You can the FTP or copy your dist folder to where ever you want. It's all self contained.

Template hints

In the included index.html you will see:

 <!-- build:js static/js/pre.js -->
  <script src="static/js/header.js"></script>
  <script src="bower_components/modernizr/modernizr.js"></script>
  <!-- endbuild -->

When you run your distribution grunt will optimize all the files between the comments into one javascipt file. If you have a specific group of javascipts for one page (eg a gallery and slider) put them between a new set of comments and you'll get the extra javascript. If it's in the same comment block then it might get overwritten when it compiles! Wrap all js in a comment tag if it's not in the provided blocks. Grunt will take care of the rest for you! :-)

License

MIT