brLinker
brLinker It helps you to call files inside html or php so that you can easily change them from one place and also provide you with the ability to collect javascript or css files or any type of files into one file in the order you need the best thing in this is it so fast and its best for low performance
Installation
Use npm to install brLinker.
npm install brlinker
Usage
Javascipt
const brLinker = ;//import brLinker//pages that you createdconsole; //you can also define your pages here [object]//options default true at allbrLinkeroptions =pretty : true // export a pretty html or php file syntaxwatchDirs : true // watch new files in watching dirs//build a page TASKSlet pageName = brLinker//run page taskspageName // run export task [src]pageName; //run compress task BY its namepageName // run all page taskspageName; //get data from a json file//run all page tasksbrLinker //run all export tasks in All pagesbrLinker //run All taks that has this Name i all pages/* important : your must define this task name in All pages*/brLinker // run all tasks in all pages
//watching tasks brLinker//how to create PATHS to watch ` ------------ paths type ------------- normal path: 'C://dir1/dir2/myfile.html'------------------------------------------- all folder : 'C://dir1/**/myfile.html' this mean watch mayfile.html in all folders in dir1---------------------------------------------- all file have the same extension : 'C://dir1/*.js' this mean watch all files that have .js extension------------------------------------------------ exemple : 'C://dir1/**/*.js' this mean all files .js in all folders in /dir1 `//PATHS can be a string[one path] or an array[many paths]
html /php
normal import
how to import a template html or phphow to import a template many times
import with data
This data will come from the page data that was previously defined in JavaScript
in The Template
{d:title} {d:varName} //set data by this varName
in the soucePage
how to import a template html or phphow to import a template many timesmultiTitles must be an ARRAY just like you do in for loop
in the json File or JS object
(The data that you entered for the page jsFile:[page.data / dataFrom()])
OUTPUT
home page or any title home page or any title 1 home page or any title 2 home page or any title 3 home page or any title 4
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
email : abdellawy553@gmail.com