Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- support typescript #118

Merged
merged 1 commit into from
Aug 1, 2018
Merged

- support typescript #118

merged 1 commit into from
Aug 1, 2018

Conversation

dasoncheng
Copy link
Contributor

add declaration file to support typescript

@yanyiwu
Copy link
Owner

yanyiwu commented Aug 1, 2018

package-lock.json也需要进git么?

@dasoncheng
Copy link
Contributor Author

规范是推荐放到git里面的,作用是保证与开发测试依赖相同。

  "dependencies": {
    "nan": "~2.10.0"
  },
  "devDependencies": {
    "coveralls": "~2.11.6",
    "istanbul": "~0.4.1",
    "mocha": "~2.4.5",
    "should": "~8.3.1",
    "typescript": "^3.0.1"
  },

以此为例,没有package-lock.json时,用户安装此包会根据依赖把dependencies下的包也安装一边,并根据版本号选择性升级,这在开发者严格按照版本规则迭代时是没有问题的,但是避免不了一些开发者乱发版本导致不兼容的升级,这个时候package-lock.json会严格版本依赖确保一致性

@yanyiwu yanyiwu merged commit e45aeb0 into yanyiwu:master Aug 1, 2018
@yanyiwu
Copy link
Owner

yanyiwu commented Aug 1, 2018

Thanks

@yanyiwu
Copy link
Owner

yanyiwu commented Aug 1, 2018

对typescript不太了解,这个merge后需要发新版才能让别人npm install使用么?

@yanyiwu
Copy link
Owner

yanyiwu commented Aug 1, 2018

@dasoncheng
Copy link
Contributor Author

需要发新版到npm上,关于报错推测是由于依赖安装时间过长或者失败导致的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants