🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

page-id

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

page-id

generate page id

latest
Source
npmnpm
Version
1.0.4
Version published
Weekly downloads
14
100%
Maintainers
1
Weekly downloads
 
Created
Source

page-id

Generating unique random ID

#安装: npm i -g page-id

#用法

  • 文件中需要生成pageid的地方写上@@@pageid@@@

  • 执行 page-id path --namespace name; 其中path为要替换的文件或者路径,支持glob, name为命名空间,可以为该命名生成独一无二的key,避免与别的仓库重复。

  • page-id --namespace name; 可以直接生成一个id

  • --namespace可不写,默认值为hf

#例如:

  • page-id a.html --namespace hfmobile
  • page-id '/*.js' --namespace hf 替换该目录下所有的js 注意:path代引号,为js处理glob,可以深度便利所有子文件夹。如果不带引号,则为node command line 解析glob,/*.js,只能命中一级目录。
  • page-id 'web/**/*.html' --namespace hf 替换web目录下所有html
  • page-id 'web/*.html' --namespace hf 仅替换web目录下一级的html,对web子目录忽略

FAQs

Package last updated on 07 Dec 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