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

ffp-cli

v0.2.5

Published

前端工程化的工具支持

Downloads

11

Readme

ffp-cli

全称front-full-project cli

提供一套完整的前端项目 脚手架 支持,通过选择对应配置直接集成,免去安装依赖再配置的麻烦。

安装

npm i -g ffp-cli

使用

1. 选择工具,可用 -D 参数声明,或在命令行中进行多选

ffp // 如不提供参数,默认会进行多选

// 或者
ffp -D jest eslint ts editorConfig commit release travis
// -D 参数支持数组,如提供了-D 参数,则不会进行选择

2. 添加全部工具

ffp -a

3. 显示支持的工具列表

ffp -l

工具介绍

1. eslint 代码校验

安装 eslint 相关依赖,并添加 eslint 配置文件,若本地不存在,则直接覆盖;若已存在,则会进行字段合并

文档地址: https://eslint.org/docs/user-guide/configuring/

2. editorConfig 编辑器格式化

(仅为推荐配置,自动格式化需自行配置)

生成 .editorconfig 文件。与 eslint 配合时,还会将本模板的 eslint rules 合并至 eslint配置文件

3. ts

安装 typescript 依赖,生成tsconfig.json。

4. commit 规范代码提交格式

安装 `commitizen`, `@commitlint/config-conventional`, `@commitlint/cli`, `husky`, `lint-staged` 等依赖,并在package.json 添加 "cz": "cz" 的脚本,提交代码时可通过 npm run cz 代替 git commit

添加了 pre-commit 进行 eslint --fix, commit-msg 进行 commitlint

commitlint 文档地址:https://github.com/conventional-changelog/commitlint

husky 文档地址:https://typicode.github.io/husky/#/?id=automatic-recommended

lint-staged文档地址:https://github.com/okonet/lint-staged#example-ignore-files-from-match

5. release 规范自动化发布

安装 standard-version 依赖。 并添加以下对象至 package.json(如已存在,并不会覆盖)

{
  scripts: {
    "release": "standard-version", // 本地发布,修改版本号,根据commit 生成 changelog.md,不提交代码
    "release:rc": "standard-version --prerelease rc", // 预发布
    "pup": "npm run release && git push --follow-tags origin master", // 本地发布并提交到远程
    "pub": "npm run pup && npm publish" // 本地发布并提交到远程,然后发布到npm
  }
}

文档地址:https://github.com/conventional-changelog/standard-version

6. jest 单元测试

安装 jest 等相关依赖,并生成 jest.config.js相关配置文件。

文档地址:https://jestjs.io/zh-Hans/docs/getting-started

7. travis 自动化CI/CD

生成 .travis.yml 文件,相关配置如不满足需要,可自行修改。

文档地址:https://docs.travis-ci.com/user/tutorial/