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

genfe-cli

v1.1.4

Published

Front end code generation scaffold

Downloads

4

Readme

Genfe-cli

初衷不想一遍遍写这该死的配置文件,重复的东西都该想办法消除
通过命令行快速生成配置、基础代码、以及相关生态
要可以同步本地已有配置,保留自定义改动
可以选择性的生成某个配置

使用

npx gen-fe [-d|--default]
           [--no-install]
           [--no-generator]

配置清单

  • typescript
    • tsconfig.json
  • husky
    • .huskyrc
  • lint-staged
    • .lintstagedrc
  • commitlint
    • commitlint.config.js
  • prettier
    • .prettierrc
  • eslint
    • .eslintignore
    • .eslintrc.js
  • babel
    • babel.config.js
  • browserslist
    • .browserslistrc
  • nodemon
    • nodemon.json
  • npm
    • .npmignore
    • .npmrc
  • vscode
    • .vscode
    • jsconfig.json
    • .editorconfig
  • git
    • .gitignore

项目清单

  • react
  • react-native
  • vue

react-native

提供了 react-native 的模板项目

合并方式

使用 git-merge-file 三路文件合并命令合并文件

usage: git merge-file [<options>] [-L <name1> [-L <orig> [-L <name2>]]] <file1> <orig-file> <file2>

    -p, --stdout          send results to standard output
    --diff3               use a diff3 based merge
    --ours                for conflicts, use our version
    --theirs              for conflicts, use their version
    --union               for conflicts, use a union version
    --marker-size <n>     for conflicts, use this marker size
    -q, --quiet           do not warn about conflicts
    -L <name>             set labels for file1/orig-file/file2

规则为合并 file1、file2 到 file1 文件中,file1、file2 以 orig-file 为原始文件,这里可以给一个空文件
file1 指定为用户目录下的文件,file2 指定项目中要 merge 的文件,orig-file 为 lib 下的空文件
调用 bash 命令执行合并

合并命令

使用/dev/null 代替空文件

git merge-file file1 /dev/null file2

TODO

  • [x] 基础代码,先完善目前定义的所有的配置
  • [x] 提供 cli,可一键生成,或自定义
  • [x] 增加 vscode 配置
  • [x] 如何使用 git merge 的形式合并配置文件
  • [ ] 支持写入 package 里的配置
  • [ ] 优化配置,补充参考业内好的配置
  • [ ] 考虑如何生成项目模板代码

参考项目

参考文档