Name: localinclude
Owner: BBC
Description: Test your local HTML include with any page on the Internet
Created: 2017-01-13 09:32:44.0
Updated: 2018-02-01 12:33:22.0
Pushed: 2017-01-27 10:55:05.0
Homepage: null
Size: 8
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Test your local HTML include with any page on the Internet
Localinclude is a commmand line tool written in NodeJS, so you need to install it globally from npm.
install -g localinclude
You can run localinclude from your project directory, here's a quick demo:
'<h1>LOCALINCLUDE is awesome!!!</h1>' > example.inc
linclude --url https://www.google.com --dompos '#lga' --include example.inc
Once this is running visit the URL the terminal output reports and you'll see the Google homepage with the “LOCALINCLUDE is awesome!!!” written into it.
To use localinclude you need to provide 3 parameters:
--url
The target page on the website you want to use. This needs to be available from where you are (so you can use localinclude with intranets).--dompos
A CSS selector string that tells localinclude where in the page to put your include.--include
A path to the file you want to include into the target page.