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-platanus-angular-library

v1.1.0

Published

A Yeoman generator for Angular libraries using Platanus conventions.

Downloads

2

Readme

Platanus Angular Library Generator

This generator provides a basic template to create Angular libraries that use Platanus code conventions and utilities. It also helps you adhere to package naming and file structure conventions and get up and running in no time!

What it does

  • Creates a new empty library with an initial component of your choosing (service, directive or filter)
  • Includes commonplace development files such as .gitignore and .jshintrc that adhere to good practices
  • Includes bower.json and package.json files that are filled with your library's information for easy package publishing
  • Includes a set of Gulp tasks to help you even further with bumping versions, pushing tags and npm releases

Install

  • Make sure you have installed Yeoman with npm install -g yo
  • Install our generator with npm install -g generator-platanus-angular-library
  • Done!

Starting a project

Easy as 1, 2, 3:

$ mkdir my-library
$ cd my-library
$ yo platanus-angular-library

You will be prompted to enter the following information about your library to help you name your files and prepare your package.json and bower.json:

  • Namespace (platanus)
  • Module Name (myLibrary)
  • Library Name (angular-my-library)
  • Component Type (service, directive or filter)

After you enter all the required information, the generator will create the necessary files and run npm install && bower install to download the required dependencies. Once everything is in place, you can start your happy development process.

Subgenerators

To help you extend your library with more components, you can run these subgenerators to add new boilerplate services, directives or filters to your project.

  • yo platanus-angular-library:service to generate a service,
  • yo platanus-angular-library:filter to generate a filter,
  • yo platanus-angular-library:directive to generate a directive.

Alternatively, you can just run yo platanus-angular-library:component and you will be asked to select the type of the component you want to add.

Usage

Here's how to use all the goodies that come with our generator.

Building

  • gulp lint checks your JavaScript code for errors and warnings.
  • gulp build runs the lint task and annotates Angular dependencies in your code (using ngInclude), minifies and concatenates it in a single file named according to your previously set library name (angular-my-library.min.js), and places it in the dist folder.
  • gulp watch runs the lint and build tasks every time you make changes on a file in the ./src folder of your project.

Publishing

  • gulp bump increases the version number on the package.json and bower.json files.
  • gulp publish-git runs the bump task, creates a commit with the modified version and pushes a new tag that corresponds with it.
  • gulp publish-npm runs both aforementioned tasks and publishes the new version into the npm registry.

Testing

Included in your newly created library, comes a tests folder with an example file that uses Karma and Jasmine. There's also a karma.conf.js that is configured to work with angular-mocks.

If you have installed the Karma CLI (npm install -g karma-cli), you may run karma start in the project's folder to run your tests.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Credits

Thank you [contributors](https://github.com/platanus/<%= libraryName %>/graphs/contributors)!

generator-platanus-angular-library is maintained by platanus.

License

generator-platanus-angular-library is © 2015 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.