Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@studyportals/bob-manifest-generator

Package Overview
Dependencies
Maintainers
18
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@studyportals/bob-manifest-generator

A Webpack plugin that generates a manifest file for your microservice.

  • 1.3.0
  • npm
  • Socket score

Version published
Maintainers
18
Created
Source

BobManifestGenerator

BobManifestGenerator is a Webpack plugin that helps you generate a manifest.json file for your microservice, which can then be loaded via Bob.

Table of Contents

Prerequisites

In order to use BobManifestGenerator you need the following Prerequisites:

  • webpack version 3 or higher
  • node.js version 8.12.0 or higher
  • npm version 6.4.1 or higher

How to use

In order to start using the plugin you should first install the package from npm:

npm i -D @studyportals/bob-manifest-generator

After installing it you can import it to your webpack configuration file like so:

const BobManifestGenerator = require('@studyportals/bob-manifest-generator');

Subsequently you can add BobManifestGenerator to your webpack plugins like so:

plugins: [
  new BobManifestGenerator({
      name: string,
      html: string,
      baseURL: string,
      exclude: string[]
  })
]

Output

BobManifestGenerator outputs a manifest file with the following structure:

{
    "name": "Dummy Microservice",
    "html": "https://bucket.prtl.co/index.html",
    "assets": {
        "js": [
            {
                "url": "https://bucket.prtl.co/dist/bundle.[hash].js",
                "async": true
            }
        ],
        "css": [
            {
                "url": "https://bucket.prtl.co/dist/styles.[hash].css"
            }
        ]
    }
}

Options

When using the plugin, you can pass an options object to the constructor. This can include the following options:

OptionDescriptionRequired
nameThe name of your microservice.yes
htmlThe HTML that should be injected on the page the microservice is loaded in.yes
baseURLThe base URL for your microservice's assets. This will be prepended to the filenames.no (default: '')
excludeAn array of filenames to be excluded from the manifest. This can be just a filename or a filename including extension. When true is passed as a value, all assets will be excluded.no (default: [])
asyncAn array of filenames to be loaded async. This can be just a filename or a filename including extension. Keep in mind that only javascript assets may be loaded async. When true is passed as a value, all javascript assets will be loaded async.no (default: [])

FAQs

Package last updated on 12 Sep 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc