New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@playform/build

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@playform/build - npm Package Compare versions

Comparing version

to
0.1.4

10

package.json
{
"name": "@playform/build",
"version": "0.1.3",
"version": "0.1.4",
"private": false,

@@ -37,12 +37,12 @@ "description": "🌀 Build —",

"dependencies": {
"@types/node": "22.0.2",
"@types/node": "22.5.0",
"commander": "12.1.0",
"deepmerge-ts": "7.1.0",
"esbuild": "0.23.0",
"esbuild": "0.23.1",
"fast-glob": "3.3.2",
"tsc-alias": "1.8.10",
"typescript": "*"
"typescript": "5.5.4"
},
"devDependencies": {
"ts-node": "11.0.0-beta.1"
"ts-node": "10.9.2"
},

@@ -49,0 +49,0 @@ "publishConfig": {

# 🌀 [Build] —
Builds all your TypeScript files into JavaScript.
`Build` is a powerful tool that compiles all your `TypeScript` files into
`JavaScript`, leveraging the speed of `ESBuild` and the type-checking capabilities
of the `TypeScript` compiler.
## Installation
## 📦 Features
Add configuration and setup scripts:
- Fast compilation using `ESBuild`
- `TypeScript` support with type-checking
- Watch mode for development
- Customizable `ESBuild` configuration
- Supports both `CommonJS` and `ES` modules
## 🚀 Installation
Install the package as a development dependency:
```sh

@@ -13,6 +23,8 @@ npm install -D -E @playform/build

## Usage
## 🛠️ Usage
Through a command line run:
### Command Line
Run the build tool from the command line:
```sh

@@ -22,25 +34,26 @@ npx @playform/build 'Source/**/*.ts'

Help:
### CLI Options
```sh
```
Usage: Build [options] <File...>
🌀 Build —
Arguments:
File 📝 File —
File 📝 File patterns to build
Options:
-V, --version output the version number
-ES, --ESBuild <File> 📜 ESBuild —
-TS, --TypeScript <File> 📜 TypeScript — (default: "tsconfig.json")
-W --Watch 👁️ Watch —
-h, --help display help for command
-V, --version Output the version number
-ES, --ESBuild <File> 📜 Custom `ESBuild` configuration file
-TS, --TypeScript <File> 📜 Custom `TypeScript` configuration file (default: "tsconfig.json")
-W, --Watch 👁️ Watch mode: rebuild on file changes
-h, --help Display help information
```
Or in a `package.json` file:
### NPM Scripts
Add `Build` to your `package.json` scripts:
```json
{
"scripts": {
"build": "Build 'Source/**/*.ts'",
"Run": "Build 'Source/**/*.ts' --Watch",

@@ -52,14 +65,20 @@ "prepublishOnly": "Build 'Source/**/*.ts'"

## ⚙️ Configuration
### 📜 ESBuild Configuration
Or with a custom ESBuild config file:
Create a custom `ESBuild` configuration file (e.g., `ESBuild.ts`):
`package.json`
```javascript
export default {
minify: true,
sourcemap: true,
// Add other esbuild options here
};
```
```json
{
"scripts": {
"prepublishOnly": "Build 'Source/**/*.ts' --ESBuild ESBuild.ts"
}
}
Use the custom configuration:
```sh
npx @playform/build 'Source/**/*.ts' --ESBuild ESBuild.ts
```

@@ -72,3 +91,3 @@

`tsconfig.json`
Create a `tsconfig.json` file in your project root:

@@ -78,3 +97,5 @@ ```json

"compilerOptions": {
"outDir": "Target"
"outDir": "Target",
"rootDir": "Source",
"strict": true
},

@@ -86,5 +107,5 @@ "extends": "@playform/build/tsconfig",

### JSConfig Configuration (optional)
### 📜 JSConfig Configuration (optional)
`jsconfig.json`
For `JavaScript` projects using `JSDoc` comments, create a `jsconfig.json`:

@@ -94,3 +115,5 @@ ```json

"compilerOptions": {
"outDir": "Target"
"outDir": "Target",
"rootDir": "Source",
"checkJs": true
},

@@ -102,4 +125,17 @@ "extends": "@playform/build/jsconfig",

## 🤝 Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
guidelines and feel free to submit a Pull Request.
## 📄 License
This project is licensed under the MIT [LICENSE](LICENSE).
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for a history of changes to this component.
[ESBuild]: HTTPS://NPMJS.Org/esbuild
[TypeDoc]: HTTPS://NPMJS.Org/typedoc
[Build]: HTTPS://NPMJS.Org/@playform/build
#!/usr/bin/env node
var i=new(await import("commander")).Command().name("Build").version("0.1.3").description("\u{1F300}\u2001Build\u2001\u2014").argument("<File...>","\u{1F4DD}\u2001File\u2001\u2014").option("-ES, --ESBuild <File>","\u{1F4DC}\u2001ESBuild\u2001\u2014").option("-TS, --TypeScript <File>","\u{1F4DC}\u2001TypeScript\u2001\u2014","tsconfig.json").option("-W --Watch","\u{1F441}\uFE0F\u2001Watch\u2001\u2014").action((await import("../Function/Build.js")).default).parse();export{i as default};
var i=new(await import("commander")).Command().name("Build").version("0.1.4").description("\u{1F300}\u2001Build\u2001\u2014").argument("<File...>","\u{1F4DD}\u2001File\u2001\u2014").option("-ES, --ESBuild <File>","\u{1F4DC}\u2001ESBuild\u2001\u2014").option("-TS, --TypeScript <File>","\u{1F4DC}\u2001TypeScript\u2001\u2014","tsconfig.json").option("-W --Watch","\u{1F441}\uFE0F\u2001Watch\u2001\u2014").action((await import("../Function/Build.js")).default).parse();export{i as default};

@@ -1,1 +0,1 @@

var l=async(...[s,e])=>{for(const a of s)for(const p of await(await import("fast-glob")).default(a.replaceAll("'","").replaceAll('"',"")))i.push(p);i.reverse();let t=r((await import("../Variable/ESBuild.js")).default,{entryPoints:Object.fromEntries(i.map(a=>[a.replace("Source/","").split(".").slice(0,-1).join("."),a])),tsconfig:e?.TypeScript??"tsconfig.json"});t=e?.ESBuild?r(t,await(await import("./File.js")).default(e.ESBuild)):t,t.plugins?.push({name:"TypeScript",setup({onEnd:a}){a(async()=>{await o(`tsc -p ${t.tsconfig}`),await o(`tsc-alias -f -p ${t.tsconfig}`)})}}),e?.Watch?await(await(await import("esbuild")).context(t)).watch():console.log(await(await import("esbuild")).analyzeMetafile((await(await import("esbuild")).build(t))?.metafile??"",{verbose:!0}))};const{default:o}=await import("../Function/Exec.js"),{default:r}=await import("../Function/Merge.js"),i=[],n=(await import("url")).fileURLToPath((await import("path")).dirname(import.meta.url));export{n as Current,o as Exec,r as Merge,i as Pipe,l as default};
var c=async(...[s,e])=>{for(const a of s)for(const p of await(await import("fast-glob")).default(a.replaceAll("'","").replaceAll('"',"")))i.push(p);i.reverse();let t=o((await import("../Variable/ESBuild.js")).default,{entryPoints:Object.fromEntries(i.map(a=>[a.replace("Source/","").replace("src/","").split(".").slice(0,-1).join("."),a])),tsconfig:e?.TypeScript??"tsconfig.json"});t=e?.ESBuild?o(t,await(await import("./File.js")).default(e.ESBuild)):t,t.plugins?.push({name:"TypeScript",setup({onEnd:a}){a(async()=>{await r(`tsc -p ${t.tsconfig}`),await r(`tsc-alias -f -p ${t.tsconfig}`)})}}),e?.Watch?await(await(await import("esbuild")).context(t)).watch():console.log(await(await import("esbuild")).analyzeMetafile((await(await import("esbuild")).build(t))?.metafile??"",{verbose:!0}))};const{default:r}=await import("../Function/Exec.js"),{default:o}=await import("../Function/Merge.js"),i=[],l=(await import("url")).fileURLToPath((await import("path")).dirname(import.meta.url));export{l as Current,r as Exec,o as Merge,i as Pipe,c as default};

@@ -20,2 +20,3 @@ {

"exactOptionalPropertyTypes": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,

@@ -22,0 +23,0 @@ "isolatedModules": true,