Remy Sharp
cd6c7230cf
fix: fixed args on cli actually being *read*
...
Not sure how I missed it, but the arguments were never making their way into inliner via the cli, and even when they did, the defaults override the options.
2015-08-23 22:59:20 +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
cf68995f03
test: add tests for specifying encoding
2015-08-23 22:43:02 +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
cb894c8ce9
fix: ignore fragment identifiers on urls
...
Since the cache is keyyed by URL, it makes sense to ignore the hash fragment identifier.
2015-07-30 23:55:09 +01:00
Remy Sharp
c439d79f5a
fix: handles already inlined content
...
Fixes #26
Inliner was trying to resolve and request `data:` urls. Now it checks to see if it's already inlined.
I also updated the whole `.get` method to make smarter use of the caching. Originally the cache is only populated when the request has completed, but if the same image is on the page 20 times, the request would be made 20 times. Now, we cache the promise, so the request is only placed once, and returns a re-usable promise if it's already in progress or resolved.
2015-07-30 23:55:00 +01:00
Remy Sharp
54aae10c43
chore: merge master
...
Merge branch 'collapse-whitespace' of https://github.com/hsablonniere/inliner into hsablonniere-collapse-whitespace
2015-07-29 15:36:30 +01:00
Hubert SABLONNIÈRE
fae14c92c3
fix: keep whitespaces and newlines in pre and textareas
2015-07-29 15:03:15 +02:00
Hubert SABLONNIÈRE
32dfd8ce02
fix: encode binaries properly when requested via HTTP
...
The options parameter { encoding: 'binary' } set in image.js was lost.
It was not used in the main get() function and was not passed the function in get.js.
2015-07-29 14:30:36 +02:00
Remy Sharp
f4fc886b5e
Merge pull request #54 from hsablonniere/etago
...
fix: inline scripts containing ETAGO properly
2015-07-29 06:41:48 +01:00
Hubert SABLONNIÈRE
e20c0bd7bd
fix: inline scripts containing ETAGO properly
...
The fix is done by escaping all "</script" to "<\/script" according to Mathias Bynens article :
https://mathiasbynens.be/notes/etago
2015-07-29 03:05:06 +02:00
Remy Sharp
5647244ef5
Merge pull request #53 from hsablonniere/treat-styles-and-scripts-as-text
...
fix: treat styles and scripts as text
2015-07-28 20:35:44 +01:00
Hubert SABLONNIÈRE
214f698f95
fix: prevent signs like "<" or ">" to be treated as HTML in styles
2015-07-28 17:47:45 +02:00
Hubert SABLONNIÈRE
4e7acd39bb
fix: prevent signs like "<" or ">" to be treated as HTML in scripts
2015-07-28 17:36:00 +02:00
Remy Sharp
593a2749cf
fix: file based scripts
...
Parser was getting a buffer, so it needed to be coersed to a string.
Fixes #52
2015-07-28 14:49:10 +01:00
Remy Sharp
0590ce4a3b
chore: merge master
2015-07-28 14:43:40 +01:00
Guillaume Girou
f89ed538f5
test: local js script not minified
...
Fail to uglify local js script with TypeError: undefined is not a function
2015-07-28 15:24:17 +02: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
27d9e8e8b0
chore: remove .gitmodules
...
No longer used. [skip ci]
2015-07-28 11:36:47 +01:00
Remy Sharp
ac1ca3deb9
docs: show how to test a single fixture
2015-07-28 10:49:18 +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
22ee5dff26
test: drop travis 0.8 test
...
Keeps doing a socket hang up because the jQuery UI test is taking too long, and since it's latest-2, I'm happy not to have visibility. It works, I'm happy with that.
2015-07-28 07:17:42 +01:00
Remy Sharp
eb35f18577
1.0.1
2015-07-28 07:13:19 +01:00
Remy Sharp
06c8132aa3
fix: minified scripts being removed
...
Also add test
2015-07-28 07:12:46 +01:00
Remy Sharp
a0f685a906
docs: tidy up some text
2015-07-27 22:46:04 +01:00
Remy Sharp
e1d8dcc84c
docs: add travis badge
...
[ci skip]
2015-07-27 22:40:34 +01:00
Remy Sharp
1eb1238c94
Merge pull request #51 from remy/feature/refactor
...
Full refactor across to cheerio
2015-07-27 22:25:20 +01:00
Remy Sharp
e046c3739a
feat: auto-update + help
2015-07-27 22:24:38 +01:00
Remy Sharp
ef60842815
chore: support 0.8
2015-07-27 22:15:59 +01:00
Remy Sharp
6653796461
test: add full tests
2015-07-27 22:13:21 +01:00
Remy Sharp
743018c1a0
feat: scripts and compression
2015-07-27 16:00:56 +01:00
Remy Sharp
96ac1b7ac8
fix: background images in CSS
2015-07-27 14:54:46 +01:00
Remy Sharp
308aaa6be2
chore: remove submodule
2015-07-27 14:32:33 +01:00
Remy Sharp
eabd7c5441
fix: simple depth imports working
2015-07-27 14:26:25 +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
96d7bf2fe3
fix: relative urls
2015-07-26 23:05:40 +01:00
Remy Sharp
8dfea139c8
feat: removing comments + white space
2015-07-26 23:00:44 +01:00
Remy Sharp
50bd5a0f17
feat: CSS links working
2015-07-26 22:37:33 +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
Remy Sharp
e628109750
Merge pull request #46 from jpotter/master
...
Fix calls to existsSync; fix non-zero exit code on error
2015-02-25 11:52:33 +00:00
Build Server
4fb1190c41
Non-zero exit on failure, so that scripts using inliner know to halt
2015-02-24 12:10:26 -05:00
Build Server
77cfbd6e49
Fix path.existsSync calls
2015-02-24 12:02:31 -05:00
Remy Sharp
60d7cd7de6
Merge pull request #41 from mccartney/master
...
Fixes #13 (in upstream)
2014-07-22 17:01:41 +01:00
Grzegorz Oledzki
2f6a3bb1b3
Fixes #13 (in upstream)
2014-07-22 17:11:09 +02:00
Remy Sharp
d86313172e
Merge pull request #38 from TJKoury/patch-1
...
Change for null cases
2014-05-31 23:32:38 +01:00