Skip to content

🎯 A utility for easily updating the base path in a html file via NodeJS.

License

Notifications You must be signed in to change notification settings

npx-bin/angular-cdnify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-cdnify

Install Package:

npm i angular-cdnify

Usage example in code:

const ngCDN = require("angular-cdnify");
ngCDN.updateBasePath("index.html", "https://mycdn.example.com/some-folder/");

Note: The index.html file should contain the placeholder pattern text {[BASE_PATH]}.
This placeholder pattern text will get replaced with the cdnURL provided as the second argument to the updateBasePath function.

e.g.: <base href="{[BASE_PATH]}" />

After invoking updateBasePath from the above example, the index.html file will be updated as below:
<base href="https://mycdn.example.com/some-folder/" />

About

🎯 A utility for easily updating the base path in a html file via NodeJS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published