0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

Make some renames in js/build.ts (#1912)

* Replace Deno.OSType enum with Deno.OperatingSystem type alias

* Add arm64 to supported CPU architectures

* add type alias for cpu arch Deno.Arch
This commit is contained in:
Ryan Dahl 2019-03-11 20:34:48 -04:00 committed by GitHub
parent 8828bb8c0e
commit ae4405d747
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 14 deletions

View file

@ -1,33 +1,30 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
export type OperatingSystem = "mac" | "win" | "linux";
export type Arch = "x64" | "arm64";
// Do not add unsupported platforms.
/** Build related information */
export interface BuildInfo {
/** The operating system CPU architecture. */
arch: "x64";
/** The CPU architecture. */
arch: Arch;
/** The operating system platform. */
os: OSType;
/** The operating system. */
os: OperatingSystem;
/** The arguments passed to GN during build. See `gn help buildargs`. */
args: string;
}
/** 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
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
arch: `ROLLUP_REPLACE_ARCH` as any,
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
os: `ROLLUP_REPLACE_OS` as any,
args: `ROLLUP_REPLACE_GN_ARGS`
/* eslint-enable @typescript-eslint/no-explicit-any */
};
// TODO(kevinkassimo): deprecate Deno.platform

View file

@ -63,7 +63,7 @@ export { metrics, Metrics } from "./metrics";
export { resources } from "./resources";
export { run, RunOptions, Process, ProcessStatus } from "./process";
export { inspect } from "./console";
export { build, platform, OSType } from "./build";
export { build, platform, OperatingSystem, Arch } from "./build";
export { version } from "./version";
export const args: string[] = [];