11 Commits
Author SHA1 Message Date
Daniel Perez Alvarez 2643278d62 Generate size info 2016-01-11 18:07:33 +00:00
Daniel Perez Alvarez 78a11b1de4 Adopt standard style 2015-10-01 17:54:35 +01:00
Izaak Schroeder 8fd2878c85 Switch to eslint.
Cause all the cool kids are using it.
2015-07-05 15:35:26 -07:00
Izaak Schroeder a9b600a236 Fix inconsistent indentation. 2015-07-05 15:11:47 -07:00
Izaak Schroeder 49df3e677f Remove unneeded lodash dependency. 2015-07-05 15:05:55 -07:00
Izaak Schroeder ec4cd1853b Use emit event for generating stats.
Let `webpack` do all the heavy lifting – the stats output is now just another object! The only downside is that the output is always relative to the configured webpack output folder.
2015-07-03 12:12:30 -07:00
Izaak Schroeder 1d38dabe18 Use compiler output filesystem for stats.
Instead of using node's `fs` make use of webpack's `outputFileSystem`. This is useful when using `webpack-dev-server` or similar where assets are served out of memory instead of on-disk. This also means that the async family of file system functions need to be used.

Instead of using the `done` event, use 'after-emit' which is async – there are ups and downs to this. It means that when consumers are listening for the `done` event then the stats file is guaranteed to be available, but also that the generated stats object is  (by default) missing some profiling information and timing. For the majority of people using this plugin to access the asset names this will not be a problem.

Use `mocha` and `chai` instead of `nodeunit` since `chai` has much better error reporting and it unfortunately doesn't seem to work well with `nodeunit`.
2015-07-01 18:40:17 -07:00
Daniel Perez Alvarez bf061c0797 Fix linting issues 2015-06-06 21:17:41 +01:00
Daniel Perez Alvarez fc49f5ebf4 Replace deprecated lodash-node 2015-06-06 21:12:07 +01:00
James Ide 2e7195ff90 Create the directory for the stats file if it doesn't exist
If the directory to your stats file doesn't yet exist, this plugin throws an error. Think it's nicer to create the directiry if needed before writing the stats file.
2015-06-06 01:26:00 -07:00
Daniel Perez Alvarez 3623e66149 Add tests 2015-05-17 12:04:14 +01:00