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

v0.6.0

Published

Yeoman generator for angular application. Follows a modular strutcture.

Downloads

11

Readme

Mika Generator

Code Climate npm version Version Eye

Yeoman generator

V0.6.0

Enterprise Structure Rework

  • Add more customization options to startup
  • Change how yeoman initializes the application making it lots faster and less to carry around
  • Separated modules into view_models/modules/api/interceptors
  • Changes SCSS to be modular so we can compile each file individually
  • Create a utility file that we can import as a common file
  • Create a global file that is used everywhere
  • Rework tasks for gulp to be faster and less buggy
  • Switch 6to5 to babeljs
  • Add a basic apiHelper service that helps with the create of apis
  • Added options for a interceptor service

Getting Started

$ git clone https://github.com/MikaAK/generator-mika 'generator-mika'

$ cd generator-mika

$ npm link

Or

NPM Package

To install generator-mika from npm, run:

$ npm install -g generator-mika

Finally, initiate the generator:

$ yo mika

# After install
$ gulp

Currently no subgenerators are working. These will be released with 0.6.1

Important note!

When generating most command that requires two arguments if they are identical can be safely called with one.

IE

# Instead of this:
yo mika:service user user
# We say:
yo mika:service user
Controllers:
$ yo mika:controller {featurename}
Factories:
$ yo mika:factory {featurename} {factoryname}
Directives:
$ yo mika:directive {optional:parentFolder} {featurename} {directivename}
Providers:
$ yo mika:provider {featurename} {directivename}
Filters:
$ yo mika:filter {featurename} {filtername}
Services:
$ yo mika:service {featurename} {servicename}
View:
$ yo mika:view {featurename} {viewname}

Vendor Files

Included is a vendor folder, place all .scss files in here if there needed.

EG. Using Foundation

/vendor/foundation.scss /vendor/foundation/_functions.scss /vendor/foundation/_settings.scss /vendor/foundation/components/

Using Gulp

To start the server use:

$ gulp serve

To build the project type:

$ gulp build

Other hookups to consider when creating things

  • When creating a new filetype Directves, Controller, Factory make sure to inject there dependency into the appropriate place.

File Structure

#example
|app
  |-app.js
  |-index.jade
  |-modules/
    |-search/
      |-search_controller.js
      |-search.jade
      |-search.scss
    |-my_directive/
      |-my_direc..._directive.js
      |-my_direc..._controller.js
      |-my_direc..._template.jade
      |-my_direc..._style.scss
    |-navbar/
      |-navbar_directive.js

  |-view_models/
    |-home/
      |-home_controller.js
      |-home.jade
      |-home.scss

  |-interceptors/
    -my_interceptor.js

  |-api/
    |-api.js
    |-api_service/
    |-my_api.js

  |-states/
    |-states.js
    |-app_states.js

  |-vendor/
    |-lodash.js
|-build

Gulp Commands

Commands prefixed with gulp (eg. gulp serve), run these to control the asset pipeline

Main Commands

serve: Restart the server cleaning the .tmp directory this is the default command

build: Build for distribution, minifying and concatenation.

Sub Commands - Used to create main commands

compile

minify

javascript

clean

Troubleshooting

If you are getting injector module errors, make sure that if not creating a new module you dont declare angular.module('x', []) and declare angular.module('x')

If random errors pop up, restart the gulp server

Contributing

There is much to be done still in this project, it still needs tests it still needs optimization and more gulp tasks and Yeoman options, this is supposed to be a highly customizable generator.

If any options are wanted submit a PR and I will happily merge them in. The next big task is cleaning the gulp tasks up as they are a bit messy.

IE

  • Heroku Publishing Capability

  • Cleaning up the gulp tasks

License

The MIT License (MIT)

Copyright (c) 2015 Mika Kalathil

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.