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

create-react-ts-cli

v1.0.11

Published

a simple react scaffolding with typescript

Downloads

28

Readme

React Scaffolding

react脚手架,支持typescript

技术选型

  • react
  • react-router(v4)
  • react-loadable - 按需加载
  • es6
  • typescript
  • css/less/sass
  • webpack(v4)

  • antd - 按需加载
  • lodash - 按需加载
  • moment - 按时区引入

工具支持

  • babel7
  • eslint
  • stylelint
  • prettier
  • commit message规范(angular规范)
  • husky(约束代码提交:代码检查、格式化、commit msg规范)

环境

node v11.14.0+
npm v6.7.0+

安装与使用

npm install create-react-ts-cli -g
create-react-ts init
cd [projectName]
npm install

create-react相关命令

create-react-ts init 初始化项目
create-react-ts -v 查看工具版本号

模版结构

.
├── config  --------------------- webpack相关配置
├── dist  --------------------- 打包文件
├── dll  --------------------- dll文件
├── public  --------------------- html入口文件
├── src  ------------------------------ 项目代码目录
│    ├── api  ------------------- 接口集合
│    ├── constants  -------------------------- 常量集合
│    ├── components  ------------------- 公共组件
│    ├── images  ----------------------- 图片资源目录
│    └── pages  ------------------------ 页面集合目录
│        └── home  --------------------- home页面
│            ├── Home.tsx  ------------- 页面入口文件
│            └── Home.scss  -------- 页面样式
│            └── components  -------- 页面组件
│        ├── App.tsx  -------------------------- 路由配置
│        ├── index.tsx  -------------------------- 入口文件
│        └──index.scss  -------------------------- 入口样式
│    ├── styles  -------------------------- 公共css
│    └── utils  -------------------------- 通用函数
├── test  ------------------------------ 测试用例
├── types  ------------------------------ ts类型定义
├── .babelrc  ------------------------------ babel配置文件
├── .browserslistrc  ------------------------------ babel兼容浏览器配置
├── .commitlintrc.js  ------------------------------ commit msg规范检验配置
├── .editorconfig   ------------------------------ 编辑器配置
├── .eslintignore  ------------------------------ eslint 忽略文件
├── .eslintrc.js  ------------------------------ eslint 配置
├── .gitignore  ------------------------------ git commit忽略文件
├── .postcssrc.js  ------------------------------ postcss配置
├── .prettierignore  ------------------------------ prettier格式化忽略文件
├── .prettierrc.js  ------------------------------ prettier配置
├── .stylelintignore  ------------------------------ style lint忽略文件
├── .stylelintrc.js  ------------------------------ style lint配置
├── jest.config.js  ------------------------------ 单元测试jest配置文件
├── package-lock.json  --------------------- package lock 文件
├── package.json  --------------------- 项目配置
├── README.md  ------------------------ 说明文件
└── tsconfig.json  ------------------------ ts配置

todo

  • 检查命令是否有更新
  • 自动安装项目包
  • CI/CD
  • 关联git仓库
  • 日志监控

待扩展

  • 模版类型(vue/ng等)
  • 从远程仓库拉取模版