Socket
Book a DemoInstallSign in
Socket

@theforeman/builder

Package Overview
Dependencies
Maintainers
2
Versions
191
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theforeman/builder

Build production and development bundle files for foreman core and plugins.

15.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1.1K
-10.57%
Maintainers
2
Weekly downloads
 
Created
Source

@theforeman/builder

Build production and development bundle files for foreman core and plugins.

Package Version Downloads Status Build Status: Linux PRs Welcome code style: prettier

This package doesn't contain any implementation yet and only act as a skeleton and as the general design

What you get with this project

  • @theforeman/builder/babel - Adds theforeman babel production configuration to your project
  • tfm-builder-install - Install the @theforeman/builder to your project.
  • tfm-build - Run it to build foreman or a foreman plugin.
  • tfm-builder-analyze - Run it to analyze your build content.
  • tfm-dev-server - Run a development server so your code will get build and served locally with a live-reload feature.

Installation

npm install --save-dev @theforeman/builder

Option 1 - Run the installation script

tfm-builder-install
# answer the questions

Option 2 - Install manually

  • Create a .babelrc.js file in your project root with the following content.
module.exports = {
  presets: ['@theforeman/builder/babel'],
};

@theforeman/builder/babel will automatically load @theforeman/env/babel for none production environments.

  • Create a config/tfm-builder.config.js file with the following content:
module.exports = {
  // set your javascript entry points
  entry: {
    'my-plugin': 'webpack/assets/myPlugin.js',
    'my-plugin-fills': 'webpack/assets/myPluginFills.js',
  },
  // set your output path
  outputPath: 'public/webpack',
  // if using in foreman core (won't work for plugins)
  // set a devServer
  devServer: {
    port: '3808',
    host: process.env.BIND || 'localhost',
  }
};

  • Add build scripts to your package.json
{
  "scripts": {
    "build": "tfm-build config/tfm-builder.config.js",
    "build-analyze": "tfm-builder-analyze config/tfm-builder.config.js",
    "dev-server": "tfm-dev-server config/tfm-builder.config.js"
  }
}

Contributing

Please checkout the contributing.md, the roadmap.md and the open issues.

FAQs

Package last updated on 17 Mar 2025

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.