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

dist-bundler

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dist-bundler

Combines built code in a directory to a single .js file.

  • 0.5.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Build and test

dist-bundler

Combines built code in a directory to a single .js file.

Installing

npm install --save-dev dist-bundler

Building and testing

This tool is built with typescript. In order to create a build run:

npm run build

This will clean up and create a new build in build/. The command also copies relevant resources into the build/ folder.

When developing you can run the watch command in order to continously build the project when code is changed:

npm run watch

In order to run tests the project needs to be built, then you can run the test command:

npm test

Usage

When run the tool will dig through all files and sub folders in a given directory and combine all .js and .css files into a single .js file which loads all relevant files from a generated folder with scripts. The structure will look like this:

build/
├─ static/
│  ├─ some-styling.css
│  ├─ some-javascript.js
│  ├─ some-polyfill.js
├─ boot.js

Configuration of where files will be collected from and where they will be outputted can be set in ./config.json. The default configuration looks like this:

{
  "copyTasks": {
    "js": {
      "source": "dist/js/",
      "target": "js/"
    },
    "styles": {
      "source": "dist/styles/",
      "target": "styles/"
    }
  },
  "outputFolder": "build/"
}

copyTasks: Defines where to copy files from.

  • js: Defines source and target directory for .js files.
  • css: Defines source and target directory for .css files. outputFolder: Where the resulting files should be put.

FAQs

Package last updated on 17 Jan 2022

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