-
Notifications
You must be signed in to change notification settings - Fork 4
refactor(parser) abstract parser #14
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
Conversation
Parser isn't suitable for this case, parse is a process, not a instance. Parse function will match a local file from a url, containing any other attribute like wrap, pkg and so on. The match will pass to many rules, break when matched, rule can be customize also Closes #11
Don't Merge |
|
改好了 |
7934b35 to
0add271
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib/util.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里优先使用 spm_modules 吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いいよ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
standalone 的逻辑还有点问题:
|
1. url should be string not object 2. get spm property from pkg.origin.spm 3. standalone should ignore that is not entry
|
已更新 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 id 被强制转成小写了? 比如 require('vendor/backbone.localStorage.js'),输出的是 define('vendor/backbone.localstorage.js', ...,导致匹配不上。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是不是这里有问题 https://github.com/spmjs/serve-spm/blob/0.6.0/lib/express.js#L33
那我先把 lowerCase 去掉
|
已改 |
refactor(parser) abstract parser
|
👍 |
Parser isn't suitable for this case, parse is a process, not a instance.
Parse function will match a local file from a url, containing any other attribute like wrap, pkg and so on.
The match will pass to many rules, break when matched, rule can be customize also
Closes #11