1 Star 0 Fork 1

Gitee 前端组 / gitee-vue-repo-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

gitee-vue-repo-template

gitee-release-cli

介绍

码云 Vue 仓库模板。

目录

安装

npm install --save 此项目的名称

使用以下模板新建 haml 页面:

- title '页面标题'

<!-- 引入样式文件 -->
= page_specific_style_bundle_tag '此项目的名称'

<!-- 页面代码 -->
.ui.container
    %p
        Hello, Gitee!

= page_specific_javascript_bundle_tag '此项目的名称.chunk-vendors'
= page_specific_javascript_bundle_tag '此项目的名称'

修改主仓库中的 webpack.config.js 文件,追加如下配置:

  plugins: [
    new StatsPlugin(
      'manifest.json',
      {
        chunkModules: false,
        source: false,
        chunks: false,
        modules: false,
        assets: true,
        otherPath: [
          dllConfig.manifest,
+         path.join(rootPath, 'node_modules/此项目的名称/dist/manifest.json'),
          path.join(webpacksSrcPath, 'webide/public/webpacks/manifest.json'),
          ...projects.map(project => `build/${project}-manifest.json`)
        ]
      }
    ),
    new CopyWebpackPlugin([
      ...dllConfig.copyConfig,
+     {
+       from: path.resolve(rootPath, 'node_modules/此项目的名称/dist'),
+       to: path.resolve(outputPath, '此项目的名称')
+     },
      {
        from: path.resolve(rootPath, 'node_modules/gitee-guide-helper/static'),
        to: outputPath
      },
      {
        from: path.resolve(webpacksSrcPath, 'webide/public/webpacks/webide'),
        to: path.resolve(outputPath, 'webide'),
        ignore: ['.*']
      }
    ]),
    new CompressionPlugin()
  ]

开发

# 安装依赖
npm install

# 链接当前目录到全局
npm link

# 构建开发版资源
npm run dev

# 进入主仓库目录
cd /path/to/主仓库

# 在主仓库中链接此目录
npm link 此项目的名称

# 构建开发版资源
npm run dev:main

发布

先决条件:

  • 已在 npmjs.org 上注册了账号
  • 账号已经加入 gitee 组织,且有权限管理此项目
  • 已用 npm login 命令登录了这个账号
  • 测试无问题

之后在命令行中运行:

# 创建 beta 预发行版
npm run release-beta

# 发布测试版
npm publish --tag=beta

# 创建正式发行版
npm run release

# 发布正式版
npm publish

主仓库:

# 安装刚刚发布的测试版
npm install 此项目的名称@beta

# 或者安装最新正式版
npm install 此项目的名称@latest

自定义配置

参考 Configuration Reference.

空文件

简介

取消

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/gitee-frontend/gitee-vue-repo-template.git
git@gitee.com:gitee-frontend/gitee-vue-repo-template.git
gitee-frontend
gitee-vue-repo-template
gitee-vue-repo-template
master

搜索帮助