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

wern-cli

v0.2.0

Published

A Comprehensive Guide for React Boilerplate containing Webpack, Gulp, React, Redux, Router, Immutable, etc.

Downloads

9

Readme

wern-cli

A Comprehensive Guide for React Boilerplate containing Webpack, Gulp, React, Redux, Router, Immutable, etc.

Installation

First, install wern-cli using npm (we assume you have pre-installed node.js).

npm install -g wern-cli

Then generate your new project:

mkdir demo
cd demo
wern init

Install Dependencies

cd demo && npm install

start your project server:

npm install -g gulp
gulp dll
gulp server

Unit Test

npm run test

or watch test

npm run test-watch

build your project:

gulp build

Generate your module

werng moduleName

Note: The "moduleName" is you enter module name. After exec this command, it will create "react component", "redux action", ande "redux reducer" etc.

Wern Cli Development

wern templates

The wern-cli generator react templates can download from the github https://github.com/enjoyfuture/wern-template.

compile

npm run compile

npm publish

npm publish

Change Log

Change Log

Help and Version

wern -v // Check CLI version
wern --help // Get help and check usage

Frameworks and Tools

Unit Test Frame

  • ava : 测试框架,类似于 mocha jest jasmine QUnit 等 官网:https://github.com/avajs/ava 中文指南:https://github.com/avajs/ava-docs/blob/master/zh_CN/readme.md
  • enzyme : React测试工具,依赖 react-addons-test-utils 可以类似 jquery 风格的 api 操作react 节点 官网:https://github.com/airbnb/enzyme 文档:http://airbnb.io/enzyme/
  • sinon : 提供 fake 数据, 替换函数调用等功能 官网:http://sinonjs.org/
  • nyc : JS code coverage tool that computes statement, line, function and branch coverage(用来检测单元测试覆盖率) 官网:https://github.com/istanbuljs/nyc Note: With this configuration, the Istanbul instrumentation will only be active when NODE_ENV or BABEL_ENV is test.
  • nock: 用来模拟 http 请求测试用 官网:https://github.com/node-nock/nock
  • 参考文章
    • http://zhaozhiming.github.io/blog/2016/03/28/use-ava-and-enzyme-to-test-react-component-part1/

    • http://zhaozhiming.github.io/blog/2016/03/29/use-ava-and-enzyme-to-test-react-component-part2/

    • http://zhaozhiming.github.io/blog/2016/03/29/use-ava-and-enzyme-to-test-react-component-part3/

License

MERN is released under the MIT License.