mirror of
https://github.com/golang/go
synced 2024-11-05 17:26:11 -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
631 B
JSON
22 lines
631 B
JSON
{
|
|
"//": [
|
|
"Copyright 2016 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.",
|
|
|
|
"This file exists to help import typescript typings",
|
|
"for web features used in this project. Neither the",
|
|
"typings nor node or npm are required to do development",
|
|
"on the code in this project.",
|
|
|
|
"If you do have npm installed, use the `npm i` command",
|
|
"in this directory to install the typings."
|
|
],
|
|
|
|
"private": true,
|
|
"dependencies": {
|
|
"@types/es6-promise": "0.0.28",
|
|
"@types/whatwg-fetch": "0.0.27"
|
|
}
|
|
}
|