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

vue-cli-plugin-jzy

v0.0.8

Published

jzy 内部项目模版插件

Downloads

21

Readme

VUE-CLI custom preset

preset.json: 包含 preset 数据的主要文件(必需)。
index.js: 一个可以注入或是修改项目中文件的 Generator。
prompts.js 一个可以通过命令行对话为 generator 收集选项的 prompts 文件。
template: 模板文件,里面的文件会直接被拷贝到项目中(其中有使用 ejs 模板引擎)

公共配置

1.自定添加git hooks 配置;
2.项目生产环境部署子路径配置:
  • 自动修改vue.config.js中 publicPath配置;
3.微前端路径配置;
  • 自动修改vue-router base 路径和set-public-path.js;
  • 自动修改vue.config.js 文件配置;
  • 自定添加子应依赖配置;
4.免去配置webpack,自动添加webpack 标准打包配置,包括:
  • 混淆配置;

  • 压缩配置(gzip、br);

  • 文件内容压缩配置(删除空白内容);

  • 生成依赖统计信息;

5.添加normalize.css;
6.自动添加 vue-cli 3.*环境配置文件:
  • .env.development
  • .env.production
  • .env.test
7.src/config 下添加 api.js 和 oauth.js 文件
  • api.js 为接口配置文件
  • oauth.js 为路由守卫逻辑配置文件(包括nprogress);
8.添加common.css 用于重置css 变量;
9.添加 src/utils/storageUtil.js 文件(localstorage 加密);
10.添加 vuex-persistedstate 用户持久化vuex 内存缓存;
11.添加网络请求库(web fetch api)
@jzy/request-client": "^0.0.4",
// 如果自研库不稳定可使用阿里 umijs 团队的库;
// https://github.com/umijs/umi-request
// "umi-request": "^1.3.4"
12.修改生成环境打包配置为modern 模式;
13. web-mobile 类型项目viewport 配置

13.其他配置文件

  • browserslistrc
  • 。。。

ToC

自动添加 Nut-UI 组件库(依赖+按需引入配置插件);

使用viewport (vw、vh 的等单位进行适配);

ToB

自动添加ant-design-vue 组件库(依赖+按需引入配置插件)

TODO-LIST

1.文件修改防重处理;
2. "web-mobile" 类型可选择添加 rem 配置信息;
3. vue filter ;
4. 项目模板文件;
5. lint 、prettier 规则配置;

开发环境

vue create local-demo
cd local-demo
npm install --save-dev file:D:\project\jzy\js\components\vue-cli-preset
vue invoke vue-cli-plugin-jzy

生产环境

vue add jzy

注意事项

1.仅能使用npm 安装依赖!!! 项目根目录下不能存在yarn.lock 文件!!! 否则无法正常安装依赖; 2.添加并运行插件前,请提交代码;