# gitee-vue-repo-template **Repository Path**: No_C/gitee-vue-repo-template ## Basic Information - **Project Name**: gitee-vue-repo-template - **Description**: vue 仓库模板 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2023-04-11 - **Last Updated**: 2023-04-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gitee-vue-repo-template [![gitee-release-cli](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-gitee--release-blueviolet.svg)](https://gitee.com/gitee-frontend/gitee-reelase-cli/blob/master/LICENSE) ## 介绍 码云 Vue 仓库模板。 ## 目录 - [gitee-vue-repo-template](#gitee-vue-repo-template) - [介绍](#介绍) - [目录](#目录) - [安装](#安装) - [开发](#开发) - [发布](#发布) - [自定义配置](#自定义配置) ## 安装 ```bash npm install --save 此项目的名称 ``` 使用以下模板新建 haml 页面: ```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 文件,追加如下配置: ```diff 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() ] ``` ## 开发 ```bash # 安装依赖 npm install # 链接当前目录到全局 npm link # 构建开发版资源 npm run dev # 进入主仓库目录 cd /path/to/主仓库 # 在主仓库中链接此目录 npm link 此项目的名称 # 构建开发版资源 npm run dev:main ``` ## 发布 先决条件: - 已在 [npmjs.org](http://npmjs.org/) 上注册了账号 - 账号已经加入 gitee 组织,且有权限管理此项目 - 已用 `npm login` 命令登录了这个账号 - 测试无问题 之后在命令行中运行: ``` bash # 创建 beta 预发行版 npm run release-beta # 发布测试版 npm publish --tag=beta # 创建正式发行版 npm run release # 发布正式版 npm publish ``` 主仓库: ```bash # 安装刚刚发布的测试版 npm install 此项目的名称@beta # 或者安装最新正式版 npm install 此项目的名称@latest ``` ## 自定义配置 参考 [Configuration Reference](https://cli.vuejs.org/config/).