npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

galaxy-fe-tools

v1.0.3

Published

替换工具

Downloads

5

Readme

功能介绍

本项目主要依据接口提供的json数据,将指定路径下的文件中,所有的key替换为value值。其中,接口数据格式为:

{
    "status":200,
    "data":{
        "data":{
            "key1":"value1",
            "key2":"value2",
            "key3":"value3"
        }
    }
}

该接口可采用自定义接口,也可使用测试环境默认接口。后续将支持依据json文件内容进行替换。

参考配置

  • -i path1,path2,path3 : 表示当执行替换功能时,路径path1、path2、path3中所有的文件忽略,不进行替换操作。默认忽略指定文件夹中的/node_modules,/.git,/package.json,/package-lock.json。
  • -r 指定文件夹相对路径,该路径下文件将会被全部扫描并执行替换操作。
  • -u 指定调用配置信息的接口url地址。
  • -file 指定文件进行打包。若同时指定文件以及文件夹,将替换指定的文件以及指定的文件夹中所有的问题内容。
  • -m 替换类型,默认为dev。dev模式,将对象的{$key$}转为value,pro模式,将key转为value。

使用说明

  • npm i galaxy-fe-tools
  • 例:galaxy-fe-tools -u http://cccc.com/json -r ./dist -file ./xxx.js,./dist/ss.html