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

mf-bootstrap

v1.3.0

Published

`mf-bootstrap` allows you to generate micro frontends to be used with [mf-maestro](https://github.com/calions-app/mf-maestro) and [mf-bundler](https://github.com/calions-app/mf-bundler)

Downloads

46

Readme

mf-bootstrap

mf-bootstrap allows you to generate micro frontends to be used with mf-maestro and mf-bundler

Install

You should install this package globally to easily use it anywhere:

$ npm install -g mf-bootstrap

Quick start

We will start by creating a new project named blog:

$ mf-generate init blog ../main-styles

Now we will go to the created project:

$ cd blog

And we will create a first micro frontend for the domain users, a creation of account:

$ mf-generate mf users accounts new

You can install all dependencies with npm install (this will also install micro frontends' dependencies).

And now you can run the tests to be sure everything is working fine:

$ npm run test

This will run unit and end2end tests for all micro frontends.

You could also go to your micro frontend directory and start it to check everything is ok:

$ cd apps/users/accounts-new
$ npm start

If you don't have a webserver running, don't forget to run mocks with npm run mocks at the root of your project. If you have a webserver running, be sure to configure its host and port in the .env file.

Everything is working and ready, you can adapt the base code for your needs and generate new micro frontends.

Usage

With mf-bootstrap you can generate a new project that will host your micro frontends, and you can also add new micro frontends.

Generate a new project

$ mf-generate init [project] [mainStylesPath] [-d destPath] [-a author]

This command will generate a new project named <project> in folder <destPath>/<project>.

Arguments

  • project: The project name
  • mainStylesPath: The relative path from your project's folder where you can find the main styles projects. This project is used to generate styles used by your instance of the maestro, so that your micro frontends can be run with these styles outside of the maestro.
  • destPath: The destination folder where your project will be created. Default to .
  • author: The author name to use in the package.json files. Default to Calions apps

Generate a new micro frontend

Go to your project's folder. Then execute:

$ mf-generate mf [domain] [entity] [type] [-l lang]

This will generate a new micro frontend in your apps folder.

Arguments

  • domain: The domain of your entity
  • entity: The name of the entity linked to this view
  • type: The UI type of the view. Possible values are:
    • master: List of entities
    • detail: A detailed view of an entity
    • new: A form to create a new entity
    • edit: A form to edit an existing entity
  • lang: The language/framework to use for this micro frontend. Default to elm