<commit_before># gulp-inject-stringified-html

> Gulp Plugin to inject HTML templates into Javascript files.


## Why?

When building single page web applications (SPAs), the `View` logic needs to know the "template" to be rendered.  

For example, when using [AngularJS Directives](https://docs.angularjs.org/guide/directive), either a `template` or `templateUrl` property can be given so the directive knows what html to render when compiled.  

**_Pain Points_** with _Directives_ and _Templates_: 

1. **BAD** - `templateUrl` creates dependency between View logic and template's URL location
2. **UGLY** - `template` forces developer to manually escape html string _(tedious, unreadable)_

In a perfect world... 

+ Templates should be readable.
+ View logic should be _orthogonal_ to template URL location.

A Solution...

+ **GOOD** - embed template in View logic at build time _(automation! DRY!)_.

The `gulp-inject-stringified-html` gulp plugin does just that!!


## Usage
<commit_msg>Add smilee<commit_after># gulp-inject-stringified-html

> Gulp Plugin to inject HTML templates into Javascript files.


## Why?

When building single page web applications (SPAs), the `View` logic needs to know the "template" to be rendered.  

For example, when using [AngularJS Directives](https://docs.angularjs.org/guide/directive), either a `template` or `templateUrl` property can be given so the directive knows what html to render when compiled.  

**_Pain Points_** with _Directives_ and _Templates_: 

1. **BAD** - `templateUrl` creates dependency between View logic and template's URL location
2. **UGLY** - `template` forces developer to manually escape html string _(tedious, unreadable)_

In a perfect world... 

+ Templates should be readable.
+ View logic should be _orthogonal_ to template URL location.

A Solution...

+ **GOOD** - embed template in View logic at build time _(automation! DRY!)_.

The `gulp-inject-stringified-html` gulp plugin does just that :)


## Usage

{'fraction_non_alphanumeric': 0.09365558912386707, 'fraction_numerical': 0.002014098690835851, 'mean_word_length': 4.443835616438356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '586125', 'n_tokens_mistral': 577, 'n_tokens_neox': 542, 'n_words': 247}