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

v0.1.20

Published

A collection of Yeoman generators for Mashery Frontend components.

Downloads

321

Readme

Yeoman Mashery Frontend (mf) Generators

This repository will hold the various yeoman generators to be used for Mashery Frontend.

The Mashery Frontend application architecture will allow for plugin based items that can be used with the application. The core of the application is built upon the FlightJS framework. We have created a base structure for each of these FlightJS parts that are to be used within Mashery Frontend. The goal is to have each part of Mashery Frontend extensible by any developer. When adding a new Mashery Frontend item, these generators will prove helpful to create the various stubs for these items.

Requirements

You should ensure the following is installed prior to using these generators.

  • Node and NPM
  • Yeoman
    • npm install -g yo

    If you have problems with permissions try: sudo npm install -g yo

Generators

To install the generators we can install the base generator which will include all possible items that can be generated.

Clone this repo, change to the clone directory and run the following command:

npm install -g

> If you have problems with permissions try: ```sudo npm install -g```

Basic usage will prompt you in a wizard like style if invoking the Mashery Frontend generator.

  • Base

    Usage:: yo mf

    This will provide you with a prompt on what to generate (ie. page, plugin, theme, data, component or mixin) and additionally ask the name of what you want to generate.

  • Page

    Will generate a stub Mashery Frontend web page application.

    The generated base structure of a component will reside as follows: / app/ build/ .json .config.js replace.css.html replace.js.html require_config.json require_wrap_end.js require_wrap_start.js ... other files excluded from this document for brevity components/ ... view components go here data/ ... data components go here lib/ component.js component_data.js cpt.js debug.js mixins/ with_data.js with_fetch.js with_log.js with_plugin_view.js with_resource.js with_style.js with_tabs.js with_view.js ... other files excluded from this document for brevity resources/ en_us.js styles/ style.scss utilities/ plugins/ view.js view_lite.js ... other plugin types go here (current they have to be manually created) log.js file.js observable.js plugins.js settings.js themes.js utilities.js ... other files excluded from this document for brevity views/ view.mustache ... other files excluded from this document for brevity app.js app.test.js index.html bin/ npm_postinstall.sh npm_preinstall.sh dev/ .json.default ... other files excluded from this document for brevity doc/ README.md grunt/ tasks/ ... store custom grunt tasks here aliases.js ... other files excluded from this document for brevity plugins/ ... plugins go here themes/ ... themes go here .bowerrc .gitignore .jshintrc bower.json Gruntfile.js index.html karma.conf.js package.json README.md test-main.js

  • Component

    Will generate a stub Flight component and related files with a provided name which contains the necessary base files as well as the directory structure for Mashery Frontend to read from. An empty Style, Template, Locale and Unit Testing file is included with the stub generation.

    The generated base structure of a component will reside as follows: app/ components/ / main.js main.test.js resources/ en_us.json styles/ style.scss views/ view.mustache

    Usage: yo mf:component <SOME COMPONENT NAME>

    Example: yo mf:component foo OR yo mf:component 'my super component' OR yo mf:component some_custom_component

  • Data

    Will generate a stub Flight component and Unit Testing file is included with the stub generation.

    The generated base structure of a data component will reside as follows: app/ data/ / main.js main.test.js

    Usage: yo mf:data <SOME DATA COMPONENT NAME>

    Example: yo mf:data foo OR yo mf:data 'my super data component' OR yo mf:data some_custom_data_component

  • Mixin

    Will generate a stub mixin with a provided name. An empty base mixin and Unit Testing file is included with the stub generation.

    The generated base structure of a component will reside as follows: app/ mixins/ with_.js

    Usage: yo mf:mixin <SOME MIXIN NAME>

    Example: yo mf:mixin foo OR yo mf:mixin 'my super mixin' OR yo mf:mixin some_custom_mixin

  • Theme

    Will generate a theme folder with a provided name, a manifest file and stub Flight component for each app component which contains the necessary base files as well as the directory structure for Mashery Frontend to read from.

    The generated base structure of a theme will reside as follows: themes/ / main.js main.test.js components/ ... component directories for existing app component containing their respective parts (see above Component structure) resources/ en_us.json styles/ _mixins.scss style.scss views/ style.mustache

    Usage: yo mf:theme <SOME THEME NAME>

    Example: yo mf:theme foo OR yo mf:theme 'my super theme' OR yo mf:theme some_custom_theme

  • Plugin

    Will generate a stub plugin and related files with a provided type and name.

    The generated base structure of a baic plugin will reside as follows: plugins/ / main.js

    Usage: yo mf:plugin <SOME PLUGIN NAME> <SOME PLUGIN TYPE>

    Example: yo mf:plugin foo sometype OR yo mf:plugin 'my super plugin' sometype OR yo mf:plugin some_custom_plugin sometype

    The generated base structure of a view_lite plugin will reside as follows: plugins/ / main.js

    Usage: yo mf:plugin <SOME PLUGIN NAME> view_lite

    Example: yo mf:plugin foo view_lite OR yo mf:plugin 'my super plugin' view_lite OR yo mf:plugin some_custom_plugin view_lite

    The generated base structure of a full view plugin will reside as follows: plugins/ / main.js resources/ en_us.json styles/ style.scss views/ view.mustache

    Usage: yo mf:plugin <SOME PLUGIN NAME> view

    Example: yo mf:plugin foo view OR yo mf:plugin 'my super plugin' view OR yo mf:plugin some_custom_plugin view

You should now be able to start building with Mashery Frontend.

Enjoy!

  • David