Socket
Book a DemoInstallSign in
Socket

@aligov/build-scripts-gov-provide

Package Overview
Dependencies
Maintainers
15
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aligov/build-scripts-gov-provide

build-scripts plugin template for developers

latest
npmnpm
Version
1.0.2
Version published
Maintainers
15
Created
Source

@aligov/build-scripts-gov-provide

基于 ProvidePlugin 来给应用自动提供一些工具方法而不用手动 import。

默认包括:

  • ctx: GovLib
{
  'ctx': '@aligov/lib'
}

项目中可以直接使用 ctx.text('domain.page.mod.str', var1, var2) 而不需要从 @aligov/lib 中手动 import text

对于以 @aligov/ 开头的包,如果没在项目中找到,那么会尝试自动安装。

用法

具体可参考 ProvidePlugin,以下是一个例子

{
  "plugins": [
    [
      "@aligov/build-scripts-gov-ctx",
      {
        "$": "jquery",
        "__": ["@aligov/lib", "text"]
      }
    ]
  ]
}

FAQs

Package last updated on 14 Sep 2020

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