基本vue.js上的dist文件夹 [英] dist folder on basic vue.js

查看:73
本文介绍了基本vue.js上的dist文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用Visual Studio 2019创建了一个基本的vue.js.我将其放在我的私有Azure服务器中的git上.我有一个Windows构建代理.

I created a basic vue.js with Visual studio 2019. I put it on a git in my private azure server. I have a windows build agent.

用于构建的yml,没有错误.

yml for building, no error.

trigger:
- master

pool: 'Default'

- script: |
    npm install
    npm run build
  displayName: 'npm install and build'

我尝试了一些复制/存档文件"命令.其中之一

I tried somes "copy/archive files" commands. One of them

- task: CopyFiles@2
  displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)/VuejsApp1'
  inputs:
    TargetFolder: '$(Build.ArtifactStagingDirectory)/VuejsApp1'

每种方法似乎都表明dist文件夹从未创建.

Every method seems to show that the dist folder is never created.

类似的问题:

## [部分]开始:npm安装和构建==============================================================================任务:命令行说明:运行命令行脚本在Linux和macOS上使用Bash,在Windows版本上使用cmd.exe:2.151.1作者:Microsoft Corporation帮助: https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/命令行=============================================================================生成脚本.==========================================================================================================================================## [命令]"C:\ windows \ system32 \ cmd.exe"/D/E:ON/V:OFF/S/C"CALL" C:\ DevOpsAgent_work_temp \ 2d81f910-5c00-4330-9d13-27c8c30aa7a0.cmd"

##[section]Starting: npm install and build ============================================================================== Task : Command line Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows Version : 2.151.1 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line ============================================================================== Generating script. ========================== Starting Command Output =========================== ##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\DevOpsAgent_work_temp\2d81f910-5c00-4330-9d13-27c8c30aa7a0.cmd""

yorkie@2.0.0安装C:\ DevOpsAgent_work \ 171 \ s \ node_modules \ yorkie节点bin/install.js

yorkie@2.0.0 install C:\DevOpsAgent_work\171\s\node_modules\yorkie node bin/install.js

检测到CI,跳过了Git钩子安装

CI detected, skipping Git hooks installation

core-js@2.6.11后安装C:\ DevOpsAgent_work \ 171 \ s \ node_modules \ core-js节点-e" try {require('./postinstall')} catch(e){}"

core-js@2.6.11 postinstall C:\DevOpsAgent_work\171\s\node_modules\core-js node -e "try{require('./postinstall')}catch(e){}"

感谢您使用core-js(‌https://github.com/zloirock/core-js ‌)polyfilling JavaScript标准库!‌

Thank you for using core-js (‌ https://github.com/zloirock/core-js ‌) for polyfilling JavaScript standard library!‌

该项目需要您的帮助!请考虑在以下方面支持core-js开放集体或Patreon:‌> ‌https://opencollective.com/core-js ‌> ‌https:// www.patreon.com /zloirock ‌

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: ‌ >‌ https://opencollective.com/core-js ‌ >‌ https://www.patreon.com/zloirock ‌

core-js(‌https://github.com/zloirock ‌)正在寻找一个好的工作-)‌

Also, the author of core-js (‌ https://github.com/zloirock ‌) is looking for a good job -)‌

ejs@2.7.4安装后C:\ DevOpsAgent_work \ 171 \ s \ node_modules \ ejs节点./postinstall.js

ejs@2.7.4 postinstall C:\DevOpsAgent_work\171\s\node_modules\ejs node ./postinstall.js

感谢您安装‌EJS‌:使用‌Jake‌ JavaScript版本构建的工具(‌https://jakejs.com/‌)‌

Thank you for installing ‌EJS‌: built with the ‌Jake‌ JavaScript build tool (‌https://jakejs.com/‌)‌

npm警告可选的跳过选择性依赖:fsevents@1.2.13(node_modules \ webpack-dev-server \ node_modules \ fsevents):npm警告notsup跳过可选依赖性:不支持的平台fsevents@1.2.13:通缉{"os":"darwin","arch":"any"}(当前:{"os":"win32","arch":"x64"})npm警告可选跳过选项依赖:fsevents@1.2.13(node_modules \ watchpack-chokidar2 \ node_modules \ fsevents):npm警告notsup跳过可选依赖性:不支持的平台fsevents@1.2.13:通缉{"os":"darwin","arch":"any"}(当前:{"os":"win32","arch":"x64"})npm警告可选跳过选项相关性:fsevents@2.1.3(node_modules \ fsevents):npm WARN notsup跳过可选的依赖关系:fsevents@2.1.3不受支持的平台:通缉{"os":"darwin","arch":"any"}(当前:{"os":"win32","arch":"x64"})

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\webpack-dev-server\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\watchpack-chokidar2\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

增加了来自822个贡献者的1488个软件包,并在其中审核了1492个软件包71.233秒

added 1488 packages from 822 contributors and audited 1492 packages in 71.233s

44个程序包正在寻找运行资金 npm fund 的详细信息

44 packages are looking for funding run npm fund for details

找到6个漏洞(低1,中3,高2)运行 npm审核修复进行修复,或 npm审核详细了解## [section]完成:npm安装和构建

found 6 vulnerabilities (1 low, 3 moderate, 2 high) run npm audit fix to fix them, or npm audit for details ##[section]Finishing: npm install and build

推荐答案

首先,您无需在相同的脚本"上进行安装和构建.

First, you need to NOT do install and build on the same "script".

- script: 'npm install'
  displayName: 'Install dependencies'

- script: 'npm run build'
  displayName: 'Build project'

之后,您将获得dist文件夹

after that, you can get the dist folder

- task: CopyFiles@2
  displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
  inputs:
    SourceFolder: '$(Build.SourcesDirectory)/dist'
    TargetFolder: '$(Build.ArtifactStagingDirectory)'

这篇关于基本vue.js上的dist文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