Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/hold-baby/source-export
- Owner: hold-baby
- License: mit
- Created: 2020-12-21T03:01:14.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-29T05:53:21.000Z (almost 4 years ago)
- Last Synced: 2024-10-03T06:09:48.836Z (about 2 months ago)
- Language: TypeScript
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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"
```