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

buildm

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

buildm

Create build files for your app directly

  • 3.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Build Manager

Create build files for your app directly

npm version License GitHub issues GitHub stars GitHub forks

Build Manager is a powerful tool designed to facilitate the creation of a build file for your application. With this tool, you can effortlessly minify your JavaScript, CSS, and HTML files, streamlining the optimization process for enhanced performance and security.

Features

  • Open Source: Build Manager is open source, which means you have the freedom to modify it according to your preferences.
  • Easy to Use: Build Manager offers a straightforward API for managing data.
  • Customization: Easily configure build settings to fit your requirements.
  • Security: Build Manager prioritizes data security to safeguard your information during access and storage.
  • Lightweight: Build Manager is lightweight and lightning-fast. It has been optimized to deliver maximum speed and efficiency.

Supported Files

HTML CSS JavaScript

Installation

You can install Build Manager via NPM:

npm install -g buildm --save-dev

Usage

CLI

You can build specified files:

buildm --build public/index.html public/assets/main.css public/assets/main.js

You can build all files within a folder:

buildm --b public

You can relocate the target folder or files to a different path and proceed to build them:

mkdir buildm && cp public buildm && buildm --b buildm/public

Module

Using modules, you can create custom configurations for files:

// Importing the 'buildFolderAndFiles' function from the 'buildm' module
const { buildFolderAndFiles } = require('buildm');

// Configuration object specifying build options
const buildConfig = {
    options: {
        log: true
    },
    files: {
        js: {
            expression: false
        },
        css: {
            colors: {
                opacity: true
            }
        },
        html: {
            collapseWhitespace: true,
            removeComments: true
        }
    }
};

// Building specific files with the provided configuration
buildFolderAndFiles('public/index.html', buildConfig);
buildFolderAndFiles('public/styles/style.css', buildConfig);
buildFolderAndFiles('public/scripts/script.js', buildConfig);

// Building all files within the 'public' folder using the same configuration
buildFolderAndFiles('public', buildConfig);

Configuration

You can access a comprehensive list of configurations for minifying through the following links:

  • JS: Build Manager uses the UglifyJS 3 configuration to minify JS files.
  • CSS: Build Manager uses the Clean CSS configuration to minify CSS files.
  • HTML: Build Manager uses the HTML Minifier configuration to minify HTML files.

Default Configuration

Here is the default configuration for Build Manager:

{
    "build": {
        "options": {
            "log": true
        },
        "files": {
            "js": {},
            "css": {},
            "html": {
                "minifyJS": true,
                "minifyCSS": true,
                "minifyURLs": true,
                "sortClassName": true,
                "caseSensitive": true,
                "decodeEntities": true,
                "sortAttributes": true,
                "removeComments": true,
                "useShortDoctype": true,
                "keepClosingSlash": true,
                "collapseWhitespace": true,
                "removeAttributeQuotes": true,
                "collapseBooleanAttributes": true,
                "removeScriptTypeAttributes": true,
                "collapseInlineTagWhitespace": true,
                "removeStyleLinkTypeAttributes": true
            }
        }
    }
}

Keywords

FAQs

Package last updated on 16 Jan 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