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

ne-create-project

v1.0.1

Published

A command-line tool for creating a custom project

Downloads

1

Readme

ne-create-project

前端脚手架工程,包含不限于dashboard、nservice。

1 快速开始

全局安装该模块 $ npm install ne-create-project -g

1.1 获取使用帮助

通过ne-create-project -hne-create-project --help查看使用帮助

$ ne-create-project -h

 Usage: ne-create-project [Commend] [Options] 

  Options:

   
    --name [project name] set project name you want.         
    -v, --version   output the version number
    -h, --help      output usage information

  Commands:

    init [options]  init an project

1.2 获取版本号

通过ne-create-project -vne-create-project --version查看版本号

$ ne-create-project -v

 v1.0.0 

1.3 生成骨架工程

1.3.1 指定工程名

通过ne-create-project init --name [project name]开始初始化

$ ne-create-project init --name test-project

其中project name是将生成的文件夹名称,禁止和当前命令的执行文件夹下的子文件夹重名

1.3.2 选择要生成的工程类型

通过键盘上的选择工程类型

$ ne-create-project init --name test-project
 ? select this project's type (Use arrow keys)
 > nservice
   dashboard

目前仅支持两种类型

  • nservice
    运营管理系统后端,以eggjs为基础框架
  • dashboard
    运营管理系统前端,以vuejs为基础框架,可转到dashboard查看基础架构

1.3.3 指定所有者

$ ne-create-project init --name test-project
 ? select this project's type dashboard
 ? input this project's author [author name]

author name为所有者,必填

1.3.4 设定工程说明

$ ne-create-project init --name test-project
 ? select this project's type dashboard
 ? input this project's author [author name]
 ? input this project's description [description]

description为工程描述,可回车跳过

1.3.5 查看结果

当控制台输出SUCCESS! nservice Project [project name] initalized!表示执行成功。可以通过ls或检查当前文件夹查看

2 更新与支持

你可以阅读 更新与支持 查看该脚手架工程的更新记录和支持计划

3 测试相关

单元测试框架为mocha,采用mochawesome生成单元测试报告,采用istanbul生成测试覆盖率报告
你可以进入到该脚手架工程的安装目录,进入该工程文件夹查看相关测试报告
该工程文件夹下有有两个文件夹,分别是 reportercoverage,存放了单元测试报告和测试覆盖率报告

你也可以执行 npm run test 重新生成相关测试报告
如果你想在window环境下获取linux环境下的相关测试报告,可以在删除 node_modules/package-lock.json 文件后,在docker容器中进行测试,运行命令为
docker run -it --rm --name ne-create-project-test -v [所在文件夹]/ne-create-project:/usr/src/ne-create-project --user="root" -w /usr/src/ne-create-project node sh -c "npm install && npm run test"