Skip to content

Commit

Permalink
npm packed up, and re-org of directory
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Mar 14, 2011
1 parent d8cffc4 commit 24488b9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 5 additions & 2 deletions bin/inliner
Original file line number Diff line number Diff line change
@@ -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);
});
5 changes: 0 additions & 5 deletions bin/inliner.js

This file was deleted.

4 changes: 2 additions & 2 deletions lib/inliner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -247,4 +247,4 @@ function inliner(url, options, callback) {
});
}

exports.inliner = inliner;
inliner.vesion = '0.0.1';
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 24488b9

Please sign in to comment.