From 625ab5f0f1698098682787038217937264865d8e Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 21 Jan 2021 15:18:35 +1300 Subject: [PATCH] Minor adjustments --- package.json | 12 ++++++------ src/index.ts | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 9f072cad..64f2c4db 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "main": "out/init.lua", "scripts": { "prepare": "npm run build", - "build": "cross-env NODE_ENV=production TYPE=ts rbxtsc --verbose", - "build:luau": "cross-env NODE_ENV=production TYPE=luau rbxtsc --verbose --type=model --rojo=\"luau/default.project.json\"", + "build": "cross-env NODE_ENV=production rbxtsc --verbose", + "build:luau": "cross-env NODE_ENV=production TYPE=Luau rbxtsc --verbose --type=model --rojo=\"luau/default.project.json\"", "build:docs": "cd docs && npm run build", - "build:dev": "cross-env NODE_ENV=development TYPE=ts rbxtsc --verbose", + "build:dev": "cross-env NODE_ENV=development rbxtsc --verbose", "luau": "npm run build:luau && rojo build luau.project.json -o luau.net.rbxmx", - "build:example": "cross-env NODE_ENV=development TYPE=ts rbxtsc-dev --type=game -p ./example -i ./include", - "watch:example": "cross-env NODE_ENV=development TYPE=ts rbxtsc-dev -w --type=game -p ./example -i ./include", + "build:example": "cross-env NODE_ENV=development rbxtsc-dev --type=game -p ./example -i ./include", + "watch:example": "cross-env NODE_ENV=development rbxtsc-dev -w --type=game -p ./example -i ./include", "serve:example": "rojo serve ./example/default.project.json --port 34567" }, "repository": { @@ -27,7 +27,7 @@ "homepage": "https://github.com/roblox-aurora/rbx-net#readme", "publishConfig": { "access": "public", - "tag": "next" + "tag": "beta" }, "types": "out/index.d.ts", "devDependencies": { diff --git a/src/index.ts b/src/index.ts index c5182543..b0b1dddb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,8 @@ import { $env, $ifEnv } from "rbxts-transform-env"; import { $dbg } from "rbxts-transform-debug"; import { IS_SERVER } from "./internal"; +const BUILD_TYPE = $env("TYPE", "TS"); + /** * Networking Library for Roblox * @version 2.0 @@ -26,11 +28,11 @@ namespace Net { */ export const Definitions = CreateNetDefinitionBuilder; - export const VERSION = `${PKG_VERSION}${ + export const VERSION = `${PKG_VERSION} (${ $env<"production" | "development">("NODE_ENV", "production") === "development" - ? "-dev-" + $env("TYPE", "ts") - : "-" + $env("TYPE", "ts") - }`; + ? "DEV " + BUILD_TYPE + : BUILD_TYPE + })`; /** * Built-in middlewares