node.js - NX : Copy one extra file to build directory

标签 node.js google-app-engine nrwl-nx nrwl

我有一个用 nx 构建的项目我正在将它部署到 Google App Engine。

它需要在同一文件夹中的 app.yaml

有没有办法告诉 nx builder 将该额外文件复制到其他所有文件旁边的构建目录中?

最佳答案

我猜你现在已经想通了,但如果有人还在寻找解决方案;

project.json 中,您可以为目标指定 Assets ,因此如果您需要 app.yaml,您可以这样做:

...
"targets": {
    "build": {
      "executor": "@nrwl/js:tsc",
      "outputs": ["{options.outputPath}"],
      "options": {
        "outputPath": "dist/apps/example",
        "main": "apps/example/src/index.ts",
        "tsConfig": "apps/example/tsconfig.app.json",
        "assets": [
          "apps/example/*.md",
          "apps/example/src/app.yaml" <-- specify your path here
        ]
      }
    }
...

关于node.js - NX : Copy one extra file to build directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71015454/

相关文章:

Javascript ES6,如果存在则从数组中删除项目的最佳方法,如果不存在则添加

javascript - JavaScript 代码中的 EJS 标签

python - 获取导入错误 : No module named control when following google cloud endpoint tutorial

nestjs - nrwl nx 命令为嵌套模块生成 lib

typescript - TypeORM OneToMany 导致 "ReferenceError: Cannot access ' <Entity >' before initialization"

node.js - 将 Node 检查器与多个 Node 进程一起使用

node.js - 未处理的拒绝 SequelizeConnectionError : password authentication failed for user "ankitj"

java - 在 GAE 上使用 Siena 时如何编写单元测试

mysql - 在应用程序引擎中通过 Node js 使用 Sequelize 连接 GCP Cloud Sql 时出错?