Commit Graph

369 Commits

Author SHA1 Message Date
Tom Robinson 562acca036 Fixes stylesheet <links> being discarded when used with "inject: 'head'". 2015-07-29 11:23:10 -07:00
Jan Nicklas df09669ef5 Merge pull request #70 from mateatslc/master
Bump project dependencies
2015-07-16 16:04:21 +02:00
Mate Olah d2f767176c Bump project dependencies. 2015-07-16 15:43:27 +02:00
Jan Nicklas 89af128acf Merge pull request #69 from shprink/patch-1
Adding the file size to the chunk object
2015-07-13 11:59:23 +02:00
Julien Renaux dfb4f57179 Adding the file size to the chunk object
As far as I know, getting the file size within the template is not possible.

The file size is important in my case in order to have a progress loader via http request so I can do somehting like that:

```
function ajax(url, onProgress, callback, data, x) {
            try {
                x = new(this.XMLHttpRequest || ActiveXObject)('MSXML2.XMLHTTP.3.0');
                x.open(data ? 'POST' : 'GET', url, 1);
                x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
                x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
                x.onreadystatechange = function() {
                    x.readyState > 3 && callback && callback(x.responseText, x);
                };
                x.addEventListener("progress", onProgress, false);
                x.send(data)
            } catch (e) {
                window.console && console.log(e);
            }
        };

        function onLoad(responseText) {
            var script = document.createElement('script');
            script.setAttribute('type', 'text/javascript');
            if (script.text) {
                script.text = content; // IE
            } else {
                script.appendChild(document.createTextNode(responseText));
            }
            document.getElementsByTagName('head')[0].appendChild(script);
            document.getElementById('appLoader').className = 'finished';
        }

        function onProgress(e) {
            var progress = Math.floor((e.loaded / {%=o.htmlWebpackPlugin.files.chunks.main.size %} || 0) * 100);
            document.getElementById('appLoader').setAttribute("value", progress);
            document.getElementById('appLoaderPercent').innerText = document.createTextNode(progress).textContent;
        }

        ajax('./{%=o.htmlWebpackPlugin.files.chunks.main.entry %}', onProgress, onLoad);
```
2015-07-13 11:43:18 +02:00
Jan Nicklas c630d339c6 Bump version 2015-07-08 11:27:09 +02:00
Jan Nicklas cdd563e5af Merge pull request #66 from cesarandreu/patch-1
Fix example template
2015-06-30 08:57:42 +02:00
Cesar Andreu 7200791f3b Fix example template 2015-06-29 18:30:21 -07:00
Jan Nicklas 55b530ba3f Support placing templates in subfolders 2015-06-29 15:57:18 +02:00
Jan Nicklas 266d8e2325 Merge pull request #62 from oliviertassinari/async
[async] make sure the async chunks aren't included in the html
2015-06-15 23:38:07 +02:00
Olivier Tassinari 0d727cc23e [async] make sure the async chunks aren't included in the html 2015-06-15 20:30:42 +01:00
Jan Nicklas 1f5b357159 Update lodash 2015-06-12 19:02:43 +02:00
Jan Nicklas 284067cc1d Bump version for patch 2015-06-10 23:41:13 +02:00
Jan Nicklas 43aa8a3984 Merge pull request #57 from relayfoods/master
Fix existing manifest regex test
2015-06-10 23:07:45 +02:00
Chip Lay f5842d609e Better <html> regex for minified html strings 2015-06-10 10:06:43 -04:00
Chip Lay 82ef236cb1 Fix existing manifest regex test 2015-06-10 09:27:38 -04:00
Jan Nicklas 50651d946b Update README.md 2015-06-10 14:21:27 +02:00
Jan Nicklas 73a61a94e9 More verbose warning 2015-06-09 09:42:20 +02:00
Jan Nicklas f210b46b84 Extend template example in readme 2015-06-05 09:08:43 +02:00
Jan Nicklas f186c9a0b2 Bump version 2015-06-01 11:25:05 +02:00
Jan Nicklas 92373eea55 Merge pull request #49 from ampedandwired/feature/inject-head
Allow to inject javascript files into the head of the html page
2015-06-01 12:23:54 +03:00
Jan Nicklas 6219714fc7 Allow to inject javascript files into the head of the html page 2015-06-01 11:19:45 +02:00
Jan Nicklas 9036c15b97 Merge pull request #48 from cgreening/patch-1
Change assets deprecation from error to warning
2015-06-01 10:55:58 +03:00
chris.greening 9557db2db0 Modifies unit tests to support expecting warnings 2015-05-31 14:32:07 +01:00
Chris e5a210c60d Change assets deprecation from error to warning 2015-05-26 13:07:30 +01:00
Jan Nicklas 3a834f47bb Merge pull request #46 from SimenB/pretest
Use pretest
2015-05-24 08:45:47 +02:00
Simen Bekkhus 4b9589f55f Use pretest 2015-05-23 19:15:16 +02:00
Jan Nicklas 9d90d37adc Merge pull request #45 from cgreening/patch-1
Fixes error reporting
2015-05-21 19:29:39 +02:00
Chris 8646d911d0 Fixes error reporting
Fixes error reporting so that instead of:

