Skip to content

psirenny/locationify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Locationify

Substitute window.location properties with values you provide via a url.

Installation

$ npm install locationify --save

Example

source:

var url = window.location.origin + '/post';

bundle:

var url = "http://foo.com" + '/post';

Motivation

Have scripts running off the filesystem return window.location values as though they were hosted. eg. Compiling an application returned by a webserver into a phonegap app.

Usage

var browserify = require('browserify');
var locationify = require('locatonify');

var b = browserify();
b.add('./browser/main.js');
b.transform(locationify('http://foo.com/'));
b.bundle().pipe(process.stdout);

About

Substitute window.location values with the url you provide.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published