From 0e46aa3bdffb45170b3488eedbb68e8da3ab37e7 Mon Sep 17 00:00:00 2001 From: zhuqiacheng Date: Thu, 22 Sep 2016 13:20:39 +0800 Subject: [PATCH 1/2] compatible anyother fileSystem --- CHANGELOG.md | 3 +++ README.md | 1 + index.js | 6 +++++- lib/load.js | 3 +-- package.json | 1 + test/5-inline-test.js | 14 ++++++++++++++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf940cb..b3bd216 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +**5.0.3** - Sept 22, 2016 +* compatible anyother fileSystem to read the file + **5.0.2** - Sept 14, 2016 * fix escaping of `` tags in inlined js content diff --git a/README.md b/README.md index b15ba24..9d6a978 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Inline and compress tags that contain the `inline` attribute. Supports `'; + const mfs = new MemoryFileSystem(); + const memoryJs = 'console.log(123);'; + mfs.mkdirpSync(process.cwd()); + mfs.writeFileSync(process.cwd() + '/memory.js', memoryJs, 'utf8'); + + inline(test, { compress: true, fs: mfs }, function (err, html) { + expect(err).to.be(null); + expect(html).to.eql(''); + done(); + }); + }); }); describe('sync', function () { From c2da4f7353d8bf93c9dc0fc66640beb89f08b03a Mon Sep 17 00:00:00 2001 From: zhuqiacheng Date: Thu, 22 Sep 2016 13:21:41 +0800 Subject: [PATCH 2/2] upgrade version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1eea716..30df53c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "inline-source", "description": "Inline all flagged js, css, image source files", - "version": "5.0.2", + "version": "5.0.3", "author": "popeindustries ", "keywords": [ "inline",