Skip to content
This repository was archived by the owner on Aug 15, 2018. It is now read-only.

spm check #1159

Closed
popomore opened this issue Jan 16, 2015 · 12 comments
Closed

spm check #1159

popomore opened this issue Jan 16, 2015 · 12 comments

Comments

@popomore
Copy link
Member

提供一个工具可以校验包是否正确

@sorrycc
Copy link
Member

sorrycc commented Jan 16, 2015

检查啥? 想了想好想只有 package.json 的 name, version 和 spm 这些属性,代码层面的好像没什么硬性要求。

@popomore
Copy link
Member Author

比如 main 是不是存在,是否有 require 而没有配依赖的,跑个基线的测试用例是否成功 exports 了


通过 Mailbox 发送

On Fri, Jan 16, 2015 at 11:02 PM, chencheng (云谦) notifications@github.com
wrote:

检查啥? 想了想好想只有 package.json 的 name, version 和 spm 这些属性,代码层面的好像没什么硬性要求。

Reply to this email directly or view it on GitHub:
#1159 (comment)

@afc163
Copy link
Member

afc163 commented Jan 16, 2015

可以先作为独立的 bin 来提供,不要集成进来,感觉只是个非必需的辅助工具。

@popomore
Copy link
Member Author

是的

@popomore
Copy link
Member Author

不过对外部转进来的包很有用

@afc163
Copy link
Member

afc163 commented Jan 16, 2015

包括可以提前列出要 publish 的包的内容和大小,方便 ignore 。

@popomore
Copy link
Member Author

timoxley/pkgfiles#4

@hotoo
Copy link
Member

hotoo commented Jan 17, 2015

  • 项目开发时,一般使用 output 而不是 main 的。
  • 有 require 没有配置依赖好像 build 的时候自动会加(被加过 import-style),是不是可以像 Eclipse (自动 import)一样自动增加配置?
  • 应该反过来:检查有配置但是没有 require 的情况,甚至提供选项检查到没有 require 时自动删掉配置。

@sorrycc
Copy link
Member

sorrycc commented Jan 17, 2015

  • 只有 import-style 和 handlebars-runtime 会自动加
  • 没有 require 的包就算依赖了在构建时不会时也被包含进去,没啥影响的

@sorrycc
Copy link
Member

sorrycc commented Feb 5, 2015

案例:name 不符合规范。

http://spmjs.io/package/tipper
这个包的 name 大写,安装他之后 spm doc 就会出错。

@afc163
Copy link
Member

afc163 commented Feb 5, 2015

http://spmjs.io/package/jsuri

同上的问题。

@afc163
Copy link
Member

afc163 commented Feb 5, 2015

name publish 时的大小写校验的最好尽早搞掉。spmjs/spm-client#35 1154

@sorrycc sorrycc closed this as completed Jul 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants