node-mixer
v0.0.1
Published
Run multiple files at once
Downloads
3
Maintainers
Readme
node-mixer
Introduction
node-mixer
is a Node.js library that allows you to run multiple files at once. It provides a simple way to require and execute multiple files in a single call.
Installation
You can install the library via npm:
npm install node-mixer
Usage
Create your Node.js project and install the
node-mixer
library.Import the
node-mixer
library into your project:
const mixer = require("node-mixer");
- Use the
mixer
function to run multiple files at once:
mixer("./file1.js", "./file2.js", "./file3.js", /* add as many files as you want */);
The mixer
function will require each file specified in the arguments, executing their code in the order they are listed.
Example
Let's say you have three files, file1.js
, file2.js
, and file3.js
, with the following content:
file1.js
console.log("Hello from file1.js");
file2.js
console.log("Hello from file2.js");
file3.js
console.log("Hello from file3.js");
In your main Node.js file, you can use node-mixer
to execute all these files together:
const mixer = require("node-mixer");
mixer("./file1.js", "./file2.js", "./file3.js");
When you run your main file, you will see the following output:
Hello from file1.js
Hello from file2.js
Hello from file3.js
License
This project is licensed under the MIT License.