New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

simple-entrypoint-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-entrypoint-generator

Simplest hookable entrypoint generator

  • 0.0.1
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
1
Weekly downloads
 
Created
Source

Simplest Hook

Simplest Hook is a very simple hook tool. It collects some files from few modules and merge it in the one object and generate new .ts script.

Right now it supports only simple array collection hook. I plan to add more functionality in the future.

Installation

npm install --save-dev simple-entrypoint-generator

Usage

const generateScript = require("simple-entrypoint-generator/generateScript");

// returns script text
const entrypointScript = generateScript({
    // optional
    destination: "path/to/outputFile.ts",

    entrypoint: {
        src: "path/to/my/entrypoint"
    },

    modules: [
        {
            src: "path/to/may/moduleA"
        },
        {
            src: "path/to/may/moduleB"
        }
    ]
});

Each module could provide object with any keys. All these keys will include in entrypoint options as array.

E.g. your moduleA returns next object:

{
    route: {
        path: "/",
        component: "MyComponent"
    }
}

and moduleB:

{
    route: {
        path: "/books",
        component: "BookList"
    }
}

Then entrypoint module will receive next object:

{
    route: [
        {
            path: "/",
            component: "MyComponent"
        },
        {
            path: "/books",
            component: "BookList"
        }
    ]
}

That's it. Nothing more.

FAQs

Package last updated on 30 Jan 2017

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