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-espress

v0.2.4

Published

an opinionated yeoman generator that scaffolds a mvc express webapp completely in es6

Downloads

3

Readme

generator-espress

generator-espress

an opinionated yeoman generator that scaffolds a mvc express webapp completely in es6

Build Status

what's included

getting started

install

simply run the following to install via npm:

npm i -g yo gulp-cli bower generator-espress

generating!

once installed, simply do yo espress, and you'll be on your way to building your next project!

structure

all of your source code goes in the src folder. anything javascript can (and should) be written in es6. the strucutre is as follows:

src
├── app.js              // express app configuration (es6)
├── config.js           // environment configuration (es6)
├── app
│   ├── controllers     // express routes (es6)
│   ├── helpers         // modules, middlewares (es6)
│   ├── models          // mongoose models (es6)
│   └── views           // jade templates (jade)
├── files               // any files that need to be hosted, e.g. pdfs, text files, etc.
├── fonts               // ttf fonts
├── images              // source images
├── scripts             // client-side javascript (es6)
└── styles              // style sheets (sass)

running gulp build will produce a new directory (build by default) with a slightly different structure:

build
├── app.js              // transpiled express configuration
├── config.js           // transpiled environment configuration
├── app
│   ├── controllers     // transpiled express routes
│   ├── helpers         // transpiled modules, middlewares
│   ├── models          // transpiled mongoose models
│   └── views           // same files as source
└── static
    ├── css             // actual css
    ├── files           // same files as source
    ├── fonts           // webfonts (eot, ttf, woff, woff2) and a font-face stylesheet
    ├── img             // optimized images
    └── js              // transpiled client-side code

tasks

  • gulp is the same as gulp serve, which not only starts your express server, but also reloads it whenever server-side code changes
  • gulp build creates your production-ready webapp by running the following tasks:
    • images to optimize images
    • styles to compile sass, write sourcemaps, autoprefix, and minify
    • scripts to
  • gulp lint will lint all javascript with eslint and rules definted in .eslint.json
  • gulp clean will remove any and all files created by any of the above tasks
  • many of the tasks have sub-tasks that allow for finer control, for example:
    • gulp build:client will only run the tasks related to the client (images, styles, scripts, files, fonts, bower)
    • gulp transpile:controllers will transpile only the controllers
    • gulp lint:models will lint only the models
  • gulp tasks will show you all of the available tasks

what's missing

tests

  • while incredibly important, tests are not inlucded in this generator
  • it's especially useful to be able to write your own tests, so I'm leaving this as an exercise for the reader 🙃
  • if you need help, this is a decent place to start

notes

  • this generator was written with my needs in mind; that's why it's opinionated
  • i do most of my development on os x + homebrew + osx-jump-start
    • if you do too, then things should go smoothly
  • cross-platform compatibility isn't guaranteed
  • this is my first yeoman generator, and suggestions are definitely welcome!