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 - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

3

build/config.js

@@ -21,5 +21,2 @@ "use strict";

outputFolder: "build/",
infoJSON: {
disabled: false,
},
};

@@ -26,0 +23,0 @@ const readConfig = (path) => {

@@ -35,5 +35,4 @@ "use strict";

...customConfig,
infoJSON: config_1.defaultConfig.infoJSON,
outputFolder: config_1.defaultConfig.outputFolder,
});
});

4

package.json
{
"name": "dist-bundler",
"version": "0.4.0",
"description": "Combines buildt code in a directory to a single .js file.",
"version": "0.4.1",
"description": "Combines built code in a directory to a single .js file.",
"bin": {

@@ -6,0 +6,0 @@ "dist-bundler": "build/index.js"

# dist-bundler
Combines buildt code in a directory to a single .js file
Combines built code in a directory to a single .js file.
## Installing
```shell
npm install --save-dev dist-bundler
```
## Building and testing
This tool is built with typescript. In order to create a build run:
```shell
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:
```shell
npm run watch
```
In order to run tests the project needs to be built, then you can run the test command:
```shell
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:
```json
{
"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.

@@ -34,5 +34,4 @@ import test from "ava";

...customConfig,
infoJSON: defaultConfig.infoJSON,
outputFolder: defaultConfig.outputFolder,
});
});

@@ -10,5 +10,2 @@ import { existsSync, readFileSync } from "fs-extra";

outputFolder?: string;
infoJSON?: {
disabled: boolean;
};
};

@@ -33,5 +30,2 @@

outputFolder: "build/",
infoJSON: {
disabled: false,
},
};

@@ -38,0 +32,0 @@

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