New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jbz-oss-tool

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jbz-oss-tool

[ci-img]: https://travis-ci.org/cuppi/jbz-oss-tool.svg [ci]: https://travis-ci.org/cuppi/jbz-oss-tool # JBZ-OSS-TOOL [![Build Status][ci-img]][ci] jbz-oss-tool 是一个基于vue-cli2 或 3 的工具, 由金保证公司内部使用, 其主要任务为打包vue项目并将打包好的资源文件按照目录结构上传到阿里云并将项目内部引用路径同步修改。

  • 1.0.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

JBZ-OSS-TOOL Build Status

jbz-oss-tool 是一个基于vue-cli2 或 3 的工具, 由金保证公司内部使用, 其主要任务为打包vue项目并将打包好的资源文件按照目录结构上传到阿里云并将项目内部引用路径同步修改。

开始

第一件事当然是安装依赖,如果使用yarn:

yarn add jbz-oss-tool --dev

或者npm:

npm install jbz-oss-tool --save-dev

用法

配置

配置方法很简单. 你可以创建一个.jbz.oss.config.js文件在项目的根目录下,并且修改package.json如下所示:

{
  "scripts": {
    "smart-build-beta": "jbz-oss-build beta",
    "smart-build-pro": "jbz-oss-build pro"
  }
}

提示: beta参数及pro参数分别代表测试打包环境及生产打包环境,也是打包脚本需要处理的参数。

.jbz.oss.config.js

参数说明默认配置
regionoss区域-
accessKeyIdoss密钥id-
accessKeySecretoss密钥secret-
projectPath本地环境最外层目录path.resolve(__dirname, './')
buildToolPath打包js脚本路径-
buildToolScript打包js命令-
noReplacePathInIndex不进行入口html的路径修改false
vueCliVersion使用的vue版本2
betaBuildPath测试环境打包目标路径path.resolve(__dirname, './dist_beta')
betaIndexPath测试环境入口html路径path.resolve(betaBuildPath, './index.html')
proBuildPath生产环境打包目标路径path.resolve(__dirname, './dist_pro')
proIndexPath生产环境入口html路径path.resolve(proBuildPath, './index.html')
ossDirectoryoss上传路径基地址path.basename(projectPath) + '/'

注意: 该文件应该被git忽略,默认配置需要手动粘贴到配置文件中, 当buildToolPath及buildToolScript同时设置时将使用buildToolPath配置, 当时用vueCliVersion为3时将忽略buildToolPath及buildToolScript配置并使用vue-cli3提供的打包命令进行打包。

FAQs

Package last updated on 23 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc