1.0.7 • Published 4 years ago
simple-file-bundler v1.0.7
Simple file bundler
The easiest way to merge files into bundles using a single command
How to install
npm i simple-file-bundler
How to configure
To work, you need to create a configuration file simple-file-bundle.config.js
in the root of the project.
This file should export an array of settings, just as in the example
module.exports = [
{
prefix: __dirname,
endpoint: 'dist/style.bundle.css',
files: [
'src/style1.css',
'src/style2.css',
'src/style3.css'
]
},
{
prefix: __dirname,
endpoint: 'dist/scripts.js',
files: [
'src/index.js',
'src/superScript.js'
],
separator: '\n'
}
];
Each setting is an object with 4 fields.
prefix
- prefix that is assigned to all files and endpointendpoint
- file to merge files intofiles
- list of files for combining themseparator
(optional field) - a line that separates between files. The default is\n
How to use
You need to enter the console npx create-bundles