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

egg-vue-framework

v1.0.7

Published

egg与vue-cli组合共同构建项目

Downloads

8

Readme

egg-vue-framework

egg与vue-cli组合共同构建项目

Demo - 可以直接使用的后台样板项目

一个基于egg 和 vue-manage-system UI 搭建的 后台样板项目,可以直接克隆下来使用 https://github.com/u404/egg-vue-manage-system

QuickStart

  1. 使用创建egg项目
$ mkdir egg-example && cd egg-example
$ npm init egg --type=simple
$ npm i
  1. 安装egg-vue-framework框架,并配置
$ npm install egg-vue-framework
// package.json中
{
  ...
  "egg": {
    "framework": "egg-vue-framework"
  },
  ...
  "scripts": {
    // script 参考如下
    // 在本地运行npm run start 命令时,必须明确指定NODE_ENV 或 EGG_SERVER_ENV 为非local的值,另外,执行start前,必须先执行过build
    "start": "cross-env EGG_SERVER_ENV=prod && egg-scripts start --daemon --title=egg-server-test",
    "stop": "egg-scripts stop --title=egg-server-test",
    "dev": "egg-bin dev",
    // 添加build命令,用于构建vue代码
    "build": "node node_modules/egg-vue-framework/lib/build.js"
  }
}
  1. 集成vue项目目录
  • 目前只支持vue项目的默认的单页构建模式
  • 在项目目录/app中,创建web目录,可以直接拷贝已有的vue项目或在此目录下用vue-cli初始化vue应用
  • 将vue目录的babel.config.js 和 postcss.config.js 从web目录移到项目根目录,web目录中基本只保留vue.config.js 和eslintrc的配置文件
  • 在app/web目录中的vue.config.js中指定,publicPath: 'web/',另外,当前版本不支持手动配置:outputDir、assetsDir、indexPath、pages 这些对编译资源结构有较大影响的选项。
  1. 调试运行
npm run dev
// 项目启动端口为8001,本地调试运行另外会同时启动8002作为devServer服务器
  1. 部署项目
npm run build   // 在执行start命令前,必须先build
npm run start