Skip to content

elhaddajiOtmane/codesource_in_one_file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codesource_in_one_file for (nextjs)

codesource_in_one_file is a powerful tool designed to magically concatenate JavaScript files from various nested directories into a single, unified file. Ideal for projects requiring consolidation of JS scripts for analysis, deployment, or any form of processing where merging JS files becomes necessary. This project leverages Python for scripting and Docker for easy and consistent setup and execution across any environment.

Getting Started

These instructions will get your copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • Python 3.11 or later
  • Docker

Installing

  1. Clone the repository

    git clone https://github.com/elhaddajiotmane/codesource_in_one_file .git
    cd codesource_in_one_file 
  2. Build the Docker image

    Navigate to the project directory and build the Docker image:

    docker build -t codesource_in_one_file  .
  3. Run the container

    With the Docker image built, you can now run the container. Adjust the volume paths to match your project structure:

    docker run -e START_PATH=/data -e OUTPUT_FILE_PATH=/data/combined.js -v <path/to/your/js/files>:/data codesource_in_one_file 

Usage

The primary function of codesource_in_one_file is to search through a specified directory for JavaScript files, concatenating their contents into a single file. This is particularly useful for preparing scripts for certain types of deployment or analysis.

To customize the paths and behavior, modify the environment variables START_PATH and OUTPUT_FILE_PATH in the Docker run command accordingly.

Built With

  • Python - The scripting language used.
  • Docker - Containerization platform.

Contributing

Please read [CONTRIBUTING.md](https://github.com/elhaddajiotmane/codesource_in_one_file /CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

Authors

See also the list of [contributors](https://github.com/elhaddajiotmane/codesource_in_one_file /contributors) who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages