【问题标题】:Ignore "node_modules" from deployment in Google App Engine Java Project从 Google App Engine Java 项目中的部署中忽略“node_modules”
【发布时间】:2014-05-07 06:19:42
【问题描述】:

Google App Engine java 项目使用node modules 用于构建前端的 grunt 任务。在我们运行grunt built 之后,它会给出要部署的dist 文件夹。

我们有以下文件夹结构

myproject
   src/
   war/
      app/
      dist/
      node_modules/
      Gruntfile.js
      WEB-INF/

我们不想部署node-modules 目录。我在appengine-web.xml中添加了关注

<static-files>
    <exclude path="/node_modules/*.*" />
</static-files>

但它不起作用。如何从部署中排除它们?

【问题讨论】:

    标签: java google-app-engine node-modules


    【解决方案1】:

    使用不带“.”的资源文件为我工作。

        <resource-files>
            <exclude path="/node_modules/**" />
        </resource-files>
    

    【讨论】:

      猜你喜欢
      • 2017-05-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-11
      • 2013-03-11
      • 2013-11-06
      • 2011-02-14
      • 2015-09-21
      • 2020-12-22
      相关资源
      最近更新 更多