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 🙏

© 2025 – Pkg Stats / Ryan Hefner

generator-mithril-webpack

v0.0.9

Published

Yeoman generator for Mithril.js applications utilizing ES6 and WebPack

Readme

generator-mithril-webpack npm version Build Status Coverage Status Join the chat at https://gitter.im/cnatis/generator-mithril-webpack

Yeoman generator

Current Version Information V0.0.9

This project is still in its infancy and is only suggested for playing with the technology until a stable version is released. Feel free to contribute your ideas, and feedback on our Google group.

Mithril WebPack Generator Google Group

Want to learn more than what is here? Go visit the Mithril WebPack Generator Wiki

Getting Started

What is Yeoman?

Trick question. It's not a thing. It's this guy:

Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create.

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.

npm install -g yo

Yeoman Generators

Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension.

To install generator-mithril-webpack from npm, run:

npm install -g generator-mithril-webpack

Finally, initiate the generator:

yo mithril-webpack

Mithril WebPack Generator Features

This generator will provide the following features to your new application. Optional features are marked accordingly and the user will be prompted to decide if they would like to include them.

WebPack

WebPack is the included bundling package for this generator. WebPack will bundle all required files as well as pre-proccess files from SASS to CSS. WebPack is very extensible and to learn more please visit the WebPack website.

Code Splitting/Asynchronous Modules

WebPack allows us to automatically split our code into bundles for increased initial load speed. The code generated by this generator already takes advantage of this so that each and every module is split into its respective bundle.

Lazy/Pre Loading

This generator includes code that will start to load your additional modules after the first module render, this means the end user only needs to wait to load the first module, additional modules are loaded while the user is browsing the first module.

ES6/ES2015

This generator utilizes the new ES6/ES2015 version of JavaScript. The code generated relies heavily on the use of these new features and as such it is important to understand some key concepts.

ES6/ES2015 Modules

The new module and import syntax allows developers to avoid unnecessary namespacing and allows for better code reuse and structure. Please read about the ES6/ES2015 module syntax to familiarize yourself with these concepts.

ES6/ES2015 Classes

The new class syntax adds syntactic sugar to JavaScripts prototype pattern. This allows the creation of classes and objects from these classes in a clean and easier to understand way. Please read about the ES6/ES2015 class syntax to familiarize yourself with these concepts.

SASS

This generator comes packed with a SASS pre-processor. SASS brings many powerful features to CSS which you can read about on the SASS website

Bootstrap [OPTIONAL]

You have the choice to include Bootstrap SASS in your application when you first generate the folder structure. Your application will include Bootstrap SASS which will let you pick and choose the features you wish to use in your web application.

jQuery [OPTIONAL]

You also have the choice to include jQuery into your project. jQuery is required for Bootstrap and will be installed if you select to include Bootstrap into your application.

Git [OPTIONAL]

Users will be prompted if they would like the generator to initialize a Git repo for their project. If they choose yes, their project will be initialized with a Git repo and an initial commit already made.

Mithril WebPack Generator Usage

Base App Generator

yo mithril-webpack

This generator will create the base application structure for use with this CLI tool.

Component Generator

yo mithril-webpack:component <componentName>

This generator will create a component for you using the current directory as the project.

Arguments:

componentName

The name of the component will determine the folder name used to hold the components files.

Layout Generator

yo mithril-webpack:layout <layoutName>

This generator will create a layout for you using the current directory as the project.

Arguments:

layoutName

The name of the layout will determine the folder name used to hold the layouts files.

Model Generator

yo mithril-webpack:model <modelName>

This generator will create a model file for you using the current directory as the project.

Arguments:

modelName

The name of the model will determine the file name of the model

Options:

--baseUrl

The base url used for all model requests.

Route Generator

yo mithril-webpack:route <newRoute>

This generator will create a view and add it to the applications routes.

Arguments:

newRoute

The route url for this view. For example "/profile/new".

Options:

--default

Passing the default flag will set this route as the default route at url "/"

Application Structure

Read more about the application structure this generator advocates on the application structure wiki page.

Contributing

Read more about contributing to this project on the developer guide wiki page.

License

MIT