rammer
v1.0.1
Published
npm module
Downloads
7
Readme
Rammer
A command-line tool that allows you to put an entire folder into a single class file and retrieve the contents of each file using the get method.
Usage
to TS
$ npx rammer --type-ts ./example ./example.ts
to JS
$ npx rammer --type-js ./example ./example.js
to txt
$ npx rammer --type-txt ./example ./example.txt
example
Before
example
├── floor
│ └── floor.tpl
└── sample.tpl
Execute
$ npx rammer@latest --type-ts ./example after-sample.ts
Will be able to load
import { AfterSample } from "./after-sample";
// Get the contents of the original file.
// Argument types are limited to file names.
const res = AfterSample.get('floor/floor.tpl');
unrammer
You can also simply restore the files. However, it is limited to text files converted by the "--type-txt" option.
Restoration command sample
$ npm rammer@latest --decode ./example.txt ./newly