You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by imyzf <gi...@git.apache.org> on 2018/06/08 09:36:11 UTC

[GitHub] incubator-weex pull request #1254: [WEEX-445][jsfm] export requireModule to ...

GitHub user imyzf opened a pull request:

    https://github.com/apache/incubator-weex/pull/1254

    [WEEX-445][jsfm] export requireModule to global

    First of all, thank you for your contribution! 
    
    Please makes sure that these checkboxes are checked before submitting your PR, thank you!
    
    <!-- 
    How to use github markdown?
    ### checkable example
    - [x] checked
    - [ ] not checked
    More github Markdown info to see https://guides.github.com/features/mastering-markdown/
    -->
    
    CheckList:
    
    **if** *isBugFix* **:**
    
      * [ ] Make sure that you add at least one unit test for the bug which you had fixed.
    
    **elif** *isNewFeature* **:**
    
      * [ ] Update API docs for the component.
      * [ ] Update/Add demo to demonstrate new feature.
      * [ ] Update test scripts for the feature.
      * [ ] Add unit tests for the feature.
    
    This is a API for internal usage, so no test and no doc update.
    
    <!--
    (请在***提交***前删除这段描述)
    
    Notes: Weex will move into Apache Software Foundation (ASF) on Feb 24 2017.
    
    Our new GitHub repo is https://github.com/apache/incubator-weex
    
    After Feb 24 2017, we only accept pull requests from https://github.com/apache/incubator-weex
    
    Thank you for your support.
    
    ----
    
    注意:Weex 将于 2017-02-24 迁移至 Apache 基金会
    
    届时我们会使用新的 GitHub 仓库:https://github.com/apache/incubator-weex 并在那里继续接受大家的 pull request。
    
    更多详情请关注:https://github.com/weexteam/article/issues/130
    
    感谢理解和支持
    
    -->
    
    <!--
    (请在***提交***前删除这段描述)
    It's ***RECOMMENDED*** to submit typo fix, new demo, tiny bugfix and large feature to `master` branch.
        
    See [Branch Strategy](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management) for more detail.
    
    ----
    
    错别字修改、新 demo、较小的 bugfix、甚至较大的功能都可以直接提到 `master` 分支;
    
    查看完整的[分支策略 (英文)](https://github.com/alibaba/weex/blob/dev/CONTRIBUTING.md#branch-management)。
    
    -->


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/imyzf/incubator-weex feature/require-module

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/1254.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1254
    
----
commit 61931a0a8e9c26ee02aaeb8083c488191305ffa2
Author: Zhenfei You <he...@...>
Date:   2018-06-08T09:26:14Z

    [WEEX-445][jsfm] export requireModule to global

----


---

[GitHub] incubator-weex issue #1254: [WEEX-445][jsfm] export requireModule to global

Posted by weex-bot <gi...@git.apache.org>.
Github user weex-bot commented on the issue:

    https://github.com/apache/incubator-weex/pull/1254
  
    
    <!--
      0 failure: 
      1 warning:  No Changelog chan...
      1 messages
      
    -->
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Warnings</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:warning:</td>
          <td>No Changelog changes!</td>
        </tr>
      </tbody>
    </table>
    
    
    <table>
      <thead>
        <tr>
          <th width="50"></th>
          <th width="100%" data-danger-table="true">Messages</th>
        </tr>
      </thead>
      <tbody><tr>
          <td>:book:</td>
          <td>danger test finished.</td>
        </tr>
      </tbody>
    </table>
    
    
    <p align="right">
      Generated by :no_entry_sign: <a href="http://github.com/danger/danger-js/">dangerJS</a>
    </p>



---

[GitHub] incubator-weex pull request #1254: [WEEX-445][jsfm] export requireModule to ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-weex/pull/1254


---

[GitHub] incubator-weex pull request #1254: [WEEX-445][jsfm] export requireModule to ...

Posted by Hanks10100 <gi...@git.apache.org>.
Github user Hanks10100 commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/1254#discussion_r198207371
  
    --- Diff: runtime/api/init.js ---
    @@ -117,6 +117,7 @@ function createInstanceContext (id, options = {}, data) {
       Object.assign(runtimeContext, services, {
         weex,
         getJSFMVersion,
    +    requireModule: weex.requireModule,
    --- End diff --
    
    I think using `(..args) => weex.requireModule(...args)` is more reliable. We should not assume that the context of `requireModule` has bind to `weex` even if it actually does.


---

[GitHub] incubator-weex pull request #1254: [WEEX-445][jsfm] export requireModule to ...

Posted by imyzf <gi...@git.apache.org>.
Github user imyzf commented on a diff in the pull request:

    https://github.com/apache/incubator-weex/pull/1254#discussion_r198445526
  
    --- Diff: runtime/api/init.js ---
    @@ -117,6 +117,7 @@ function createInstanceContext (id, options = {}, data) {
       Object.assign(runtimeContext, services, {
         weex,
         getJSFMVersion,
    +    requireModule: weex.requireModule,
    --- End diff --
    
    done.


---