<commit_before># [mithril-components] (https://github.com/eddyystop/mithril-components)

Components, mixins, patterns and code for
[mithril] (https://github.com/lhorie/mithril.js).

## Installation
```sh
bower install git://github.com/eddyystop/mithril-components
```

## Running examples

Many examples may be run without the server. Just run the HTML file.

Others require the node.js server.
You can install it from ```http://nodejs.org/```.
Then load the this repo's dependencies with ```npm install```.

Start the server with ```node app.js``` and point your
browser to ```http://localhost:3000/public/FormMixin.html``` for example. 

## Components
Component ```tableResponsive``` resides in ```components/tableResponsive/```.
Docs are in the ```readme```.
You may extract the files you need with a build tool,
or you may use the front-end packaging tool
[component] (https://github.com/component/component).

A working example, if any, is located at ```public/tableResponsive.html```.

### UI Components

- ```table``` - Simple table.
- ```select``` - Simple select.
- ```select2``` - [Select replacement.] (https://github.com/ivaynberg/select2) 
Supports searching, remote data, and infinite scrolling. jQuery based.
- ```tableResponsive``` - Responsive table.
- ```imageResponsive``` - [Responsive image polyfill] 
(https://github.com/scottjehl/picturefill)  for < picture > and more.

## Mixins
Mixin ```ValidationMixin``` resides in ```mixins/ValidationMixins/```.
Docs are in the ```readme```.
A working example, if any, is located at ```public/ValidationMixin.html```.

- ```mixins/Solder.js``` - A simple dependency injector for mixins. 
Mixin extension is supported.
- ```Solder-extend``` - Extending a mixin with new features.
- ```ValidationMixin``` - A validator for the controller.
- ```FormMixin``` - Adds support for forms, with or without a <form>.
Requires the server.

## Patterns
Pattern ```seo-by-cleanup``` resides in ```patterns/seo-by-cleanup.js``` .
A working example, if any, is located at ```public/seo-by-cleanup.html```

### Basic

- ```service-error-handling``` - Handle web-server and app errors

### SEO / server rendered first page

- ```seo-by-noscript``` - Server serves SEO the first page within a noscript tag.
- ```seo-by-cleanup``` - Remove server generated DOM so Mithril can re-render the first page.
- One [Proof of concept] (https://github.com/lhorie/mithril.js/issues/60#issuecomment-41177111)
for Mithril itself to handle this efficiently.
- A different [Proof of concept] (https://groups.google.com/forum/#!topic/mithriljs/pxpj2MMIRYs)

## Code

### First page loading

- [Script-injected "async scripts" considered harmful] 
(https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/)
- [Mobile Analysis in PageSpeed Insights]
(https://developers.google.com/speed/docs/insights/mobile)
and [Optimizing the Critical Path Rendering]
(https://docs.google.com/presentation/d/1IRHyU7_crIiCjl0Gvue0WY3eY_eYvFQvSfwQouW9368/present#slide=id.p19)
- [Detecting Critical Above-the-fold CSS]
(http://paul.kinlan.me/detecting-critical-above-the-fold-css/)
and [PaulKinlan / criticalcss.html]
(https://gist.github.com/PaulKinlan/6283739),
and [PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js]
(https://gist.github.com/PaulKinlan/6284142)
- [When is a stylesheet really loaded?]
(http://www.phpied.com/when-is-a-stylesheet-really-loaded/),
and [Calculating a selector's specificity]
(http://www.w3.org/TR/CSS21/cascade.html#specificity)
- [eddyystop/first-page-loader]
(https://github.com/eddyystop/first-page-loader)

## License
Copyright (c) 2014 <NAME> (<<EMAIL>>).
Distributed under the MIT license. See LICENSE.md for details.<commit_msg>Fixing README typo<commit_after># [mithril-components] (https://github.com/eddyystop/mithril-components)

Components, mixins, patterns and code for
[mithril] (https://github.com/lhorie/mithril.js).

## Installation
```sh
bower install git://github.com/eddyystop/mithril-components
```

## Running examples

Many examples may be run without the server. Just run the HTML file.

Others require the node.js server.
You can install it from ```http://nodejs.org/```.
Then load the this repo's dependencies with ```npm install```.

Start the server with ```node app.js``` and point your
browser to ```http://localhost:3000/public/FormMixin.html``` for example. 

## Components
Component ```tableResponsive``` resides in ```components/tableResponsive/```.
Docs are in the ```readme```.
You may extract the files you need with a build tool,
or you may use the front-end packaging tool
[component] (https://github.com/component/component).

A working example, if any, is located at ```public/tableResponsive.html```.

### UI Components

- ```table``` - Simple table.
- ```select``` - Simple select.
- ```select2``` - [Select replacement.] (https://github.com/ivaynberg/select2) 
Supports searching, remote data, and infinite scrolling. jQuery based.
- ```tableResponsive``` - Responsive table.
- ```imageResponsive``` - [Responsive image polyfill] 
(https://github.com/scottjehl/picturefill)  for < picture > and more.

## Mixins
Mixin ```ValidationMixin``` resides in ```mixins/ValidationMixins/```.
Docs are in the ```readme```.
A working example, if any, is located at ```public/ValidationMixin.html```.

- ```mixins/Solder.js``` - A simple dependency injector for mixins. 
Mixin extension is supported.
- ```Solder-extend``` - Extending a mixin with new features.
- ```ValidationMixin``` - A validator for the controller.
- ```FormMixin``` - Adds support for forms, with or without a < form >.
Requires the server.

## Patterns
Pattern ```seo-by-cleanup``` resides in ```patterns/seo-by-cleanup.js``` .
A working example, if any, is located at ```public/seo-by-cleanup.html```

### Basic

- ```service-error-handling``` - Handle web-server and app errors

### SEO / server rendered first page

- ```seo-by-noscript``` - Server serves SEO the first page within a noscript tag.
- ```seo-by-cleanup``` - Remove server generated DOM so Mithril can re-render the first page.
- One [Proof of concept] (https://github.com/lhorie/mithril.js/issues/60#issuecomment-41177111)
for Mithril itself to handle this efficiently.
- A different [Proof of concept] (https://groups.google.com/forum/#!topic/mithriljs/pxpj2MMIRYs)

## Code

### First page loading

- [Script-injected "async scripts" considered harmful] 
(https://www.igvita.com/2014/05/20/script-injected-async-scripts-considered-harmful/)
- [Mobile Analysis in PageSpeed Insights]
(https://developers.google.com/speed/docs/insights/mobile)
and [Optimizing the Critical Path Rendering]
(https://docs.google.com/presentation/d/1IRHyU7_crIiCjl0Gvue0WY3eY_eYvFQvSfwQouW9368/present#slide=id.p19)
- [Detecting Critical Above-the-fold CSS]
(http://paul.kinlan.me/detecting-critical-above-the-fold-css/)
and [PaulKinlan / criticalcss.html]
(https://gist.github.com/PaulKinlan/6283739),
and [PaulKinlan / criticalcss-bookmarklet-devtool-snippet.js]
(https://gist.github.com/PaulKinlan/6284142)
- [When is a stylesheet really loaded?]
(http://www.phpied.com/when-is-a-stylesheet-really-loaded/),
and [Calculating a selector's specificity]
(http://www.w3.org/TR/CSS21/cascade.html#specificity)
- [eddyystop/first-page-loader]
(https://github.com/eddyystop/first-page-loader)

## License
Copyright (c) 2014 <NAME> (<<EMAIL>>).
Distributed under the MIT license. See LICENSE.md for details.
{'fraction_non_alphanumeric': 0.15417731736849186, 'fraction_numerical': 0.015337010628279295, 'mean_word_length': 4.636087945413192, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 26, 'lorem ipsum': 0, 'www.': 6, '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': '1474968', 'n_tokens_mistral': 2546, 'n_tokens_neox': 2425, 'n_words': 661}