【问题标题】:How to create a node package for angular 2?如何为 Angular 2 创建节点包?
【发布时间】:2017-02-20 21:38:44
【问题描述】:

我是 angular2 的新手。

我已经为 nodejs 创建了带有 javascript 的 npm 包。

目前我有兴趣为 angular 2 编写 npm 包,但我遇到的主要问题是 angular2 使用 typescript。

谁能解释一下 angular2 包是如何为节点构建的?

任何输入?

【问题讨论】:

    标签: node.js angular typescript node-modules


    【解决方案1】:

    您可以使用任何 Javascript 转换语言创建 NPM 包。您可以在 package.json 文件中指定运行应用程序所需的任务。例如:

    "scripts": {
        "start": "tsc && concurrently \"tsc:w\" \"lite-server\"",
        "lite": "lite-server",
        "postinstall": "typings install",
        "tsc": "tsc",
        "tsc:w": "tsc -w",
        "typings": "typings"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      • 2017-08-28
      • 2018-11-14
      相关资源
      最近更新 更多