【发布时间】:2016-09-28 03:03:34
【问题描述】:
我有一个要在 npm 上发布的指令。我读了the doc here,然后我做了以下事情:
- 复制从 .ts 文件编译的 .js 文件。 (我没有复制地图文件)
- 在桌面上新建文件夹并粘贴到那里
-
npm init和npm publish - 创建新项目和
npm install --save-dev我发布的包
但是当我试图在模块中声明它时它没有找到指令的名称
@NgModule({
declarations: [
AppComponent,
MyDirective //this is not found
],
js文件出现在模块文件夹中
【问题讨论】: