diff --git a/vendor/github.com/b3log/wide/Dockerfile b/vendor/github.com/b3log/wide/Dockerfile new file mode 100644 index 0000000..7487fa8 --- /dev/null +++ b/vendor/github.com/b3log/wide/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:latest +MAINTAINER Liang Ding + +ENV GOROOT /usr/local/go + +RUN apt-get update && apt-get install bzip2 zip unzip && cp -r /usr/local/go /usr/local/gobt +ENV GOROOT_BOOTSTRAP=/usr/local/gobt + +ADD . /wide/gogogo/src/github.com/b3log/wide + +RUN useradd wide && useradd runner + +ENV GOPATH /wide/gogogo + +RUN go build github.com/go-fsnotify/fsnotify\ + && go build github.com/gorilla/sessions\ + && go build github.com/gorilla/websocket\ + && go install github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports + +WORKDIR /wide/gogogo/src/github.com/b3log/wide +RUN go build -v + +EXPOSE 7070 diff --git a/vendor/github.com/b3log/wide/LICENSE b/vendor/github.com/b3log/wide/LICENSE new file mode 100644 index 0000000..b447376 --- /dev/null +++ b/vendor/github.com/b3log/wide/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/b3log/wide/README.md b/vendor/github.com/b3log/wide/README.md new file mode 100644 index 0000000..fb2e572 --- /dev/null +++ b/vendor/github.com/b3log/wide/README.md @@ -0,0 +1,180 @@ +# [Wide](https://github.com/b3log/wide) [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Go Report Card](https://goreportcard.com/badge/github.com/b3log/wide)](https://goreportcard.com/report/github.com/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](https://img.shields.io/badge/license-apache2-orange.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/b3log/wide) [![Download](https://img.shields.io/badge/download-~4.3K-red.svg?style=flat)](https://pan.baidu.com/s/1dD3XwOT) + +_Have a [try](https://wide.b3log.org/signup) first, then [download](https://pan.baidu.com/s/1dD3XwOT) and setup it on your local area network, enjoy yourself!_ + +先试试我们搭建好的[在线服务](https://wide.b3log.org/signup),你可以在这里[下载](https://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧! + +> * 关于 Wide 的产品定位,请看[这里](https://hacpai.com/article/1438407961481),并欢迎参与讨论~ +> * 加入[**黑客派**](https://hacpai.com/register),与其他程序员、设计师共同成长! + +## Introduction + +A Web-based IDE for Teams using Go programming language/Golang. + +![Hello, 世界](https://cloud.githubusercontent.com/assets/873584/4606377/d0ca3c2a-521b-11e4-912c-d955ab05850b.png) + +## Authors + +[Daniel](https://github.com/88250) and [Vanessa](https://github.com/Vanessa219) are the main authors of Wide, [here](https://github.com/b3log/wide/graphs/contributors) are all contributors. + +Wide 的主要作者是 [Daniel](https://github.com/88250) 与 [Vanessa](https://github.com/Vanessa219),所有贡献者可以在[这里](https://github.com/b3log/wide/graphs/contributors)看到。 + +## Motivation + +* **Team** IDE: + * _Safe and reliable_: the project source code stored on the server in real time, the developer's machine crashes without losing any source code + * _Unified environment_: server unified development environment configuration, the developer machine without any additional configuration + * _Out of the box_: 5 minutes to setup a server then open browser to develop, debug + * _Version Control_: each developer has its own source code repository, easy sync with the trunk +* **Web-based** IDE: + * Developer needs a browser only + * Cross-platform, even on mobile devices + * Easy to extend + * Easy to integrate with other systems + * For the geeks +* A try for commercial-open source: versions customized for enterprises, close to their development work flows respectively +* Currently more popular Go IDE has some defects or regrets: + * Text editor (vim/emacs/sublime/Atom, etc.): For the Go newbie is too complex + * Plug-in (goclipse, etc.): the need for the original IDE support, not professional + * LiteIDE: no modern user interface :p + * No team development experience +* There are a few of GO IDEs, and no one developed by Go itself, this is a nice try + +## Features + +* [X] Code Highlight, Folding: Go/HTML/JavaScript/Markdown etc. +* [X] Autocomplete: Go/HTML etc. +* [X] Format: Go/HTML/JSON etc. +* [X] Build & Run +* [X] Multiplayer: a real team development experience +* [X] Navigation, Jump to declaration, Find usages, File search etc. +* [X] Shell: run command on the server +* [X] Web development: HTML/JS/CSS editor with [Emmet](https://emmet.io) integrated +* [X] Go tool: go get/install/fmt etc. +* [X] File Import & Export +* [X] Themes: editor and UI adjust, respectively +* [X] Cross-Compilation +* [ ] Debug +* [ ] Git integration: git command on the web + +## Screenshots + +* **Overview** + + ![Overview](https://cloud.githubusercontent.com/assets/873584/5450620/1d51831e-8543-11e4-930b-670871902425.png) +* **Goto File** + + ![Goto File](https://cloud.githubusercontent.com/assets/873584/5450616/1d495da6-8543-11e4-9285-f9d9c60779ac.png) +* **Autocomplete** + + ![Autocomplete](https://cloud.githubusercontent.com/assets/873584/5450619/1d4d5712-8543-11e4-8fe4-35dbc8348a6e.png) +* **Theme** + + ![4](https://cloud.githubusercontent.com/assets/873584/5450617/1d4c0826-8543-11e4-8b86-f79a4e41550a.png) +* **Show Expression Info** + + ![Show Expression Info](https://cloud.githubusercontent.com/assets/873584/5450618/1d4cd9f4-8543-11e4-950f-121bd3ff4a39.png) +* **Build Error Info** + + ![Build Error Info](https://cloud.githubusercontent.com/assets/873584/5450632/3e51cccc-8543-11e4-8ca8-8d2427aa16b8.png) +* **Git Clone** + + ![Git Clone](https://cloud.githubusercontent.com/assets/873584/6545235/2284f230-c5b7-11e4-985e-7e04367921b1.png) +* **Cross-Compilation** + + ![Cross-Compilation](https://cloud.githubusercontent.com/assets/873584/10130037/226d75fc-65f7-11e5-94e4-25ee579ca175.png) + +* **Playground** + ![Playground](https://cloud.githubusercontent.com/assets/873584/21209772/449ecfd2-c2b1-11e6-9aa6-a83477d9f269.gif) + +## Architecture + +### Build & Run + +![Build & Run](https://cloud.githubusercontent.com/assets/873584/4389219/3642bc62-43f3-11e4-8d1f-06d7aaf22784.png) + + * A browser tab corresponds to a Wide session + * Execution output push via WebSocket + +Flow: + 1. Browser sends ````Build```` request + 2. Server executes ````go build```` command via ````os/exec````
+ 2.1. Generates a executable file + 3. Browser sends ````Run```` request + 4. Server executes the file via ````os/exec````
+ 4.1. A running process
+ 4.2. Execution output push via WebSocket channel + 5. Browser renders with callback function ````ws.onmessage```` + +### Code Assist + +![Code Assist](https://cloud.githubusercontent.com/assets/873584/4399135/3b80c21c-4463-11e4-8e94-7f7e8d12a4df.png) + + * Autocompletion + * Find Usages/Jump To Declaration/etc. + +Flow: + 1. Browser sends code assist request + 2. Handler gets user workspace of the request with HTTP session + 3. Server executes ````gocode````/````ide_stub(gotools)````
+ 3.1 Sets environment variables (e.g. ${GOPATH})
+ 3.2 ````gocode```` with ````lib-path```` parameter + +## Documents + +* [用户指南](https://www.gitbook.com/book/88250/wide-user-guide) +* [开发指南](https://www.gitbook.com/book/88250/wide-dev-guide) + +## Setup + +### Download Binary + +We have provided OS-specific executable binary as follows: + +* linux-amd64/386 +* windows-amd64/386 +* darwin-amd64/386 + +Download [HERE](https://pan.baidu.com/s/1dD3XwOT)! + +### Build Wide for yourself + +1. [Download](https://github.com/b3log/wide/archive/master.zip) source or by `git clone https://github.com/b3log/wide` +2. Get dependencies with + * `go get` + * `go get github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports` +3. Compile wide with `go build` + +### Docker + +1. Get image: `sudo docker pull 88250/wide:latest` +2. Run: `sudo docker run -p 127.0.0.1:7070:7070 88250/wide:latest ./wide -docker=true -channel=ws://127.0.0.1:7070` +3. Open browser: http://127.0.0.1:7070 + +## Known Issues + +* [Shell is not available on Windows](https://github.com/b3log/wide/issues/32) +* [Rename directory](https://github.com/b3log/wide/issues/251) + +## Terms + +* This software is open sourced under the Apache License 2.0 +* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any page, even which you made +* If you want to use this software for commercial purpose, please mail to support@liuyun.io for a commercial license request +* Copyright © b3log.org, all rights reserved + +## Credits + +Wide is made possible by the following open source projects. + +* [golang](https://golang.org) +* [CodeMirror](https://github.com/marijnh/CodeMirror) +* [zTree](https://github.com/zTree/zTree_v3) +* [LiteIDE](https://github.com/visualfc/liteide) +* [gocode](https://github.com/nsf/gocode) +* [Gorilla](https://github.com/gorilla) +* [Docker](https://docker.com) + +---- + + diff --git a/vendor/github.com/b3log/wide/TERMS.md b/vendor/github.com/b3log/wide/TERMS.md new file mode 100644 index 0000000..0fdd02a --- /dev/null +++ b/vendor/github.com/b3log/wide/TERMS.md @@ -0,0 +1,4 @@ +* This software is open sourced under the Apache License 2.0 +* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any pages, even the pages are developed by you +* If you want to use this software for commercial purpose, please mail to support@liuyun.io for request a commercial license +* Copyright (c) b3log.org, all rights reserved diff --git a/vendor/github.com/b3log/wide/coverage.sh b/vendor/github.com/b3log/wide/coverage.sh new file mode 100644 index 0000000..378fe42 --- /dev/null +++ b/vendor/github.com/b3log/wide/coverage.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# see https://gist.github.com/hailiang/0f22736320abe6be71ce for more details + +set -e + +# Run test coverage on each subdirectories and merge the coverage profile. + +echo "mode: count" > profile.cov + +# Standard go tooling behavior is to ignore dirs with leading underscors +for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d); +do +if ls $dir/*.go &> /dev/null; then + go test -covermode=count -coverprofile=$dir/profile.tmp $dir + if [ -f $dir/profile.tmp ] + then + cat $dir/profile.tmp | tail -n +2 >> profile.cov + rm $dir/profile.tmp + fi +fi +done + +go tool cover -func profile.cov + diff --git a/vendor/github.com/b3log/wide/gulpfile.js b/vendor/github.com/b3log/wide/gulpfile.js new file mode 100644 index 0000000..7902f7c --- /dev/null +++ b/vendor/github.com/b3log/wide/gulpfile.js @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2014-2015, b3log.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file frontend tool. + * + * @author Liyuan Li + * @version 0.1.0.0, Dec 15, 2015 + */ +var gulp = require("gulp"); +var concat = require('gulp-concat'); +var minifyCSS = require('gulp-minify-css'); +var uglify = require('gulp-uglify'); +var sourcemaps = require("gulp-sourcemaps"); + +gulp.task('cc', function () { + // css + var cssLibs = ['./static/js/lib/jquery-layout/layout-default-latest.css', + './static/js/lib/codemirror-5.1/codemirror.css', + './static/js/lib/codemirror-5.1/addon/hint/show-hint.css', + './static/js/lib/codemirror-5.1/addon/lint/lint.css', + './static/js/lib/codemirror-5.1/addon/fold/foldgutter.css', + './static/js/lib/codemirror-5.1/addon/dialog/dialog.css', + './static/js/overwrite/codemirror/theme/*.css']; + gulp.src(cssLibs) + .pipe(minifyCSS()) + .pipe(concat('lib.min.css')) + .pipe(gulp.dest('./static/css/')); + + gulp.src('./static/js/lib/ztree/zTreeStyle.css') + .pipe(minifyCSS()) + .pipe(concat('zTreeStyle.min.css')) + .pipe(gulp.dest('./static/js/lib/ztree/')); + + var cssWide = ['./static/css/dialog.css', + './static/css/base.css', + './static/css/wide.css', + './static/css/side.css', + './static/css/start.css', + './static/css/about.css' + ]; + + gulp.src(cssWide) + .pipe(minifyCSS()) + .pipe(concat('wide.min.css')) + .pipe(gulp.dest('./static/css/')); + + + // js + var jsLibs = ['./static/js/lib/jquery-2.1.1.min.js', + './static/js/lib/jquery-ui.min.js', + './static/js/lib/jquery-layout/jquery.layout-latest.js', + './static/js/lib/reconnecting-websocket.js', + './static/js/lib/Autolinker.min.js', + './static/js/lib/emmet.js', + './static/js/lib/js-beautify-1.5.4/beautify.js', + './static/js/lib/js-beautify-1.5.4/beautify-html.js', + './static/js/lib/js-beautify-1.5.4/beautify-css.js', + './static/js/lib/jquery-file-upload-9.8.0/vendor/jquery.ui.widget.js', + './static/js/lib/jquery-file-upload-9.8.0/jquery.iframe-transport.js', + './static/js/lib/jquery-file-upload-9.8.0/jquery.fileupload.js', + './static/js/lib/codemirror-5.1/codemirror.min.js', + './static/js/lib/codemirror-5.1/addon/lint/lint.js', + './static/js/lib/codemirror-5.1/addon/lint/json-lint.js', + './static/js/lib/codemirror-5.1/addon/selection/active-line.js', + './static/js/lib/codemirror-5.1/addon/selection/active-line.js', + './static/js/overwrite/codemirror/addon/hint/show-hint.js', + './static/js/lib/codemirror-5.1/addon/hint/anyword-hint.js', + './static/js/lib/codemirror-5.1/addon/display/rulers.js', + './static/js/lib/codemirror-5.1/addon/edit/closebrackets.js', + './static/js/lib/codemirror-5.1/addon/edit/matchbrackets.js', + './static/js/lib/codemirror-5.1/addon/edit/closetag.js', + './static/js/lib/codemirror-5.1/addon/search/searchcursor.js', + './static/js/lib/codemirror-5.1/addon/search/search.js', + './static/js/lib/codemirror-5.1/addon/dialog/dialog.js', + './static/js/lib/codemirror-5.1/addon/search/match-highlighter.js', + './static/js/lib/codemirror-5.1/addon/fold/foldcode.js', + './static/js/lib/codemirror-5.1/addon/fold/foldgutter.js', + './static/js/lib/codemirror-5.1/addon/fold/brace-fold.js', + './static/js/lib/codemirror-5.1/addon/fold/xml-fold.js', + './static/js/lib/codemirror-5.1/addon/fold/markdown-fold.js', + './static/js/lib/codemirror-5.1/addon/fold/comment-fold.js', + './static/js/lib/codemirror-5.1/addon/fold/mode/loadmode.js', + './static/js/lib/codemirror-5.1/addon/fold/comment/comment.js', + './static/js/lib/codemirror-5.1/mode/meta.js', + './static/js/lib/codemirror-5.1/mode/go/go.js', + './static/js/lib/codemirror-5.1/mode/clike/clike.js', + './static/js/lib/codemirror-5.1/mode/xml/xml.js', + './static/js/lib/codemirror-5.1/mode/htmlmixed/htmlmixed.js', + './static/js/lib/codemirror-5.1/mode/javascript/javascript.js', + './static/js/lib/codemirror-5.1/mode/markdown/markdown.js', + './static/js/lib/codemirror-5.1/mode/css/css.js', + './static/js/lib/codemirror-5.1/mode/shell/shell.js', + './static/js/lib/codemirror-5.1/mode/sql/sql.js', + './static/js/lib/codemirror-5.1/keymap/vim.js', + './static/js/lib/lint/json-lint.js', + './static/js/lib/lint/go-lint.js']; + gulp.src(jsLibs) + .pipe(uglify()) + .pipe(concat('lib.min.js')) + .pipe(gulp.dest('./static/js/')); + + var jsWide = ['./static/js/tabs.js', + './static/js/tabs.js', + './static/js/dialog.js', + './static/js/editors.js', + './static/js/notification.js', + './static/js/tree.js', + './static/js/wide.js', + './static/js/session.js', + './static/js/menu.js', + './static/js/windows.js', + './static/js/hotkeys.js', + './static/js/bottomGroup.js' + ]; + gulp.src(jsWide) + .pipe(sourcemaps.init()) + .pipe(uglify()) + .pipe(concat('wide.min.js')) + .pipe(sourcemaps.write(".")) + .pipe(gulp.dest('./static/js/')); +}); \ No newline at end of file diff --git a/vendor/github.com/b3log/wide/header.exe b/vendor/github.com/b3log/wide/header.exe new file mode 100644 index 0000000..3d725bb Binary files /dev/null and b/vendor/github.com/b3log/wide/header.exe differ diff --git a/vendor/github.com/b3log/wide/main.go b/vendor/github.com/b3log/wide/main.go new file mode 100644 index 0000000..3030030 --- /dev/null +++ b/vendor/github.com/b3log/wide/main.go @@ -0,0 +1,483 @@ +// Copyright (c) 2014-2018, b3log.org & hacpai.com +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "compress/gzip" + "flag" + "html/template" + "io" + "mime" + "net/http" + _ "net/http/pprof" + "os" + "os/signal" + "runtime" + "strings" + "syscall" + "time" + + "github.com/b3log/wide/conf" + "github.com/b3log/wide/editor" + "github.com/b3log/wide/event" + "github.com/b3log/wide/file" + "github.com/b3log/wide/i18n" + "github.com/b3log/wide/log" + "github.com/b3log/wide/notification" + "github.com/b3log/wide/output" + "github.com/b3log/wide/playground" + "github.com/b3log/wide/scm/git" + "github.com/b3log/wide/session" + "github.com/b3log/wide/util" +) + +// Logger +var logger *log.Logger + +// The only one init function in Wide. +func init() { + confPath := flag.String("conf", "conf/wide.json", "path of wide.json") + confIP := flag.String("ip", "", "this will overwrite Wide.IP if specified") + confPort := flag.String("port", "", "this will overwrite Wide.Port if specified") + confServer := flag.String("server", "", "this will overwrite Wide.Server if specified") + confLogLevel := flag.String("log_level", "", "this will overwrite Wide.LogLevel if specified") + confStaticServer := flag.String("static_server", "", "this will overwrite Wide.StaticServer if specified") + confContext := flag.String("context", "", "this will overwrite Wide.Context if specified") + confChannel := flag.String("channel", "", "this will overwrite Wide.Channel if specified") + confStat := flag.Bool("stat", false, "whether report statistics periodically") + confDocker := flag.Bool("docker", false, "whether run in a docker container") + confPlayground := flag.String("playground", "", "this will overwrite Wide.Playground if specified") + confUsersWorkspaces := flag.String("users_workspaces", "", "this will overwrite Wide.UsersWorkspaces if specified") + + flag.Parse() + + log.SetLevel("warn") + logger = log.NewLogger(os.Stdout) + + wd := util.OS.Pwd() + if strings.HasPrefix(wd, os.TempDir()) { + logger.Error("Don't run Wide in OS' temp directory or with `go run`") + + os.Exit(-1) + } + + i18n.Load() + event.Load() + conf.Load(*confPath, *confIP, *confPort, *confServer, *confLogLevel, *confStaticServer, *confContext, *confChannel, + *confPlayground, *confDocker, *confUsersWorkspaces) + + conf.FixedTimeCheckEnv() + session.FixedTimeSave() + session.FixedTimeRelease() + + if *confStat { + session.FixedTimeReport() + } + + logger.Debug("host ["+runtime.Version()+", "+runtime.GOOS+"_"+runtime.GOARCH+"], cross-compilation ", + util.Go.GetCrossPlatforms()) +} + +// Main. +func main() { + runtime.GOMAXPROCS(conf.Wide.MaxProcs) + + initMime() + handleSignal() + + // IDE + http.HandleFunc(conf.Wide.Context+"/", handlerGzWrapper(indexHandler)) + http.HandleFunc(conf.Wide.Context+"/start", handlerWrapper(startHandler)) + http.HandleFunc(conf.Wide.Context+"/about", handlerWrapper(aboutHandler)) + http.HandleFunc(conf.Wide.Context+"/keyboard_shortcuts", handlerWrapper(keyboardShortcutsHandler)) + + // static resources + http.Handle(conf.Wide.Context+"/static/", http.StripPrefix(conf.Wide.Context+"/static/", http.FileServer(http.Dir("static")))) + serveSingle("/favicon.ico", "./static/favicon.ico") + + // workspaces + for _, user := range conf.Users { + http.Handle(conf.Wide.Context+"/workspace/"+user.Name+"/", + http.StripPrefix(conf.Wide.Context+"/workspace/"+user.Name+"/", http.FileServer(http.Dir(user.WorkspacePath())))) + } + + // session + http.HandleFunc(conf.Wide.Context+"/session/ws", handlerWrapper(session.WSHandler)) + http.HandleFunc(conf.Wide.Context+"/session/save", handlerWrapper(session.SaveContentHandler)) + + // run + http.HandleFunc(conf.Wide.Context+"/build", handlerWrapper(output.BuildHandler)) + http.HandleFunc(conf.Wide.Context+"/run", handlerWrapper(output.RunHandler)) + http.HandleFunc(conf.Wide.Context+"/stop", handlerWrapper(output.StopHandler)) + http.HandleFunc(conf.Wide.Context+"/go/test", handlerWrapper(output.GoTestHandler)) + http.HandleFunc(conf.Wide.Context+"/go/vet", handlerWrapper(output.GoVetHandler)) + http.HandleFunc(conf.Wide.Context+"/go/get", handlerWrapper(output.GoGetHandler)) + http.HandleFunc(conf.Wide.Context+"/go/install", handlerWrapper(output.GoInstallHandler)) + http.HandleFunc(conf.Wide.Context+"/output/ws", handlerWrapper(output.WSHandler)) + + // cross-compilation + http.HandleFunc(conf.Wide.Context+"/cross", handlerWrapper(output.CrossCompilationHandler)) + + // file tree + http.HandleFunc(conf.Wide.Context+"/files", handlerWrapper(file.GetFilesHandler)) + http.HandleFunc(conf.Wide.Context+"/file/refresh", handlerWrapper(file.RefreshDirectoryHandler)) + http.HandleFunc(conf.Wide.Context+"/file", handlerWrapper(file.GetFileHandler)) + http.HandleFunc(conf.Wide.Context+"/file/save", handlerWrapper(file.SaveFileHandler)) + http.HandleFunc(conf.Wide.Context+"/file/new", handlerWrapper(file.NewFileHandler)) + http.HandleFunc(conf.Wide.Context+"/file/remove", handlerWrapper(file.RemoveFileHandler)) + http.HandleFunc(conf.Wide.Context+"/file/rename", handlerWrapper(file.RenameFileHandler)) + http.HandleFunc(conf.Wide.Context+"/file/search/text", handlerWrapper(file.SearchTextHandler)) + http.HandleFunc(conf.Wide.Context+"/file/find/name", handlerWrapper(file.FindHandler)) + + // outline + http.HandleFunc(conf.Wide.Context+"/outline", handlerWrapper(file.GetOutlineHandler)) + + // file export/import + http.HandleFunc(conf.Wide.Context+"/file/zip/new", handlerWrapper(file.CreateZipHandler)) + http.HandleFunc(conf.Wide.Context+"/file/zip", handlerWrapper(file.GetZipHandler)) + http.HandleFunc(conf.Wide.Context+"/file/upload", handlerWrapper(file.UploadHandler)) + http.HandleFunc(conf.Wide.Context+"/file/decompress", handlerWrapper(file.DecompressHandler)) + + // editor + http.HandleFunc(conf.Wide.Context+"/editor/ws", handlerWrapper(editor.WSHandler)) + http.HandleFunc(conf.Wide.Context+"/go/fmt", handlerWrapper(editor.GoFmtHandler)) + http.HandleFunc(conf.Wide.Context+"/autocomplete", handlerWrapper(editor.AutocompleteHandler)) + http.HandleFunc(conf.Wide.Context+"/exprinfo", handlerWrapper(editor.GetExprInfoHandler)) + http.HandleFunc(conf.Wide.Context+"/find/decl", handlerWrapper(editor.FindDeclarationHandler)) + http.HandleFunc(conf.Wide.Context+"/find/usages", handlerWrapper(editor.FindUsagesHandler)) + + // shell + // http.HandleFunc(conf.Wide.Context+"/shell/ws", handlerWrapper(shell.WSHandler)) + // http.HandleFunc(conf.Wide.Context+"/shell", handlerWrapper(shell.IndexHandler)) + + // notification + http.HandleFunc(conf.Wide.Context+"/notification/ws", handlerWrapper(notification.WSHandler)) + + // user + http.HandleFunc(conf.Wide.Context+"/login", handlerWrapper(session.LoginHandler)) + http.HandleFunc(conf.Wide.Context+"/logout", handlerWrapper(session.LogoutHandler)) + http.HandleFunc(conf.Wide.Context+"/signup", handlerWrapper(session.SignUpUserHandler)) + http.HandleFunc(conf.Wide.Context+"/preference", handlerWrapper(session.PreferenceHandler)) + + // playground + http.HandleFunc(conf.Wide.Context+"/playground", handlerWrapper(playground.IndexHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/", handlerWrapper(playground.IndexHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/ws", handlerWrapper(playground.WSHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/save", handlerWrapper(playground.SaveHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/short-url", handlerWrapper(playground.ShortURLHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/build", handlerWrapper(playground.BuildHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/run", handlerWrapper(playground.RunHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/stop", handlerWrapper(playground.StopHandler)) + http.HandleFunc(conf.Wide.Context+"/playground/autocomplete", handlerWrapper(playground.AutocompleteHandler)) + + // git + http.HandleFunc(conf.Wide.Context+"/git/clone", handlerWrapper(git.CloneHandler)) + + logger.Infof("Wide is running [%s]", conf.Wide.Server+conf.Wide.Context) + + err := http.ListenAndServe(conf.Wide.Server, nil) + if err != nil { + logger.Error(err) + } +} + +// indexHandler handles request of Wide index. +func indexHandler(w http.ResponseWriter, r *http.Request) { + if conf.Wide.Context+"/" != r.RequestURI { + http.Redirect(w, r, conf.Wide.Context+"/", http.StatusFound) + + return + } + + httpSession, _ := session.HTTPSession.Get(r, "wide-session") + if httpSession.IsNew { + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + username := httpSession.Values["username"].(string) + if "playground" == username { // reserved user for Playground + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge + if "" != conf.Wide.Context { + httpSession.Options.Path = conf.Wide.Context + } + httpSession.Save(r, w) + + user := conf.GetUser(username) + if nil == user { + logger.Warnf("Not found user [%s]", username) + + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + locale := user.Locale + + wideSessions := session.WideSessions.GetByUsername(username) + + model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale, + "username": username, "sid": session.WideSessions.GenId(), "latestSessionContent": user.LatestSessionContent, + "pathSeparator": conf.PathSeparator, "codeMirrorVer": conf.CodeMirrorVer, + "user": user, "editorThemes": conf.GetEditorThemes(), "crossPlatforms": util.Go.GetCrossPlatforms()} + + logger.Debugf("User [%s] has [%d] sessions", username, len(wideSessions)) + + t, err := template.ParseFiles("views/index.html") + if nil != err { + logger.Error(err) + http.Error(w, err.Error(), 500) + + return + } + + t.Execute(w, model) +} + +// handleSignal handles system signal for graceful shutdown. +func handleSignal() { + go func() { + c := make(chan os.Signal) + + signal.Notify(c, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM) + s := <-c + logger.Tracef("Got signal [%s]", s) + + session.SaveOnlineUsers() + logger.Tracef("Saved all online user, exit") + + os.Exit(0) + }() +} + +// serveSingle registers the handler function for the given pattern and filename. +func serveSingle(pattern string, filename string) { + http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) { + http.ServeFile(w, r, filename) + }) +} + +// startHandler handles request of start page. +func startHandler(w http.ResponseWriter, r *http.Request) { + httpSession, _ := session.HTTPSession.Get(r, "wide-session") + if httpSession.IsNew { + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge + if "" != conf.Wide.Context { + httpSession.Options.Path = conf.Wide.Context + } + httpSession.Save(r, w) + + username := httpSession.Values["username"].(string) + locale := conf.GetUser(username).Locale + userWorkspace := conf.GetUserWorkspace(username) + + sid := r.URL.Query()["sid"][0] + wSession := session.WideSessions.Get(sid) + if nil == wSession { + logger.Errorf("Session [%s] not found", sid) + } + + model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale, + "username": username, "workspace": userWorkspace, "ver": conf.WideVersion, "sid": sid} + + t, err := template.ParseFiles("views/start.html") + + if nil != err { + logger.Error(err) + http.Error(w, err.Error(), 500) + + return + } + + t.Execute(w, model) +} + +// keyboardShortcutsHandler handles request of keyboard shortcuts page. +func keyboardShortcutsHandler(w http.ResponseWriter, r *http.Request) { + httpSession, _ := session.HTTPSession.Get(r, "wide-session") + if httpSession.IsNew { + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge + if "" != conf.Wide.Context { + httpSession.Options.Path = conf.Wide.Context + } + httpSession.Save(r, w) + + username := httpSession.Values["username"].(string) + locale := conf.GetUser(username).Locale + + model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale} + + t, err := template.ParseFiles("views/keyboard_shortcuts.html") + + if nil != err { + logger.Error(err) + http.Error(w, err.Error(), 500) + + return + } + + t.Execute(w, model) +} + +// aboutHandle handles request of about page. +func aboutHandler(w http.ResponseWriter, r *http.Request) { + httpSession, _ := session.HTTPSession.Get(r, "wide-session") + if httpSession.IsNew { + http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound) + + return + } + + httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge + if "" != conf.Wide.Context { + httpSession.Options.Path = conf.Wide.Context + } + httpSession.Save(r, w) + + username := httpSession.Values["username"].(string) + locale := conf.GetUser(username).Locale + + model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale, + "ver": conf.WideVersion, "goos": runtime.GOOS, "goarch": runtime.GOARCH, "gover": runtime.Version()} + + t, err := template.ParseFiles("views/about.html") + + if nil != err { + logger.Error(err) + http.Error(w, err.Error(), 500) + + return + } + + t.Execute(w, model) +} + +// handlerWrapper wraps the HTTP Handler for some common processes. +// +// 1. panic recover +// 2. request stopwatch +// 3. i18n +func handlerWrapper(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { + handler := panicRecover(f) + handler = stopwatch(handler) + handler = i18nLoad(handler) + + return handler +} + +// handlerGzWrapper wraps the HTTP Handler for some common processes. +// +// 1. panic recover +// 2. gzip response +// 3. request stopwatch +// 4. i18n +func handlerGzWrapper(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { + handler := panicRecover(f) + handler = gzipWrapper(handler) + handler = stopwatch(handler) + handler = i18nLoad(handler) + + return handler +} + +// gzipWrapper wraps the process with response gzip. +func gzipWrapper(f func(http.ResponseWriter, *http.Request)) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") { + f(w, r) + + return + } + + w.Header().Set("Content-Encoding", "gzip") + gz := gzip.NewWriter(w) + defer gz.Close() + gzr := gzipResponseWriter{Writer: gz, ResponseWriter: w} + + f(gzr, r) + } +} + +// i18nLoad wraps the i18n process. +func i18nLoad(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + i18n.Load() + + handler(w, r) + } +} + +// stopwatch wraps the request stopwatch process. +func stopwatch(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + start := time.Now() + + defer func() { + logger.Tracef("[%s, %s, %s]", r.Method, r.RequestURI, time.Since(start)) + }() + + handler(w, r) + } +} + +// panicRecover wraps the panic recover process. +func panicRecover(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + defer util.Recover() + + handler(w, r) + } +} + +// initMime initializes mime types. +// +// We can't get the mime types on some OS (such as Windows XP) by default, so initializes them here. +func initMime() { + mime.AddExtensionType(".css", "text/css") + mime.AddExtensionType(".js", "application/x-javascript") + mime.AddExtensionType(".json", "application/json") +} + +// gzipResponseWriter represents a gzip response writer. +type gzipResponseWriter struct { + io.Writer + http.ResponseWriter +} + +// Write writes response with appropriate 'Content-Type'. +func (w gzipResponseWriter) Write(b []byte) (int, error) { + if "" == w.Header().Get("Content-Type") { + // If no content type, apply sniffing algorithm to un-gzipped body. + w.Header().Set("Content-Type", http.DetectContentType(b)) + } + + return w.Writer.Write(b) +} diff --git a/vendor/github.com/b3log/wide/package.json b/vendor/github.com/b3log/wide/package.json new file mode 100644 index 0000000..ed66be8 --- /dev/null +++ b/vendor/github.com/b3log/wide/package.json @@ -0,0 +1,33 @@ +{ + "name": "wide", + "version": "1.4.0", + "description": "A Web-based IDE for Teams using Go programming language/Golang.", + "homepage": "https://wide.b3log.org", + "repository": { + "type": "git", + "url": "git://github.com/b3log/wide.git" + }, + "bugs": { + "url": "https://github.com/b3log/wide/issues" + }, + "license": "Apache License", + "private": true, + "author": "Daniel (http://88250.b3log.org) & Vanessa (http://vanessa.b3log.org)", + "maintainers": [ + { + "name": "Daniel", + "email": "d@b3log.org" + }, + { + "name": "Vanessa", + "email": "v@b3log.org" + } + ], + "devDependencies": { + "gulp": "^3.9.1", + "gulp-concat": "^2.6.1", + "gulp-minify-css": "^1.2.4", + "gulp-sourcemaps": "^2.6.0", + "gulp-uglify": "^2.1.2" + } +} diff --git a/vendor/github.com/b3log/wide/pkg.sh b/vendor/github.com/b3log/wide/pkg.sh new file mode 100644 index 0000000..22a6e5e --- /dev/null +++ b/vendor/github.com/b3log/wide/pkg.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# Wide package tool. +# +# Command: +# ./pkg.sh ${version} ${target} +# Example: +# ./pkg.sh 1.0.0 /home/daniel/1.0.0/ + +ver=$1 +target=$2 +list="conf doc i18n static views README.md TERMS.md LICENSE" + +mkdir -p ${target} + +echo version=${ver} +echo target=${target} + +## darwin +os=darwin + +export GOOS=${os} +export GOARCH=amd64 +echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide gotools gocode + +export GOOS=${os} +export GOARCH=386 +echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide gotools gocode + +## linux +os=linux + +export GOOS=${os} +export GOARCH=amd64 +echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide gotools gocode + +export GOOS=${os} +export GOARCH=386 +echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go' +rm -f wide gotools gocode + +## windows +os=windows + +export GOOS=${os} +export GOARCH=amd64 +echo wide-${ver}-${GOOS}-${GOARCH}.zip +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go +rm -f wide.exe gotools.exe gocode.exe + +export GOOS=${os} +export GOARCH=386 +echo wide-${ver}-${GOOS}-${GOARCH}.zip +go build +go build github.com/visualfc/gotools +go build github.com/nsf/gocode +zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go +rm -f wide.exe gotools.exe gocode.exe diff --git a/vendor/github.com/b3log/wide/yarn.lock b/vendor/github.com/b3log/wide/yarn.lock new file mode 100644 index 0000000..0ea15a7 --- /dev/null +++ b/vendor/github.com/b3log/wide/yarn.lock @@ -0,0 +1,1341 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@gulp-sourcemaps/identity-map@1.X": + version "1.0.1" + resolved "http://registry.npm.taobao.org/@gulp-sourcemaps/identity-map/download/@gulp-sourcemaps/identity-map-1.0.1.tgz#cfa23bc5840f9104ce32a65e74db7e7a974bbee1" + dependencies: + acorn "^5.0.3" + css "^2.2.1" + normalize-path "^2.1.1" + source-map "^0.5.6" + through2 "^2.0.3" + +"@gulp-sourcemaps/map-sources@1.X": + version "1.0.0" + resolved "http://registry.npm.taobao.org/@gulp-sourcemaps/map-sources/download/@gulp-sourcemaps/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda" + dependencies: + normalize-path "^2.0.1" + through2 "^2.0.3" + +acorn@4.X: + version "4.0.11" + resolved "http://registry.npm.taobao.org/acorn/download/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + +acorn@^5.0.3: + version "5.0.3" + resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "http://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "http://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +archy@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-differ@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/array-differ/download/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-uniq@^1.0.2: + version "1.0.3" + resolved "http://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +atob@~1.1.0: + version "1.1.3" + resolved "http://registry.npm.taobao.org/atob/download/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +beeper@^1.0.0: + version "1.1.1" + resolved "http://registry.npm.taobao.org/beeper/download/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +brace-expansion@^1.0.0: + version "1.1.7" + resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +buffer-shims@~1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/buffer-shims/download/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +bufferstreams@1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/bufferstreams/download/bufferstreams-1.0.1.tgz#cfb1ad9568d3ba3cfe935ba9abdd952de88aab2a" + dependencies: + readable-stream "^1.0.33" + +camelcase@^1.0.2: + version "1.2.1" + resolved "http://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +center-align@^0.1.1: + version "0.1.3" + resolved "http://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + +chalk@^1.0.0, chalk@^1.1.1: + version "1.1.3" + resolved "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clean-css@^3.3.3: + version "3.4.25" + resolved "http://registry.npm.taobao.org/clean-css/download/clean-css-3.4.25.tgz#9e9a52d5c1e6bc5123e1b2783fa65fe958946ede" + dependencies: + commander "2.8.x" + source-map "0.4.x" + +cliui@^2.1.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + +clone-buffer@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/clone-buffer/download/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "http://registry.npm.taobao.org/clone-stats/download/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone-stats@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/clone-stats/download/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" + +clone@^0.2.0: + version "0.2.0" + resolved "http://registry.npm.taobao.org/clone/download/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "http://registry.npm.taobao.org/clone/download/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +cloneable-readable@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/cloneable-readable/download/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117" + dependencies: + inherits "^2.0.1" + process-nextick-args "^1.0.6" + through2 "^2.0.1" + +commander@2.8.x: + version "2.8.1" + resolved "http://registry.npm.taobao.org/commander/download/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-with-sourcemaps@^1.0.0: + version "1.0.4" + resolved "http://registry.npm.taobao.org/concat-with-sourcemaps/download/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6" + dependencies: + source-map "^0.5.1" + +convert-source-map@1.X: + version "1.5.0" + resolved "http://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +css@2.X, css@^2.2.1: + version "2.2.1" + resolved "http://registry.npm.taobao.org/css/download/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + +dateformat@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/dateformat/download/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + +debug-fabulous@0.1.X: + version "0.1.0" + resolved "http://registry.npm.taobao.org/debug-fabulous/download/debug-fabulous-0.1.0.tgz#ad0ea07a5d519324fb55842a8f34ee59c7f8ff6c" + dependencies: + debug "2.X" + object-assign "4.1.0" + +debug@2.X: + version "2.6.4" + resolved "http://registry.npm.taobao.org/debug/download/debug-2.6.4.tgz#7586a9b3c39741c0282ae33445c4e8ac74734fe0" + dependencies: + ms "0.7.3" + +decamelize@^1.0.0: + version "1.2.0" + resolved "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +defaults@^1.0.0: + version "1.0.3" + resolved "http://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + dependencies: + clone "^1.0.2" + +deprecated@^0.0.1: + version "0.0.1" + resolved "http://registry.npm.taobao.org/deprecated/download/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19" + +detect-file@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/detect-file/download/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63" + dependencies: + fs-exists-sync "^0.1.0" + +detect-newline@2.X: + version "2.1.0" + resolved "http://registry.npm.taobao.org/detect-newline/download/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +duplexer2@0.0.2: + version "0.0.2" + resolved "http://registry.npm.taobao.org/duplexer2/download/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +end-of-stream@~0.1.5: + version "0.1.5" + resolved "http://registry.npm.taobao.org/end-of-stream/download/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf" + dependencies: + once "~1.3.0" + +escape-string-regexp@^1.0.2: + version "1.0.5" + resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +expand-tilde@^1.2.1, expand-tilde@^1.2.2: + version "1.2.2" + resolved "http://registry.npm.taobao.org/expand-tilde/download/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449" + dependencies: + os-homedir "^1.0.1" + +extend@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/extend/download/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" + +extglob@^0.3.1: + version "0.3.2" + resolved "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +fancy-log@^1.1.0: + version "1.3.0" + resolved "http://registry.npm.taobao.org/fancy-log/download/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +filename-regex@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" + +fill-range@^2.1.0: + version "2.2.3" + resolved "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +find-index@^0.1.1: + version "0.1.1" + resolved "http://registry.npm.taobao.org/find-index/download/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4" + +findup-sync@^0.4.2: + version "0.4.3" + resolved "http://registry.npm.taobao.org/findup-sync/download/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12" + dependencies: + detect-file "^0.1.0" + is-glob "^2.0.1" + micromatch "^2.3.7" + resolve-dir "^0.1.0" + +fined@^1.0.1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/fined/download/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97" + dependencies: + expand-tilde "^1.2.1" + lodash.assignwith "^4.0.7" + lodash.isempty "^4.2.1" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.pick "^4.2.1" + parse-filepath "^1.0.1" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/first-chunk-stream/download/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flagged-respawn@^0.3.2: + version "0.3.2" + resolved "http://registry.npm.taobao.org/flagged-respawn/download/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5" + +for-in@^1.0.1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +fs-exists-sync@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/fs-exists-sync/download/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" + +gaze@^0.5.1: + version "0.5.2" + resolved "http://registry.npm.taobao.org/gaze/download/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f" + dependencies: + globule "~0.1.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-stream@^3.1.5: + version "3.1.18" + resolved "http://registry.npm.taobao.org/glob-stream/download/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b" + dependencies: + glob "^4.3.1" + glob2base "^0.0.12" + minimatch "^2.0.1" + ordered-read-streams "^0.1.0" + through2 "^0.6.1" + unique-stream "^1.0.0" + +glob-watcher@^0.0.6: + version "0.0.6" + resolved "http://registry.npm.taobao.org/glob-watcher/download/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b" + dependencies: + gaze "^0.5.1" + +glob2base@^0.0.12: + version "0.0.12" + resolved "http://registry.npm.taobao.org/glob2base/download/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56" + dependencies: + find-index "^0.1.1" + +glob@^4.3.1: + version "4.5.3" + resolved "http://registry.npm.taobao.org/glob/download/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "^2.0.1" + once "^1.3.0" + +glob@~3.1.21: + version "3.1.21" + resolved "http://registry.npm.taobao.org/glob/download/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd" + dependencies: + graceful-fs "~1.2.0" + inherits "1" + minimatch "~0.2.11" + +global-modules@^0.2.3: + version "0.2.3" + resolved "http://registry.npm.taobao.org/global-modules/download/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d" + dependencies: + global-prefix "^0.1.4" + is-windows "^0.2.0" + +global-prefix@^0.1.4: + version "0.1.5" + resolved "http://registry.npm.taobao.org/global-prefix/download/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f" + dependencies: + homedir-polyfill "^1.0.0" + ini "^1.3.4" + is-windows "^0.2.0" + which "^1.2.12" + +globule@~0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/globule/download/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5" + dependencies: + glob "~3.1.21" + lodash "~1.0.1" + minimatch "~0.2.11" + +glogg@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/glogg/download/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +graceful-fs@4.X: + version "4.1.11" + resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +graceful-fs@^3.0.0: + version "3.0.11" + resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818" + dependencies: + natives "^1.1.0" + +graceful-fs@~1.2.0: + version "1.2.3" + resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "http://registry.npm.taobao.org/graceful-readlink/download/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +gulp-concat@^2.6.1: + version "2.6.1" + resolved "http://registry.npm.taobao.org/gulp-concat/download/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353" + dependencies: + concat-with-sourcemaps "^1.0.0" + through2 "^2.0.0" + vinyl "^2.0.0" + +gulp-minify-css@^1.2.4: + version "1.2.4" + resolved "http://registry.npm.taobao.org/gulp-minify-css/download/gulp-minify-css-1.2.4.tgz#b6164957602ea27f9e5ad88227695dd205778c06" + dependencies: + clean-css "^3.3.3" + gulp-util "^3.0.5" + object-assign "^4.0.1" + readable-stream "^2.0.0" + vinyl-bufferstream "^1.0.1" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-sourcemaps@^2.6.0: + version "2.6.0" + resolved "http://registry.npm.taobao.org/gulp-sourcemaps/download/gulp-sourcemaps-2.6.0.tgz#7ccce899a8a3bfca1593a3348d0fbf41dd3f51e5" + dependencies: + "@gulp-sourcemaps/identity-map" "1.X" + "@gulp-sourcemaps/map-sources" "1.X" + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.1.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom-string "1.X" + through2 "2.X" + vinyl "1.X" + +gulp-uglify@^2.1.2: + version "2.1.2" + resolved "http://registry.npm.taobao.org/gulp-uglify/download/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541" + dependencies: + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash "^4.13.1" + make-error-cause "^1.1.1" + through2 "^2.0.0" + uglify-js "~2.8.10" + uglify-save-license "^0.4.1" + vinyl-sourcemaps-apply "^0.2.0" + +gulp-util@^3.0.0, gulp-util@^3.0.5: + version "3.0.8" + resolved "http://registry.npm.taobao.org/gulp-util/download/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulp@^3.9.1: + version "3.9.1" + resolved "http://registry.npm.taobao.org/gulp/download/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4" + dependencies: + archy "^1.0.0" + chalk "^1.0.0" + deprecated "^0.0.1" + gulp-util "^3.0.0" + interpret "^1.0.0" + liftoff "^2.1.0" + minimist "^1.1.0" + orchestrator "^0.3.0" + pretty-hrtime "^1.0.0" + semver "^4.1.0" + tildify "^1.0.0" + v8flags "^2.0.2" + vinyl-fs "^0.3.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/gulplog/download/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/has-gulplog/download/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +homedir-polyfill@^1.0.0: + version "1.0.1" + resolved "http://registry.npm.taobao.org/homedir-polyfill/download/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" + dependencies: + parse-passwd "^1.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/inherits/download/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b" + +inherits@2, inherits@^2.0.1, inherits@~2.0.1: + version "2.0.3" + resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@^1.3.4: + version "1.3.4" + resolved "http://registry.npm.taobao.org/ini/download/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +interpret@^1.0.0: + version "1.0.3" + resolved "http://registry.npm.taobao.org/interpret/download/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90" + +is-absolute@^0.2.3: + version "0.2.6" + resolved "http://registry.npm.taobao.org/is-absolute/download/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb" + dependencies: + is-relative "^0.2.1" + is-windows "^0.2.0" + +is-buffer@^1.0.2: + version "1.1.5" + resolved "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.1: + version "0.1.1" + resolved "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-relative@^0.2.1: + version "0.2.1" + resolved "http://registry.npm.taobao.org/is-relative/download/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5" + dependencies: + is-unc-path "^0.1.1" + +is-stream@^1.1.0: + version "1.1.0" + resolved "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-unc-path@^0.1.1: + version "0.1.2" + resolved "http://registry.npm.taobao.org/is-unc-path/download/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9" + dependencies: + unc-path-regex "^0.1.0" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "http://registry.npm.taobao.org/is-utf8/download/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-windows@^0.2.0: + version "0.2.0" + resolved "http://registry.npm.taobao.org/is-windows/download/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c" + +isarray@0.0.1: + version "0.0.1" + resolved "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +kind-of@^3.0.2: + version "3.1.0" + resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" + dependencies: + is-buffer "^1.0.2" + +lazy-cache@^1.0.3: + version "1.0.4" + resolved "http://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" + +liftoff@^2.1.0: + version "2.3.0" + resolved "http://registry.npm.taobao.org/liftoff/download/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385" + dependencies: + extend "^3.0.0" + findup-sync "^0.4.2" + fined "^1.0.1" + flagged-respawn "^0.3.2" + lodash.isplainobject "^4.0.4" + lodash.isstring "^4.0.1" + lodash.mapvalues "^4.4.0" + rechoir "^0.6.2" + resolve "^1.1.7" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "http://registry.npm.taobao.org/lodash._basecopy/download/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "http://registry.npm.taobao.org/lodash._basetostring/download/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/lodash._basevalues/download/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "http://registry.npm.taobao.org/lodash._getnative/download/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "http://registry.npm.taobao.org/lodash._isiterateecall/download/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/lodash._reescape/download/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/lodash._reevaluate/download/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/lodash._reinterpolate/download/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "http://registry.npm.taobao.org/lodash._root/download/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.assignwith@^4.0.7: + version "4.2.0" + resolved "http://registry.npm.taobao.org/lodash.assignwith/download/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "http://registry.npm.taobao.org/lodash.escape/download/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "http://registry.npm.taobao.org/lodash.isarguments/download/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "http://registry.npm.taobao.org/lodash.isarray/download/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isempty@^4.2.1: + version "4.4.0" + resolved "http://registry.npm.taobao.org/lodash.isempty/download/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e" + +lodash.isplainobject@^4.0.4: + version "4.0.6" + resolved "http://registry.npm.taobao.org/lodash.isplainobject/download/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + +lodash.isstring@^4.0.1: + version "4.0.1" + resolved "http://registry.npm.taobao.org/lodash.isstring/download/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "http://registry.npm.taobao.org/lodash.keys/download/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.mapvalues@^4.4.0: + version "4.6.0" + resolved "http://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c" + +lodash.pick@^4.2.1: + version "4.4.0" + resolved "http://registry.npm.taobao.org/lodash.pick/download/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "http://registry.npm.taobao.org/lodash.restparam/download/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "http://registry.npm.taobao.org/lodash.template/download/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "http://registry.npm.taobao.org/lodash.templatesettings/download/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash@^4.13.1: + version "4.17.4" + resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +lodash@~1.0.1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/lodash/download/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" + +longest@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +lru-cache@2: + version "2.7.3" + resolved "http://registry.npm.taobao.org/lru-cache/download/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952" + +make-error-cause@^1.1.1: + version "1.2.2" + resolved "http://registry.npm.taobao.org/make-error-cause/download/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d" + dependencies: + make-error "^1.2.0" + +make-error@^1.2.0: + version "1.2.3" + resolved "http://registry.npm.taobao.org/make-error/download/make-error-1.2.3.tgz#6c4402df732e0977ac6faf754a5074b3d2b1d19d" + +map-cache@^0.2.0: + version "0.2.2" + resolved "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + +micromatch@^2.3.7: + version "2.3.11" + resolved "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +minimatch@^2.0.1: + version "2.0.10" + resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7" + dependencies: + brace-expansion "^1.0.0" + +minimatch@~0.2.11: + version "0.2.14" + resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a" + dependencies: + lru-cache "2" + sigmund "~1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0: + version "1.2.0" + resolved "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@^0.5.0: + version "0.5.1" + resolved "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.3: + version "0.7.3" + resolved "http://registry.npm.taobao.org/ms/download/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" + +multipipe@^0.1.2: + version "0.1.2" + resolved "http://registry.npm.taobao.org/multipipe/download/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +natives@^1.1.0: + version "1.1.0" + resolved "http://registry.npm.taobao.org/natives/download/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" + +normalize-path@^2.0.1, normalize-path@^2.1.1: + version "2.1.1" + resolved "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +object-assign@4.1.0: + version "4.1.0" + resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.1: + version "4.1.1" + resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +once@^1.3.0, once@~1.3.0: + version "1.3.3" + resolved "http://registry.npm.taobao.org/once/download/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +orchestrator@^0.3.0: + version "0.3.8" + resolved "http://registry.npm.taobao.org/orchestrator/download/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e" + dependencies: + end-of-stream "~0.1.5" + sequencify "~0.0.7" + stream-consume "~0.1.0" + +ordered-read-streams@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/ordered-read-streams/download/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126" + +os-homedir@^1.0.0, os-homedir@^1.0.1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +parse-filepath@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/parse-filepath/download/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73" + dependencies: + is-absolute "^0.2.3" + map-cache "^0.2.0" + path-root "^0.1.1" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-passwd@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/parse-passwd/download/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" + +path-parse@^1.0.5: + version "1.0.5" + resolved "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + +path-root-regex@^0.1.0: + version "0.1.2" + resolved "http://registry.npm.taobao.org/path-root-regex/download/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" + +path-root@^0.1.1: + version "0.1.1" + resolved "http://registry.npm.taobao.org/path-root/download/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" + dependencies: + path-root-regex "^0.1.0" + +preserve@^0.2.0: + version "0.2.0" + resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-hrtime@^1.0.0: + version "1.0.3" + resolved "http://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" + +process-nextick-args@^1.0.6, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +randomatic@^1.1.3: + version "1.1.6" + resolved "http://registry.npm.taobao.org/randomatic/download/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^1.0.33, readable-stream@~1.1.9: + version "1.1.14" + resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.1.5: + version "2.2.9" + resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8" + dependencies: + buffer-shims "~1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~1.0.0" + util-deprecate "~1.0.1" + +rechoir@^0.6.2: + version "0.6.2" + resolved "http://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +replace-ext@0.0.1: + version "0.0.1" + resolved "http://registry.npm.taobao.org/replace-ext/download/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/replace-ext/download/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +resolve-dir@^0.1.0: + version "0.1.1" + resolved "http://registry.npm.taobao.org/resolve-dir/download/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e" + dependencies: + expand-tilde "^1.2.2" + global-modules "^0.2.3" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +resolve@^1.1.6, resolve@^1.1.7: + version "1.3.3" + resolved "http://registry.npm.taobao.org/resolve/download/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5" + dependencies: + path-parse "^1.0.5" + +right-align@^0.1.1: + version "0.1.3" + resolved "http://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + dependencies: + align-text "^0.1.1" + +semver@^4.1.0: + version "4.3.6" + resolved "http://registry.npm.taobao.org/semver/download/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +sequencify@~0.0.7: + version "0.0.7" + resolved "http://registry.npm.taobao.org/sequencify/download/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" + +sigmund@~1.0.0: + version "1.0.1" + resolved "http://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@0.4.x: + version "0.4.4" + resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" + dependencies: + amdefine ">=0.0.4" + +source-map@0.X, source-map@^0.5.1, source-map@^0.5.6, source-map@~0.5.1: + version "0.5.6" + resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@^0.1.38: + version "0.1.43" + resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/sparkles/download/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +stream-consume@~0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/stream-consume/download/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +string_decoder@~1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667" + dependencies: + buffer-shims "~1.0.0" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom-string@1.X: + version "1.0.0" + resolved "http://registry.npm.taobao.org/strip-bom-string/download/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" + +strip-bom@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/strip-bom/download/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794" + dependencies: + first-chunk-stream "^1.0.0" + is-utf8 "^0.2.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3: + version "2.0.3" + resolved "http://registry.npm.taobao.org/through2/download/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@^0.6.1: + version "0.6.5" + resolved "http://registry.npm.taobao.org/through2/download/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +tildify@^1.0.0: + version "1.2.0" + resolved "http://registry.npm.taobao.org/tildify/download/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a" + dependencies: + os-homedir "^1.0.0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "http://registry.npm.taobao.org/time-stamp/download/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +uglify-js@~2.8.10: + version "2.8.22" + resolved "http://registry.npm.taobao.org/uglify-js/download/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0" + dependencies: + source-map "~0.5.1" + yargs "~3.10.0" + optionalDependencies: + uglify-to-browserify "~1.0.0" + +uglify-save-license@^0.4.1: + version "0.4.1" + resolved "http://registry.npm.taobao.org/uglify-save-license/download/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1" + +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "http://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + +unc-path-regex@^0.1.0: + version "0.1.2" + resolved "http://registry.npm.taobao.org/unc-path-regex/download/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" + +unique-stream@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/unique-stream/download/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +user-home@^1.1.1: + version "1.1.1" + resolved "http://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +v8flags@^2.0.2: + version "2.1.1" + resolved "http://registry.npm.taobao.org/v8flags/download/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4" + dependencies: + user-home "^1.1.1" + +vinyl-bufferstream@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/vinyl-bufferstream/download/vinyl-bufferstream-1.0.1.tgz#0537869f580effa4ca45acb47579e4b9fe63081a" + dependencies: + bufferstreams "1.0.1" + +vinyl-fs@^0.3.0: + version "0.3.14" + resolved "http://registry.npm.taobao.org/vinyl-fs/download/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6" + dependencies: + defaults "^1.0.0" + glob-stream "^3.1.5" + glob-watcher "^0.0.6" + graceful-fs "^3.0.0" + mkdirp "^0.5.0" + strip-bom "^1.0.0" + through2 "^0.6.1" + vinyl "^0.4.0" + +vinyl-sourcemaps-apply@^0.2.0: + version "0.2.1" + resolved "http://registry.npm.taobao.org/vinyl-sourcemaps-apply/download/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@1.X: + version "1.2.0" + resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^0.4.0: + version "0.4.6" + resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^2.0.0: + version "2.0.2" + resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c" + dependencies: + clone "^1.0.0" + clone-buffer "^1.0.0" + clone-stats "^1.0.0" + cloneable-readable "^1.0.0" + is-stream "^1.1.0" + remove-trailing-separator "^1.0.1" + replace-ext "^1.0.0" + +which@^1.2.12: + version "1.2.14" + resolved "http://registry.npm.taobao.org/which/download/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +window-size@0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + +wordwrap@0.0.2: + version "0.0.2" + resolved "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + +wrappy@1: + version "1.0.2" + resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1: + version "4.0.1" + resolved "http://registry.npm.taobao.org/xtend/download/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yargs@~3.10.0: + version "3.10.0" + resolved "http://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" diff --git a/vendor/github.com/bradfitz/goimports/LICENSE b/vendor/github.com/bradfitz/goimports/LICENSE new file mode 100644 index 0000000..65d761b --- /dev/null +++ b/vendor/github.com/bradfitz/goimports/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2013 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/bradfitz/goimports/README b/vendor/github.com/bradfitz/goimports/README new file mode 100644 index 0000000..b362bd2 --- /dev/null +++ b/vendor/github.com/bradfitz/goimports/README @@ -0,0 +1,17 @@ +This tool updates your Go import lines, adding missing ones and +removing unreferenced ones. + + $ go get golang.org/x/tools/cmd/goimports + + Note the new location. This project has moved to the official + go.tools repo. Pull requests here will no longer be accepted. + Please use the Go process: http://golang.org/doc/contribute.html + +It acts the same as gofmt (same flags, etc) but in addition to code +formatting, also fixes imports. + +See usage and editor integration notes, now moved elsewhere: + + http://godoc.org/golang.org/x/tools/cmd/goimports + +Happy hacking! diff --git a/vendor/github.com/bradfitz/goimports/goimports.go b/vendor/github.com/bradfitz/goimports/goimports.go new file mode 100644 index 0000000..a008d82 --- /dev/null +++ b/vendor/github.com/bradfitz/goimports/goimports.go @@ -0,0 +1,195 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package main + +import ( + "bytes" + "flag" + "fmt" + "go/scanner" + "io" + "io/ioutil" + "os" + "os/exec" + "path/filepath" + "runtime" + "strings" + + "golang.org/x/tools/imports" +) + +var ( + // main operation modes + list = flag.Bool("l", false, "list files whose formatting differs from goimport's") + write = flag.Bool("w", false, "write result to (source) file instead of stdout") + doDiff = flag.Bool("d", false, "display diffs instead of rewriting files") + + options = &imports.Options{ + TabWidth: 8, + TabIndent: true, + Comments: true, + Fragment: true, + } + exitCode = 0 +) + +func init() { + flag.BoolVar(&options.AllErrors, "e", false, "report all errors (not just the first 10 on different lines)") +} + +func report(err error) { + scanner.PrintError(os.Stderr, err) + exitCode = 2 +} + +func usage() { + fmt.Fprintf(os.Stderr, "usage: goimports [flags] [path ...]\n") + flag.PrintDefaults() + os.Exit(2) +} + +func isGoFile(f os.FileInfo) bool { + // ignore non-Go files + name := f.Name() + return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") +} + +func processFile(filename string, in io.Reader, out io.Writer, stdin bool) error { + opt := options + if stdin { + nopt := *options + nopt.Fragment = true + opt = &nopt + } + + if in == nil { + f, err := os.Open(filename) + if err != nil { + return err + } + defer f.Close() + in = f + } + + src, err := ioutil.ReadAll(in) + if err != nil { + return err + } + + res, err := imports.Process(filename, src, opt) + if err != nil { + return err + } + + if !bytes.Equal(src, res) { + // formatting has changed + if *list { + fmt.Fprintln(out, filename) + } + if *write { + err = ioutil.WriteFile(filename, res, 0) + if err != nil { + return err + } + } + if *doDiff { + data, err := diff(src, res) + if err != nil { + return fmt.Errorf("computing diff: %s", err) + } + fmt.Printf("diff %s gofmt/%s\n", filename, filename) + out.Write(data) + } + } + + if !*list && !*write && !*doDiff { + _, err = out.Write(res) + } + + return err +} + +func visitFile(path string, f os.FileInfo, err error) error { + if err == nil && isGoFile(f) { + err = processFile(path, nil, os.Stdout, false) + } + if err != nil { + report(err) + } + return nil +} + +func walkDir(path string) { + filepath.Walk(path, visitFile) +} + +func main() { + runtime.GOMAXPROCS(runtime.NumCPU()) + + // call gofmtMain in a separate function + // so that it can use defer and have them + // run before the exit. + gofmtMain() + os.Exit(exitCode) +} + +func gofmtMain() { + flag.Usage = usage + flag.Parse() + + if options.TabWidth < 0 { + fmt.Fprintf(os.Stderr, "negative tabwidth %d\n", options.TabWidth) + exitCode = 2 + return + } + + if flag.NArg() == 0 { + if err := processFile("", os.Stdin, os.Stdout, true); err != nil { + report(err) + } + return + } + + for i := 0; i < flag.NArg(); i++ { + path := flag.Arg(i) + switch dir, err := os.Stat(path); { + case err != nil: + report(err) + case dir.IsDir(): + walkDir(path) + default: + if err := processFile(path, nil, os.Stdout, false); err != nil { + report(err) + } + } + } +} + +func diff(b1, b2 []byte) (data []byte, err error) { + f1, err := ioutil.TempFile("", "gofmt") + if err != nil { + return + } + defer os.Remove(f1.Name()) + defer f1.Close() + + f2, err := ioutil.TempFile("", "gofmt") + if err != nil { + return + } + defer os.Remove(f2.Name()) + defer f2.Close() + + f1.Write(b1) + f2.Write(b2) + + data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput() + if len(data) > 0 { + // diff exits with a non-zero status when the files don't match. + // Ignore that failure as long as we get output. + err = nil + } + return +} diff --git a/vendor/github.com/nsf/gocode/LICENSE b/vendor/github.com/nsf/gocode/LICENSE new file mode 100644 index 0000000..5ce0cee --- /dev/null +++ b/vendor/github.com/nsf/gocode/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2010 nsf + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/github.com/nsf/gocode/README.md b/vendor/github.com/nsf/gocode/README.md new file mode 100644 index 0000000..11148c8 --- /dev/null +++ b/vendor/github.com/nsf/gocode/README.md @@ -0,0 +1,195 @@ +## An autocompletion daemon for the Go programming language + +Gocode is a helper tool which is intended to be integrated with your source code editor, like vim, neovim and emacs. It provides several advanced capabilities, which currently includes: + + - Context-sensitive autocompletion + +It is called *daemon*, because it uses client/server architecture for caching purposes. In particular, it makes autocompletions very fast. Typical autocompletion time with warm cache is 30ms, which is barely noticeable. + +Also watch the [demo screencast](http://nosmileface.ru/images/gocode-demo.swf). + +![Gocode in vim](http://nosmileface.ru/images/gocode-screenshot.png) + +![Gocode in emacs](http://nosmileface.ru/images/emacs-gocode.png) + +### Setup + + 1. You should have a correctly installed Go compiler environment and your personal workspace ($GOPATH). If you have no idea what **$GOPATH** is, take a look [here](http://golang.org/doc/code.html). Please make sure that your **$GOPATH/bin** is available in your **$PATH**. This is important, because most editors assume that **gocode** binary is available in one of the directories, specified by your **$PATH** environment variable. Otherwise manually copy the **gocode** binary from **$GOPATH/bin** to a location which is part of your **$PATH** after getting it in step 2. + + Do these steps only if you understand why you need to do them: + + `export GOPATH=$HOME/goprojects` + + `export PATH=$PATH:$GOPATH/bin` + + 2. Then you need to get the appropriate version of the gocode, for 6g/8g/5g compiler you can do this: + + `go get -u github.com/nsf/gocode` (-u flag for "update") + + Windows users should consider doing this instead: + + `go get -u -ldflags -H=windowsgui github.com/nsf/gocode` + + That way on the Windows OS gocode will be built as a GUI application and doing so solves hanging window issues with some of the editors. + + 3. Next steps are editor specific. See below. + +### Vim setup + +#### Vim manual installation + +Note: As of go 1.5 there is no $GOROOT/misc/vim script. Suggested installation is via [vim-go plugin](https://github.com/fatih/vim-go). + +In order to install vim scripts, you need to fulfill the following steps: + + 1. Install official Go vim scripts from **$GOROOT/misc/vim**. If you did that already, proceed to the step 2. + + 2. Install gocode vim scripts. Usually it's enough to do the following: + + 2.1. `vim/update.sh` + + **update.sh** script does the following: + + #!/bin/sh + mkdir -p "$HOME/.vim/autoload" + mkdir -p "$HOME/.vim/ftplugin/go" + cp "${0%/*}/autoload/gocomplete.vim" "$HOME/.vim/autoload" + cp "${0%/*}/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go" + + 2.2. Alternatively, you can create symlinks using symlink.sh script in order to avoid running update.sh after every gocode update. + + **symlink.sh** script does the following: + + #!/bin/sh + cd "${0%/*}" + ROOTDIR=`pwd` + mkdir -p "$HOME/.vim/autoload" + mkdir -p "$HOME/.vim/ftplugin/go" + ln -s "$ROOTDIR/autoload/gocomplete.vim" "$HOME/.vim/autoload/" + ln -s "$ROOTDIR/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go/" + + 3. Make sure vim has filetype plugin enabled. Simply add that to your **.vimrc**: + + `filetype plugin on` + + 4. Autocompletion should work now. Use `` for autocompletion (omnifunc autocompletion). + +#### Using Vundle in Vim + +Add the following line to your **.vimrc**: + +`Plugin 'nsf/gocode', {'rtp': 'vim/'}` + +And then update your packages by running `:PluginInstall`. + +#### Using vim-plug in Vim + +Add the following line to your **.vimrc**: + +`Plug 'nsf/gocode', { 'rtp': 'vim', 'do': '~/.vim/plugged/gocode/vim/symlink.sh' }` + +And then update your packages by running `:PlugInstall`. + +#### Other + +Alternatively take a look at the vundle/pathogen friendly repo: https://github.com/Blackrush/vim-gocode. + +### Neovim setup +#### Neovim manual installation + + Neovim users should also follow `Vim manual installation`, except that you should goto `gocode/nvim` in step 2, and remember that, the Neovim configuration file is `~/.config/nvim/init.vim`. + +#### Using Vundle in Neovim + +Add the following line to your **init.vim**: + +`Plugin 'nsf/gocode', {'rtp': 'nvim/'}` + +And then update your packages by running `:PluginInstall`. + +#### Using vim-plug in Neovim + +Add the following line to your **init.vim**: + +`Plug 'nsf/gocode', { 'rtp': 'nvim', 'do': '~/.config/nvim/plugged/gocode/nvim/symlink.sh' }` + +And then update your packages by running `:PlugInstall`. + +### Emacs setup + +In order to install emacs script, you need to fulfill the following steps: + + 1. Install [auto-complete-mode](http://www.emacswiki.org/emacs/AutoComplete) + + 2. Copy **emacs/go-autocomplete.el** file from the gocode source distribution to a directory which is in your 'load-path' in emacs. + + 3. Add these lines to your **.emacs**: + + (require 'go-autocomplete) + (require 'auto-complete-config) + (ac-config-default) + +Also, there is an alternative plugin for emacs using company-mode. See `emacs-company/README` for installation instructions. + +If you're a MacOSX user, you may find that script useful: https://github.com/purcell/exec-path-from-shell. It helps you with setting up the right environment variables as Go and gocode require it. By default it pulls the PATH, but don't forget to add the GOPATH as well, e.g.: + +``` +(when (memq window-system '(mac ns)) + (exec-path-from-shell-initialize) + (exec-path-from-shell-copy-env "GOPATH")) +``` + +### Options + +You can change all available options using `gocode set` command. The config file uses json format and is usually stored somewhere in **~/.config/gocode** directory. On windows it's stored in the appropriate AppData folder. It's suggested to avoid modifying config file manually, do that using the `gocode set` command. + +`gocode set` lists all options and their values. + +`gocode set