mirror of
https://github.com/golang/go
synced 2024-11-19 02:34:44 -07:00
053ddb97bf
This change primarily exists to import Typescript and the ES6 module loader polyfill as dependencies for this project. Both dependencies are relatively lightweight and can be easily removed if we decide we don't need them. The module loader polyfill implements support for an upcoming browser feature in ES6 (the next version of JavaScript). This feature helps modularize Javascript code and conveniently split it into multiple files. It should be supported by the stable versions of the four major browsers (Chrome, Firefox, Safari and Edge) by the end of the year. Once that happens, we can remove the polyfill. The Typescript compiler provides two things: First, it compiles new, but not-yet-supported ES6 Javascript features into ES5. It also provides a typechecker similar to what Closure does, but types are indicated in syntax rather than JSDoc comments. If we decide we don't want this dependency, we can compile the Typescript code into human-readable JavaScript code. (The compiler basically strips out types and replaces ES6 language features with more well-supported JavaScript equivalents). The Typescript compiler is not required for development. typescript.js and a feature in the module loader will be used to compile Typescript into JavaScript at serving time. (We might want to do something different for the production version, but we can get to that later). The change also adds code to serve the HTML and Javascript files. Updates golang/go#16410 Change-Id: I42c669d1de636d8b221fc03ed22aa7ac60554610 Reviewed-on: https://go-review.googlesource.com/25240 Reviewed-by: Austin Clements <austin@google.com>
22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
Copyright (c) 2013-2016 Guy Bedford, Luke Hoban, Addy Osmani
|
|
|
|
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. |