summaryrefslogtreecommitdiff
path: root/js/build.ts
diff options
context:
space:
mode:
authorKevin (Kun) "Kassimo" Qian <kevinkassimo@gmail.com>2019-03-06 13:54:58 -0800
committerRyan Dahl <ry@tinyclouds.org>2019-03-06 16:54:58 -0500
commitde1a10e5f7afe793a66b2349642ea135fc066104 (patch)
tree3d91d82a62808f744fc189705110a50d7d8d478e /js/build.ts
parent91364cabae8687e7620edac406b43cb40cb55878 (diff)
Reorganize version and platform into Deno.build and Deno.version (#1879)
Diffstat (limited to 'js/build.ts')
-rw-r--r--js/build.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/js/build.ts b/js/build.ts
new file mode 100644
index 000000000..636f9a082
--- /dev/null
+++ b/js/build.ts
@@ -0,0 +1,27 @@
+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
+
+// Do not add unsupported platforms.
+/** Build related information */
+export interface BuildInfo {
+ /** The operating system CPU architecture. */
+ arch: "x64";
+
+ /** The operating system platform. */
+ os: "mac" | "win" | "linux";
+
+ /** The GN build arguments */
+ gnArgs: string;
+}
+
+// 'build' is injected by rollup.config.js at compile time.
+export const build: BuildInfo = {
+ // tslint:disable:no-any
+ // These string will be replaced by rollup
+ arch: `ROLLUP_REPLACE_ARCH` as any,
+ os: `ROLLUP_REPLACE_OS` as any,
+ gnArgs: `ROLLUP_REPLACE_GN_ARGS`
+ // tslint:disable:any
+};
+
+// TODO(kevinkassimo): deprecate Deno.platform
+export const platform = build;