Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hold-baby/source-export

export source in one file
https://github.com/hold-baby/source-export

Last synced: about 1 month ago
JSON representation

export source in one file

Awesome Lists containing this project

README

        

# source-export
export source in one file

### Install
```
npm i source-export -g
```
### In cmd
```
Usage: exp [options]
Options:
-v output the version number
-i, --input input files dir
-o, --output output filename
--img image type
-h, --help display help for command
```
### In script
```javascript
import { genImage } from "source-export"
import { resolve } from "path"

genImage({
input: resolve(__dirname, sourceDir),
output: resolve(__dirname, outputPath)
})
```
### Example
source dir
+ source/dog.jpg
```javascript
genImage({
input: resolve(__dirname, "./source"),
output: resolve(__dirname, "index.js")
})
```
use
```javascript
import { ImgDog } from "./index"
```