0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/js/build.ts

35 lines
900 B
TypeScript
Raw Normal View History

// 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;
/** 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"
}
// 'build' is injected by rollup.config.js at compile time.
export const build: BuildInfo = {
/* eslint-disable @typescript-eslint/no-explicit-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`
/* eslint-enable @typescript-eslint/no-explicit-any */
};
// TODO(kevinkassimo): deprecate Deno.platform
export const platform = build;