{"action":"created","issue":{"url":"https://api.github.com/repos/nimojs/gulp-book/issues/25","labels_url":"https://api.github.com/repos/nimojs/gulp-book/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/nimojs/gulp-book/issues/25/comments","events_url":"https://api.github.com/repos/nimojs/gulp-book/issues/25/events","html_url":"https://github.com/nimojs/gulp-book/issues/25","id":69710051,"number":25,"title":"使用 gulp 实现兼容 seajs 和 requirejs 的打包工具","user":{"login":"nimojs","id":3949015,"avatar_url":"https://avatars.githubusercontent.com/u/3949015?v=3","gravatar_id":"","url":"https://api.github.com/users/nimojs","html_url":"https://github.com/nimojs","followers_url":"https://api.github.com/users/nimojs/followers","following_url":"https://api.github.com/users/nimojs/following{/other_user}","gists_url":"https://api.github.com/users/nimojs/gists{/gist_id}","starred_url":"https://api.github.com/users/nimojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimojs/subscriptions","organizations_url":"https://api.github.com/users/nimojs/orgs","repos_url":"https://api.github.com/users/nimojs/repos","events_url":"https://api.github.com/users/nimojs/events{/privacy}","received_events_url":"https://api.github.com/users/nimojs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nimojs/gulp-book/labels/%E6%96%B0%E7%AB%A0%E8%8A%82%E8%AE%A1%E5%88%92","name":"新章节计划","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-21T00:20:16Z","updated_at":"2015-04-23T01:50:13Z","closed_at":"2015-04-22T20:25:24Z","body":"**基本思路：**\r\n\r\n```\r\ngulp.src('src/js/page/a.js')\r\n       .pipe(build())\r\n       .pipe(gulp.dest())\r\n```\r\n\r\n```\r\n// src/js/page/a.js\r\nseajs.use(['jquery',\r\n    'arale/tip/1.2.2/tip',\r\n    'rain/daterange/0.0.1/daterange',\r\n    'gallery/webuploader/0.1.5/webuploader',\r\n    'arale/validator/0.9.7/validator',\r\n    'arale/dialog/1.3.0/dialog'\r\n    ],\r\n    function (a,b,c,d) {\r\n// .. code  ... \r\n})\r\n```\r\n\r\n\r\n---- 以上代码会编译成 ------\r\n\r\n```\r\n// dist/js/page/a.js\r\n(function(){\r\ndefined('jquery/1.0.1/jquery')....\r\ndefined('arale/tip/1.2.2/tip')....\r\ndefined('arale/dialog/1.3.0/dialog')...\r\n// ... code ...\r\n\r\n})()\r\n```\r\n\r\n参考的 spm3 实时开发方式"},"comment":{"url":"https://api.github.com/repos/nimojs/gulp-book/issues/comments/95387077","html_url":"https://github.com/nimojs/gulp-book/issues/25#issuecomment-95387077","issue_url":"https://api.github.com/repos/nimojs/gulp-book/issues/25","id":95387077,"user":{"login":"nimojs","id":3949015,"avatar_url":"https://avatars.githubusercontent.com/u/3949015?v=3","gravatar_id":"","url":"https://api.github.com/users/nimojs","html_url":"https://github.com/nimojs","followers_url":"https://api.github.com/users/nimojs/followers","following_url":"https://api.github.com/users/nimojs/following{/other_user}","gists_url":"https://api.github.com/users/nimojs/gists{/gist_id}","starred_url":"https://api.github.com/users/nimojs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nimojs/subscriptions","organizations_url":"https://api.github.com/users/nimojs/orgs","repos_url":"https://api.github.com/users/nimojs/repos","events_url":"https://api.github.com/users/nimojs/events{/privacy}","received_events_url":"https://api.github.com/users/nimojs/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T01:50:13Z","updated_at":"2015-04-23T01:50:13Z","body":"@lichunqiang  \r\nspm 教程就是你 star 过的这个项目 https://github.com/spmjs/docs\r\n\r\n使用spmjs.io 已有的模块进行开发时非常方便，方便程度与用 npm 差不多了。\r\n\r\n如果 spmjs.io 没有某些模块需要自己 spm publish \r\n\r\n-----\r\n\r\n我们团队目前对于模块化开发的解决方案是：\r\n不特别在意 HTTP请求数的使用 服务器在线 combo [请参考这个项目](https://github.com/nimojs/seajs-cmd)\r\n在意 HTTP请求数的使用 spmv3.6 本地打包\r\n"}}