umd-runtime-templates
v2.0.0
Published
Webpack UMD Runtime Templates
Downloads
8
Readme
umd-runtime-templates
Webpack UMD Runtime Templates
Install
npm i umd-runtime-templates
Usage
const URT = require('umd-runtime-templates');
URT({
//umd name
name: 'my-export-default',
//runtime template name
template: 'export-default-string',
//replacement content
content: 'test-string: export-default-string',
//output file path
output: './scripts/dist/my-export-default.js'
});
see scripts/test.js and scripts/index.html
Templates
|Template|Size|Source| |:-------|---:|:-----| |export-default-string|687.0B|packages/export-default-string/src/index.js| |lz-decompress-json|4.1KB|packages/lz-decompress-json/src/index.js| |lz-decompress-svg|4.8KB|packages/lz-decompress-svg/src/index.js| |module-exports-string|457.0B|packages/module-exports-string/src/index.js|