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

public-header-copy

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

public-header-copy

pubilc header handler for DataGrand.com

  • 1.0.7
  • latest
  • npm
  • Socket score

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

public-header

NPM Version Coverage Status Build Status Downloads Dependency Status License

pubilc header handler for DataGrand.com

Install

npm i -D public-header

Usage

在项目根目录写入script.js

import publicHeader from "public-header"

publicHeader // true

在项目根目录配置public.json

{
  "header": {
    "template": true,
    "style": false,
    "script": false,
    "src": "index.html" // todo: smart match files
  },
  "dgcsm": {}, //todo
  "footer": {} //todo
}

HTML 模板

<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <!--start:header-style-->
  <!--end:header-style-->
</head>
<body>
  <!--start:header-template-->
  <!--end:header-template-->
  <!--start:header-script-->
  <!--end:header-script>
</body>
</html>

目前只能匹配单个文件,只能一次插入,实验性质,其他功能正在补全。请在个人实验项目中试用!

TODO:

  • delete
  • replace
  • dev & product 环境
  • CDN
  • smart match files

License

MIT © younixiao

FAQs

Package last updated on 14 Nov 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