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-simple-app

v1.3.1

Published

快速创建简单应用

Downloads

65

Readme

create-simple-app

Build Status

快速创建简单应用

简介

create-simple-app是一款能快速生成webpack配置的小工具。

平时经常写些demo,但是碍于vue-cli create-react-app umi过于庞大,自己复制webpack.config.js又太繁琐,就写了这个可以自由搭配选择功能,自动生成配置文件,顺带抄了一手vue-cli3有交互式选择功能,插件机制的工具。

安装

yarn global add create-simple-app

使用

create-simple-app my-app

或者

cd my-app
create-simple-app

2种构建方式,第一种会在当前文件夹下创建my-app文件夹,如果my-app文件夹已经存在,会提示是否覆盖my-app文件夹

第二种不设置目标文件夹,则会在当前目录下创建配置文件

如果当前目录一下已经存在项目(判断目录下是否有package.json)会进入 添加配置模式,提供部分配置对原有的package.json 进行改造添加

支持的功能

  • Babel

    在package.json中添加babel配置,如果选择了vue react typescript 则会添加对应插件

  • Css

    支持less 和 postcss, 添加postcss.config.js配置文件, 会在webpack.config.js中添加 css-loader less-loader postcss-loader 以及分离css的mini-css-extract-plugin插件

  • Eslint

    支持airbnb规范,如果选择了vue react typescript 则会添加对应eslint配置

  • Stylelint

    支持stylelint-config-standard规范,添加.stylelintrc配置

  • Prettier

  • file-loader

    会在webpack.config.js中添加 file-loader 解析图片、字体资源

  • Jest

    生成jest.config.js配置,如果选择了vue react typescript 则会添加对应配置

  • React

    添加对应的babel支持,react react-dom依赖

  • TypeScript

    添加tsconfig.json配置

  • Vue

    添加对应的babel支持,vue vuex vue-router依赖

  • lint-staged

    如果添加了stylelint prettier eslint配置,会添加对应的工作流程

  • commitlint

  • husky

    如果添加了 lint-staged 则会添加 pre-commit 钩子。如果添加了 commitlint 则会添加 commit-msg 钩子。

API

create(project?, promptResult?)

  • 参数

    • project - 项目名称
    • promptResult - 指定的inquirer配置,如果设置将跳过inquirer
  • 返回值

    • Generator 实例
import { create } from 'create-simple-app';

const generator = create();

generator.create();

add(project?, promptResult?)

  • 参数

    • project - 项目名称
    • promptResult - 指定的inquirer配置,如果设置将跳过inquirer
  • 返回值

    • Generator 实例
import { add } from 'create-simple-app';

const generator = add();

generator.create();