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

node-project-kit

v0.1.0

Published

A kit helps you to create Node.js project effortlessly.

Downloads

2

Readme

Node.js Project Kit - 便捷的Node.js项目初始化工具

Build Status bitHound Code tested with jest license

背景:很多时候,需要快速开发一个新的web项目(Node.js居多),但是在初始化项目的时候,需要配置各种工具(大部分是copy老项目的配置项),这种体力活做多了就觉得麻烦,而且容易出错,自然而然想到了脚本处理,所以就有了这个项目。

需求清单:

  • [x] 检查运行环境,Node.js需要v6.*及以上版本;
  • [x] 自动部署配置文件清单的各项内容(基础版);
  • [x] 交互填写项目的基本信息;
  • [x] 清理git记录,从新初始化log;

待开发的需求清单:

  • [] 增加交互环节的模板选择环节,对应生成fis3webpack等等选择;

如何使用

使用前确保已经安装v6.*或者更新版本的Node.js,最好已经安装yarn以便于加快安装速度(v5.*版本的npm也是不错的选择)

  1. git clone https://github.com/tonyc726/node-project-kit到本地;
  2. npm run setup或者yarn run setup进入交互式安装过程,填写对应信息,即可完成初始化工作;
  3. 微调配置,熟悉一下package.json中的各项内容,进入开发;

工程说明

依赖模块

  1. JS语法转换工具 - Babel(了解更多,可以参考一下《Babel笔记》):
    • "babel-cli" -> Babel的命令行交互工具
    • "babel-preset-env" -> 根据目标环境的配置,自动调整语法转换时所需的Babel插件
    • "babel-runtime" & "babel-plugin-transform-runtime" -> 两者配合用以解决新语法中全局对象或者全局对象方法不足的问题
  2. 测试工具:
    • "Jest" -> Facebook推出的一个极容易上手的JavaScript测试工具
  3. 代码检测工具:
    • "eslint" -> 插件化的javascript代码检测工具
  4. 其它小工具:
    • "rimraf" -> deep deletion module platform-independent
    • "cross-env" -> set node environment variables platform-independent
    • "npm-run-all" -> Command Line Interface to run multiple npm-scripts in parallel or sequential
    • "semantic-release" -> fully automated package publishing

配置文件清单

  1. .babelrc -> Babel的配置项文件
  2. .editorconfig -> 编码风格配置项(默认使用2个空格缩进)
  3. .eslintrc -> ESLint的配置项(默认使用airbnb的规则,稍加扩展)
  4. .eslintignore -> ESLint的忽略清单
  5. .travis.yml -> Travis CI的配置文件
  6. .gitattributes -> Git属性配置文件(很少用)
  7. .gitignore -> Git的忽略清单
  8. webpack.config.babel.js -> ES6语法的webpack配置文件,需要配合Babel一起使用

目录结构

├── .babelrc
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .gitattributes
├── .gitignore
├── .travis.yml
├── LICENSE
├── README.md
├── dist
│   └── index.js
├── package.json
├── src
│   ├── index.js
│   └── index.test.js
└── yarn.lock

License

Copyright © 2017-present. This source code is licensed under the MIT license found in the LICENSE file.


Made by Tony (blog)