2019-03-06 16:54:58 -05:00
|
|
|
// 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. */
|
2019-03-11 14:23:11 -04:00
|
|
|
os: OSType;
|
2019-03-06 16:54:58 -05:00
|
|
|
|
|
|
|
/** The GN build arguments */
|
|
|
|
gnArgs: string;
|
|
|
|
}
|
|
|
|
|
2019-03-11 14:23:11 -04:00
|
|
|
/** The operating system platform. */
|
|
|
|
export enum OSType {
|
|
|
|
mac = "mac",
|
|
|
|
win = "win",
|
|
|
|
linux = "linux"
|
|
|
|
}
|
|
|
|
|
2019-03-06 16:54:58 -05:00
|
|
|
// 'build' is injected by rollup.config.js at compile time.
|
|
|
|
export const build: BuildInfo = {
|
2019-03-09 12:30:38 -05:00
|
|
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
2019-03-06 16:54:58 -05:00
|
|
|
// These string will be replaced by rollup
|
|
|
|
arch: `ROLLUP_REPLACE_ARCH` as any,
|
|
|
|
os: `ROLLUP_REPLACE_OS` as any,
|
|
|
|
gnArgs: `ROLLUP_REPLACE_GN_ARGS`
|
2019-03-09 12:30:38 -05:00
|
|
|
/* eslint-enable @typescript-eslint/no-explicit-any */
|
2019-03-06 16:54:58 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
// TODO(kevinkassimo): deprecate Deno.platform
|
|
|
|
export const platform = build;
|