ynw-cli
CLI for VUE & REACT
Last updated 16 days ago by liqiang0335 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ynw-cli 
SYNC missed versions from official npm registry.

ynw-cli

Install

npm i -g ynw-cli

Usage

# vue template
ynw init=vue

# react template
ynw init=react

# install and package
cnpm i
ynw build=app entry=app/index

Other

  • ynw v 版本号
  • ynw template=vue 下载模板
  • ynw cros : 打开跨域浏览器
  • ynw sprite : 制作雪碧图
  • ynw rename : 文件批量重命名
  • ynw doc : 文档

配置选项

  • 路径均为相对根目录
  • style/var.scss = scss 全局变量 (无需引入)
  • style/theme.json = antd 主题文件 (无需引入)
// ynw.config.js
module.exports = {
  gulp: { src: "", dist: "" }, // 雪碧图
  dll: { modules: { libs: ['vue','vuex',...] }, dist:"" }, // DLL
  common: {
    targets: { browsers: ["ie >= 11"] },
    createDev: true, // 是否每次创建 dev.html
    target: "web", //  [web, electron-main, electron-renderer]
    externals: {}, // 不打包的库如:{ vue:'Vue','react-dom':'ReactDOM' }
    devServer: {
      before,
      proxy: {
        "/my-dev": {
          target: "http://www.xxx.com",
          pathRewrite: { "^/my-dev": "" },
          changeOrigin: true,
        },
      },
    },
    port: 9999, // 热更新模式端口
    analyzer: false, // 打包报告
    alias: {
      "@store": "./app/store",
      "@script": "./app/script",
      "@comps": "./app/component",
      "@const": "./app/constant",
      "@hook": "./app/hook",
    },
    envPrefix: "",
    extractCSS: false, // 是否提取CSS
    splitModules: false, // 是否提取库文件
    cssModules: false, // CSS模块化
    dllPath: "", // 文件路径: 查找manifest文件
    themePath: "", // 主题路径: 公用主题配置
    dist: "", // 输出目录: 默认当前项目下 dist 文件夹
    copy: [], // 复制文件: { from ,to }
  },
  /****具体的配置项(覆盖通用项)****/
  pages: {
    // demo为项目文件夹的名称
    demo: {
      extractCSS: true,
    },
  },
};

Current Tags

  • 2.0.1-beta                                ...           beta (a year ago)
  • 2.3.5                                ...           latest (16 days ago)

89 Versions

  • 2.3.5                                ...           16 days ago
  • 2.3.4                                ...           2 months ago
  • 2.3.3                                ...           2 months ago
  • 2.3.2                                ...           2 months ago
  • 2.3.1                                ...           2 months ago
  • 2.3.0                                ...           2 months ago
  • 2.2.7                                ...           2 months ago
  • 2.2.6                                ...           5 months ago
  • 2.2.5                                ...           5 months ago
  • 2.2.4                                ...           6 months ago
  • 2.2.3                                ...           9 months ago
  • 2.2.0                                ...           9 months ago
  • 2.1.32                                ...           a year ago
  • 2.1.31                                ...           a year ago
  • 2.1.30                                ...           a year ago
  • 2.1.29                                ...           a year ago
  • 2.1.28                                ...           a year ago
  • 2.1.27                                ...           a year ago
  • 2.1.26                                ...           a year ago
  • 2.1.25                                ...           a year ago
  • 2.1.23                                ...           a year ago
  • 2.1.22                                ...           a year ago
  • 2.1.21                                ...           a year ago
  • 2.1.20                                ...           a year ago
  • 2.1.19                                ...           a year ago
  • 2.1.18                                ...           a year ago
  • 2.1.17                                ...           a year ago
  • 2.1.16                                ...           a year ago
  • 2.1.15                                ...           a year ago
  • 2.1.14                                ...           a year ago
  • 2.1.13                                ...           a year ago
  • 2.1.12                                ...           a year ago
  • 2.1.11                                ...           a year ago
  • 2.1.10                                ...           a year ago
  • 2.1.9                                ...           a year ago
  • 2.1.8                                ...           a year ago
  • 2.1.7                                ...           a year ago
  • 2.1.6                                ...           a year ago
  • 2.1.5                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.1-beta                                ...           a year ago
  • 2.0.0-bata                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.4.5                                ...           a year ago
  • 1.4.4                                ...           a year ago
  • 1.4.3                                ...           a year ago
  • 1.4.1                                ...           a year ago
  • 1.4.0                                ...           a year ago
  • 1.3.7                                ...           a year ago
  • 1.3.6                                ...           a year ago
  • 1.3.5                                ...           a year ago
  • 1.3.4                                ...           a year ago
  • 1.3.2                                ...           a year ago
  • 1.3.1                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.20                                ...           2 years ago
  • 1.0.19                                ...           2 years ago
  • 1.0.18                                ...           2 years ago
  • 1.0.17                                ...           2 years ago
  • 1.0.16                                ...           2 years ago
  • 1.0.15                                ...           2 years ago
  • 1.0.14                                ...           2 years ago
  • 1.0.13                                ...           2 years ago
  • 1.0.12                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.7                                ...           2 years ago
  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.0.10                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 23
Last Day 1
Last Week 5
Last Month 22
Dependencies (5)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |