All Projects → chenjiahan → template-string-optimize-loader

chenjiahan / template-string-optimize-loader

Licence: MIT license
template string optimize loader module for webpack

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to template-string-optimize-loader

Babel Plugin Optimize Clsx
Babel plugin to optimize the use of clsx, classnames, and other libraries with a compatible API
Stars: ✭ 80 (+433.33%)
Mutual labels:  optimize
camunda-cloud-helm
Camunda Platform 8 Self-Managed Helm charts
Stars: ✭ 41 (+173.33%)
Mutual labels:  optimize
fedora-post-install-script
A Fedora GNOME post-install script
Stars: ✭ 28 (+86.67%)
Mutual labels:  optimize
Wp Sweep
WP-Sweep allows you to clean up unused, orphaned and duplicated data in your WordPress. It also optimizes your database tables.
Stars: ✭ 125 (+733.33%)
Mutual labels:  optimize
Threejs Sandbox
Set of experiments and extensions to THREE.js.
Stars: ✭ 163 (+986.67%)
Mutual labels:  optimize
frontend-starter-kit-with-gulp
Frontend Starter Kit with Gulp for either Themeforest Projects or customizable projects.
Stars: ✭ 34 (+126.67%)
Mutual labels:  optimize
Grunt Amdcheck
Uses AST to find and remove unused dependencies in AMD modules.
Stars: ✭ 41 (+173.33%)
Mutual labels:  optimize
nr1-cloud-optimize
NR1 Cloud Optimize allows you to Identify right-sizing opportunities and potential savings of your AWS, GCP, and Azure instances across your cloud environment.
Stars: ✭ 38 (+153.33%)
Mutual labels:  optimize
ipx
High performance, secure and easy to use image proxy based on Sharp and libvips.
Stars: ✭ 683 (+4453.33%)
Mutual labels:  optimize
hexo-filter-optimize
A Hexo plugin that optimize the pages loading speed.
Stars: ✭ 41 (+173.33%)
Mutual labels:  optimize
Unityurp Billboardlensflareshader
(1)Add a new Quad GameObject (2)Use this shader (3)Done! Now you have billboard lens flare shader for URP!
Stars: ✭ 140 (+833.33%)
Mutual labels:  optimize
D Optimizer
Make Dota 2 fps great again
Stars: ✭ 161 (+973.33%)
Mutual labels:  optimize
hpc
Learning and practice of high performance computing (CUDA, Vulkan, OpenCL, OpenMP, TBB, SSE/AVX, NEON, MPI, coroutines, etc. )
Stars: ✭ 39 (+160%)
Mutual labels:  optimize
Micro Profiler
Cross-platform low-footprint realtime C/C++ Profiler
Stars: ✭ 123 (+720%)
Mutual labels:  optimize
TradingView-Machine-Learning-GUI
Let Python optimize the best stop loss and take profits for your TradingView strategy.
Stars: ✭ 396 (+2540%)
Mutual labels:  optimize
Win10 simplifier
Windows 10 Simplifier - A script for automating simplifications and maintenance
Stars: ✭ 80 (+433.33%)
Mutual labels:  optimize
webpack-json-access-optimizer
Webpack plugin to tree-shake and minify JSON modules
Stars: ✭ 34 (+126.67%)
Mutual labels:  optimize
icon-pipeline
🚚 SVG icon pipeline - Optimize icons & build SVG sprites
Stars: ✭ 43 (+186.67%)
Mutual labels:  optimize
image-optimizer
Image optimization using PHP
Stars: ✭ 28 (+86.67%)
Mutual labels:  optimize
sqle
SQLE is a SQL audit platform | SQLE 是一个支持多场景,原生支持 MySQL 审核且数据库类型可扩展的 SQL 审核工具
Stars: ✭ 731 (+4773.33%)
Mutual labels:  optimize

template-string-optimize-loader

template string optimize loader module for webpack

Installation

npm i template-string-optimize-loader -D

Usage

module: {
    rules: [
        {
            test: /\.js$/,
            use: [
                'template-string-optimize-loader',
                'babel-loader'
            ]
        }
    ]
}

Example

// ES6 template string HTML
const template = data => `
    <!-- section start -->
    <section>
        <h3>${data.title}</h3>
        <div>${data.date}</div>
        <dl>
            <dt>Coffee</dt>
            <dt>Black hot drink</dt>
            <dt>Milk</dt>
            <dd>
                <ul>
                    ${data.list.map((item) => `
                        <li>${item}</li>
                    `).join('')}
                </ul>
            </dd>
        </dl>
    </section>
    <!-- section end -->
`;
// source => babel
var template = function template(data) {
    return '\n    <!-- section start -->\n    <section>\n        <h3>' + data.title + '</h3>\n        <div>' + data.date + '</div>\n        <dl>\n            <dt>Coffee</dt>\n            <dt>Black hot drink</dt>\n            <dt>Milk</dt>\n            <dd>\n                <ul>\n                    ' + data.list.map(function (item) {
        return '\n                        <li>' + item + '</li>\n                    ';
    }).join('') + '\n                </ul>\n            </dd>\n        </dl>\n    </section>\n    <!-- section end -->\n';
};
// source => babel => template-string-optimize
var template = function template(data) {
    return '<section><h3>' + data.title + '</h3><div>' + data.date + '</div><dl><dt>Coffee</dt><dt>Black hot drink</dt><dt>Milk</dt><dd><ul>' + data.list.map(function (item) {
        return '<li>' + item + '</li>';
    }).join('') + '</ul></dd></dl></section>';
};
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].