Error in undefined

We get:

Error in HtmlWebPackPlugin: htmlWebpackPlugin.assets is deprecated - please use htmlWebpackPlugin.files instead
2015-05-21 17:35:37 +01:00
Jan Nicklas ae6cfdb090 Merge pull request #43 from kennyt/patch-2
Fix typo in index.js
2015-05-19 21:47:30 +02:00
Jan Nicklas 975753a97b Merge pull request #42 from kennyt/patch-1
Add s to return in comment
2015-05-19 21:47:20 +02:00
Kenny Tran d861441014 Update index.js 2015-05-19 08:04:02 -07:00
Kenny Tran 64752a6b5e Update index.js 2015-05-19 08:03:14 -07:00
Jan Nicklas 025d77009a Add travis badge 2015-05-18 16:02:30 +02:00
Jan Nicklas 44e30ac31c Add travis configuration 2015-05-18 15:53:36 +02:00
Jan Nicklas 3db6355e4b Align badges in readme 2015-05-18 14:01:32 +02:00
Jan Nicklas cc6323a383 Add node version to readme 2015-05-18 13:59:59 +02:00
Charles Blaxland c679de975b Merge pull request #37 from ampedandwired/1.4.0
1.4.0
2015-05-18 21:46:44 +10:00
Jan Nicklas ce279debd5 Deprecate htmlWebpackPlugin.assets 2015-05-17 20:02:57 +02:00
Jan Nicklas 3428698e54 Fix typo in readme 2015-05-16 14:57:11 +02:00
Jan Nicklas 1edfaa8e42 Update docs 2015-05-12 23:14:52 +02:00
Jan Nicklas 5043ac0712 Update documentation 2015-05-12 22:58:43 +02:00
Sebastien Barre 8b97335192 Add support for minification using html-minifier 2015-05-12 22:56:51 +02:00
Jan Nicklas 26b9f28937 Add promises - add test for missing favicon 2015-05-12 22:55:06 +02:00
Jan Nicklas 80d141d8c2 Refactor favicon 2015-05-11 23:29:11 +02:00
Simen Bekkhus 5771dac3c9 Add support for favicon and apple-touch-icon
Fixes #28
2015-05-11 08:27:19 +02:00
Jan Nicklas 66c2dac91b Merge pull request #34 from SimenB/files-package.json
Use files in package.json
2015-05-09 09:49:53 +02:00
Simen Bekkhus c85de472e2 Use files in package.json 2015-05-09 09:46:17 +02:00
Jan Nicklas 7dd5f6ad1a Merge pull request #33 from SimenB/editorconfig
Add .editorconfig
2015-05-09 09:39:14 +02:00
Simen Bekkhus 81986ef0e0 Add .editorconfig 2015-05-08 19:41:54 +02:00