Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@degulabs/build

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@degulabs/build

Run your build scripts in parallel, showing their output nicely.

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple Build

Run your build scripts in parallel, showing their output nicely.

To engage with the system, create a build.mjs script that builds the whole project.

The script must also have a default export that describes watching capabilities.

A simple script looks like this:

#!/usr/bin/env node

import path from 'path';
import { fileURLToPath } from 'url';
import { execSync } from 'child_process';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default {
  // Watch for modifications in this folder to trigger re-build.
  watch: [ __dirname ],
  // custom name for the project
  name: 'foo',
};

// Run build only when executed directly, not imported.
if (import.meta.url === `file://${process.argv[1]}`) build().catch(e => process.exit(1));

// Do your build here.
async function build() {
  console.time('build');
  const command = process.env.FORCE_COLORS ?
    'npx tsc --pretty -p .' :
    'npx tsc -p .'
  ;
  console.log('Running TSC...');
  execSync(command, {
    stdio: 'inherit',
    cwd: __dirname,
  });
  console.timeEnd('build');
}

FAQs

Package last updated on 06 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc