generic-text-linker v1.7.31
QA dsl-toolkit
Installation
npm install generic-text-linker --save-dev
Motivation
I wanted to have a small generic linker solution for text files so that I can avoid copy and paste, and use it different kind of automation tasks.
Usage
I present the usage of the library with the example below
Example
markdownFile1:
<!-- source begin-->
Your projects badges, or information you want to share in other files without
copy and paste on your own.
<!-- source end-->
markdownFile2:
<!-- destination begin-->
<!-- destination end-->
code:
const {linkerDir} = require('generic-text-linker')
const projectRoot = 'path to the directory where you want to use the linker.'
const source = {
begin: '<!-- source begin-->',
end: '<!-- source end-->'
}
const destination = {
begin: '<!-- destination begin-->',
end: '<!-- destination end-->'
}
let sourceData = linkerDir(projectRoot, sourceTags.begin, sourceTags.end)
const changedFilesArray = linkerDir(projectRoot, destination.begin, destination.end, sourceData)
This will change the content of markdownFile2
More information
This library helps you find changes modifications between your working and original fixture files. More examples are coming for more information; please check the tests
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago