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-angular-components-es6

v0.1.3

Published

Yeoman generator for angular 1.5+ with webpack and ES6 to create component-based application structure.

Downloads

6

Readme

Generator Angular Components ES6

npm

A Yeoman generator to bootstrap Angular 1.5+ applications with ES6 and Webpack.

Suitable for component-based application structure. Facilitates creation of components tree.

Contribution

It's a very early version of the generator. Any feedback is welcome.

TODO:

  • ~~Add component generator~~
  • Add routing support
  • Add webpack dev server support

Setting up project

  • Install: npm install -g yo generator-angular-components-es6
  • Run: yo angular-components-es6

Commands

  • yo angular-components-es6 shows a wizard for generation of a new generator.
  • yo angular-components-es6:component generates new component in your application. Supports nested components. E.g. 'parent/nested' will generate a component with name 'nested' in /app/components/parent directory.

Generated Structure

angular-webpack-es6/
 ├──app/                                     * source files to be compiled to javascript
 |   ├──components                           * Root directory for your application components
 |   └──%appname%.js                         * entry file for our Angular application
 ├──webpack.config.js                        * webpack config
 └──package.json                             * package.json file

Component Structure

Generated component directory has the following structure

app/components/awesome
 ├──nestedComponent/                         * Nested component used by this component.
 ├──awesome-component.js                     * Angular module and component registration file. Includes Angular 1.5+ component registration logic.
 ├──awesome-controller.js                    * Angular controller for your component.
 ├──awesome.html                             * Angular template for your component.
 └──awesome.scss                             * Styles for your component

Webpack features

  • Bundles and minifies all javascript and css files.
  • Copies all image files to output folder and gives unique names to images based on content hash.
  • Generates a single sprite images for all images in /app/shared/images/sprite directory.
  • Gives unique names to assets based on its content hash which help busting cache for changed assets.
  • Includes all angular templates into js file and adds them to template cache.
  • Enables LiveReload for dev configuration

License

MIT