🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

gogocode-plugin-mbp-classnames

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gogocode-plugin-mbp-classnames

gogocode-plugin-sample

latest
npmnpm
Version
0.0.4
Version published
Weekly downloads
15
1400%
Maintainers
1
Weekly downloads
 
Created
Source

作为 npm 包,项目根目录的 transform.js 会被 gogocode-cli 调用

fileInfo 会包括 source 和 path 作为单个代码文件的内容和路径 api 目前只有 gogocode 作为转换库注入 options 将透传命令行的 options


module.exports = function(fileInfo, api, options) {
  const sourceCode = fileInfo.source;
  const $ = api.gogocode;
  return $(sourceCode)
    .replace('const a = $_$', 'const a = 2')
    .generate();
};

命令行调用方式:


gogogcode --src script.js --out script-compiled.js --transform=transform.js


Keywords

gogocode

FAQs

Package last updated on 26 Jul 2022

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