Remy Sharp
ba36b8216b
fix: update deps (out of vuln range)
2016-07-31 15:38:46 +01:00
Remy Sharp
0ddff8886f
fix: local content should use fs for inlining
...
The issue here was that although the "simple" detection was in place if the URL looked like HTML (i.e. has an angle bracket in it), but it didn't ever set the `isFile` flag.
This fix corrects this, but also swallows ENOENT errors, to mirror >=400 response codes being swallowed (i.e. return an empty body).
Fixes #89
2016-04-20 21:42:48 +01:00
Remy Sharp
32b9ba57ad
feat: enhance and clean -v output
2016-04-19 11:10:19 +01:00
Remy Sharp
7459b98ef8
chore: add pre-commit hooks
2016-04-01 13:30:11 +01:00
Remy Sharp
378542d478
fix: move tap-only to devdeps
...
Fixes #92
2016-04-01 13:23:49 +01:00
Remy Sharp
c0a632b24b
test: improve coverage
2016-02-28 09:51:10 +00:00
Remy Sharp
9904b6b334
feat: compress SVG using SVGO
...
Fixes #58
Compresses inline SVG using SVGO, and compresses CSS background SVG images by making them data URLs (using text/svg+xml mime).
Adds CLI (and lib) option: --nosvg which avoids using SVGO for compression (as it can on occassion mess up).
Also includes a refactor of the code to organise the files a little better (allowing for further inlined elements to be added).
2015-08-26 22:43:40 +01:00
Remy Sharp
bf1860271f
feat: detect encoding
...
Using charset and jschardet allows us to detect the encoding, whilst still supporting allowing the user to override.
Technique via: http://stackoverflow.com/questions/12326688/node-js-scrape-encoding/18712021#18712021
Fixes #60
2015-08-23 22:43:14 +01:00
Manolis Stamatogiannakis
715678cfaa
feat: allow user to specific encoding
...
Support for manually specifying the source encoding using iconv-lite to convert to utf-8 from the specified encoding.
2015-08-23 22:41:55 +01:00
Manolis Stamatogiannakis
f720629d0d
refactor: use minimist for argument parsing
...
Allows for optional flags as well as bools
2015-08-23 22:41:25 +01:00
Remy Sharp
01037594f7
chore: add semantic release
...
Woot
2015-07-28 13:53:08 +01:00
Remy Sharp
aace364794
test: put jscs as part of tests
...
Because, yes, I'd like a consistent code style!
2015-07-28 13:40:09 +01:00
Remy Sharp
c8e4cab6ca
test: simplify assets in tests
2015-07-28 10:48:29 +01:00
Remy Sharp
348f8a3199
test: include external import test
...
And contributing file for others to see how to file issues
2015-07-28 10:21:18 +01:00
Remy Sharp
eb35f18577
1.0.1
2015-07-28 07:13:19 +01:00
Remy Sharp
6653796461
test: add full tests
2015-07-27 22:13:21 +01:00
Remy Sharp
96ac1b7ac8
fix: background images in CSS
2015-07-27 14:54:46 +01:00
Remy Sharp
d6d13c83e4
fix: use own cli parser
...
minimist was eating the args after the flags, like `inliner -d <url>` was becoming `debug=<url>`, so I've added my own simple implementation that works well enough.
2015-07-27 13:22:12 +01:00
Remy Sharp
16944df764
refactor: HTML pulling down, events, images
2015-07-26 16:44:49 +01:00
Remy Sharp
c940480c48
0.1.16
2015-07-24 21:29:19 +01:00
Remy Sharp
2343fb5fdd
0.1.15
2015-07-24 21:29:19 +01:00
Jonathan Palardy
7ef02df8d9
Update package.json
...
jsdom wasn't working on "latest" (0.7.0), so I pin it to 0.6.5
2013-07-14 23:53:51 -07:00
Remy Sharp
4f1af5c7d6
error handling for a) missing body in scripts, b) jsdom failing to parse HTML
2012-01-02 09:31:59 +00:00
Remy Sharp
7e30780fe4
fixed exception where comments could not be found
2011-12-31 14:21:09 +00:00
Remy Sharp
229d4f146b
moved to commander for options and fixed up JS parsing errors
2011-12-30 17:43:06 +00:00
Remy Sharp
8a5f50fd0d
bump version
2011-11-29 16:18:51 +00:00
Remy Sharp
a81db9687f
bump version
2011-11-29 16:08:21 +00:00
Remy Sharp
2e76545087
bump
2011-11-06 00:35:43 +00:00
Remy Sharp
801e7ece22
updated package for 0.6 support
2011-11-06 00:34:47 +00:00
remy
e1ae854e67
fixed defaults being overwritten
2011-06-22 18:39:17 +01:00
remy
68a0bc8e88
Fixed style elements with direct descendant selectors being stripped, ie. body > * { foo: bar} was being converted to: body*{foo:bar} - missing '>'.
2011-06-11 17:51:04 +01:00
remy
78204a7f21
Fixed bug where printf control characters were causing JS inlining to break, i.e. console.log('12%d') => 12NaN instead of compressed to 12%d - was affecting people including jQuery minified.
2011-06-11 17:16:08 +01:00
remy
52b8f70a58
Fixed situation where minified inline JavaScript includes a <script> tag - needs to be escaped.
2011-06-11 16:28:59 +01:00
remy
fb9991d679
Forgot CSS images in the no image options
2011-06-11 12:54:08 +01:00
remy
7c9b89f0a9
pre white space now remains intact, inliner executable supports more options on command line - in addition to optionally not base64 encoding images.
2011-06-11 12:41:19 +01:00
remy
1417f2d28e
tweaking package versions
2011-06-11 12:09:50 +01:00
remy
604f5f9cc9
support gzip compression. Closes #8
2011-05-30 01:31:16 +01:00
remy
10fcbea9ca
- fixed requests including query strings
...
- fixed bug with jsdom encountering empty script tag and bombing out (Closes #4 )
- fixed @import in inline style using relative path
- added command line option 'nocompress' to leave whitespace in CSS and HTML (for debugging)
2011-05-29 15:37:52 +01:00
remy
750fc30466
follows location redirects
2011-05-25 17:24:22 +01:00
remy
05619f1d1e
bump
2011-05-25 16:42:54 +01:00
remy
b5b1932c64
add job event to tell you how far along the process is
2011-05-25 16:35:46 +01:00
remy
94a88c09b8
Switch back to online version of jQuery - seems to work when inlining site doesn't have jQuery baked in.
2011-05-25 14:49:59 +01:00
remy
4e03705b2b
typo on compressed css
2011-05-24 10:45:35 +02:00
remy
c9c1993f32
bump for bug fix
2011-05-24 10:22:00 +02:00
remy
5a567f6a34
version bump
2011-05-23 21:14:07 +02:00
remy
a7696dc7b6
reverting back to online jQuery. Closes #7
2011-05-19 20:23:54 +01:00
remy
f79098a310
version bump
2011-05-19 13:46:05 +01:00
remy
698e92b581
version bump
2011-05-16 12:02:36 +01:00
remy
b39f77ba1f
Strip HTML comments, and fixed assets using data:// urls, Closes #3
2011-05-16 11:59:20 +01:00
remy
85b9cbd2da
rejig of directory layout for simplier code, and fixed edge case causing empty output. Closes #5
2011-05-15 22:20:43 +01:00