mirror of
https://github.com/remy/inliner.git
synced 2024-09-11 09:15:41 +03:00
npm packed up, and re-org of directory
This commit is contained in:
parent
d8cffc4e66
commit
24488b9fbf
@ -21,7 +21,7 @@ Turns your web page to a single HTML file with everything inlined - perfect for
|
||||
|
||||
I plan to include a web service at some point, but obviously this won't be able to access localhost domains.
|
||||
|
||||
Once you've inlined the crap out of the page, add the `manifest="self.manifest"` to the `html` tag and create an empty file called self.manifest ([read more](http://remysharp.com/2011/01/31/simple-offline-application/)).
|
||||
Once you've inlined the crap out of the page, add the `manifest="self.appcache"` to the `html` tag and create an empty file called self.manifest ([read more](http://remysharp.com/2011/01/31/simple-offline-application/)).
|
||||
|
||||
## Limitations / Caveats
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
var inliner = require('./inliner').inliner;
|
||||
if (!process.ARGV[2]) {
|
||||
console.log('Usage: inliner http://yoursite.com\ninliner will output the inlined HTML, CSS, images and JavaScript');
|
||||
process.exit();
|
||||
}
|
||||
|
||||
inliner(process.ARGV[2] || 'http://remysharp.com', function (html) {
|
||||
require('../lib/inliner')(process.ARGV[2], function (html) {
|
||||
console.log(html);
|
||||
});
|
@ -1,5 +0,0 @@
|
||||
var inliner = require('./inliner').inliner;
|
||||
|
||||
inliner(process.ARGV[2] || 'http://remysharp.com', function (html) {
|
||||
console.log(html);
|
||||
});
|
@ -100,7 +100,7 @@ function getImagesFromCSS(rooturl, rawCSS, callback) {
|
||||
}
|
||||
}
|
||||
|
||||
function inliner(url, options, callback) {
|
||||
var inliner = module.exports = function (url, options, callback) {
|
||||
|
||||
if (typeof options == 'function') {
|
||||
callback = options;
|
||||
@ -247,4 +247,4 @@ function inliner(url, options, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
exports.inliner = inliner;
|
||||
inliner.vesion = '0.0.1';
|
22
package.json
22
package.json
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "inliner",
|
||||
"version": "0.0.1",
|
||||
"description": "Utility to inline images, CSS and JavaScript for a web page - useful for mobile sites",
|
||||
"homepage": "http://github.com/remy/inliner",
|
||||
"main": "./lib/inliner",
|
||||
"keywords": ["mobile", "inline", "production", "build", "minify"],
|
||||
"author": {
|
||||
"name": "Remy Sharp",
|
||||
"web": "http://github.com/remy"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsdom": ">= 0.2.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/remy/inliner.git"
|
||||
},
|
||||
"bin": {
|
||||
"inliner": "./bin/inliner"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user