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

v0.8.0

Published

A generator for Yeoman

Downloads

5

Readme

generator-wonnie

Tired with your Rails asset pipeline? Have no idea how to manage assets in Sinatra or %your_favorite_framework%? Try Wonnie!

Wonnie is an web-application layout generator. Build stack does next:

Why Wonnie?

  • Easy to configure
  • Smaller assets footprint than every framework can build
  • Boilerplate and tools for code organization - no more spagetti hell

Getting Started

This is the sceleton generator for Yeoman, so you need to have it installed.

Install yeoman:

$ npm install -g yo

To install generator-wonnie from npm, run:

$ npm install -g generator-wonnie

Initiate the generator:

$ yo wonnie

Edit $grunt_config/project.js if needed

Usage

For development environment run:

grunt watch

Make sure that you pick proper public folder for your framework.

If you use foreman/shoreman/honcho/norman you may want to add this to Procfile:

web: ...
assets: grunt watch

Users of tmuxinator can add grunt watch to the separate tab

For production build:

grunt build

File structure

By default it generates next file structure:

  • assets/
    • css/
      • app/
      • lib/
      • vendor/
    • img
    • js
      • app/
      • lib/
      • vendor/
  • config/grunt
  • Gruntfile.js
  • package.json

Convensions

Stylesheets

Only scss files will be processed for now.

Naming:

  • widget.scss - stylesheet
  • _typo.scss - partial

Javascripts

Currently only AMD supported

By default, only app/main.js will be processed. You can add additional files to $grunt_config/project.js inside the modules array.

File require_config.js contains global requirejs options.

Production files will be built with amdclean so all it's limitations should be applied to the development code too.

In development mode you need to add requirejs and require_config manually. For example in Rails it looks like:

<% if Rails.env.development? %>
  <script type="text/javascript" src="/js/vendor/requirejs.js"></script>
  <script type="text/javascript" src="/js/require_config.js"></script>
<% end %>

<script type="text/javascript" src="/js/main.js"></script>

License

MIT License