-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ángel Albiñana Espejo
authored and
Ángel Albiñana Espejo
committed
Mar 18, 2024
1 parent
784bec4
commit 39588b3
Showing
27 changed files
with
1,198 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Readme. | ||
* | ||
* @description Readme. | ||
*/ | ||
|
||
import { readme } from './templates/readme.mjs' | ||
import { | ||
pkg, addTextBetweenAMark, | ||
} from './core/main.mjs' | ||
|
||
const dynamicReadme = async () => { | ||
|
||
try{ | ||
|
||
const readmeTemp = readme( pkg ) | ||
const convertReadme = async filePath => { | ||
|
||
await addTextBetweenAMark( filePath, '<!-- PIGEONPOSSE START MARK -->', '<!-- PIGEONPOSSE END MARK -->', readmeTemp.mark ) | ||
await addTextBetweenAMark( filePath, '<!-- PIGEONPOSSE START CONTENT -->', '<!-- PIGEONPOSSE END CONTENT -->', readmeTemp.content ) | ||
await addTextBetweenAMark( filePath, '<!-- PIGEONPOSSE START INDEX -->', '<!-- PIGEONPOSSE END INDEX -->', readmeTemp.index ) | ||
await addTextBetweenAMark( filePath, '<!-- PIGEONPOSSE START ORG -->', '<!-- PIGEONPOSSE END ORG -->', readmeTemp.org ) | ||
await addTextBetweenAMark( filePath, '<!-- PIGEONPOSSE START HEADER -->', '<!-- PIGEONPOSSE END HEADER -->', readmeTemp.header ) | ||
|
||
} | ||
await convertReadme( 'README.md' ) | ||
await convertReadme( 'packages/_core/README.md' ) | ||
await convertReadme( 'packages/_core-react/README.md' ) | ||
await convertReadme( 'packages/app/README.md' ) | ||
await convertReadme( 'packages/docs/README.md' ) | ||
await convertReadme( 'packages/exts/README.md' ) | ||
|
||
}catch( e ){ | ||
|
||
throw '📝 ' + e | ||
|
||
} | ||
|
||
} | ||
|
||
try { | ||
|
||
dynamicReadme() | ||
|
||
}catch( e ){ | ||
|
||
console.log( '❌ ' + e ) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* DOWNLOAD LINKS. | ||
* | ||
* @description Create web links. | ||
*/ | ||
|
||
import { constructorLinks } from '../core/main.mjs' | ||
|
||
const dataWebLinks = pkg => { | ||
|
||
return [ | ||
{ | ||
name : 'Web', color : 'grey', url : pkg.data.extra.collective.web, | ||
}, | ||
{ | ||
name : 'About Us', color : 'grey', url : pkg.data.extra.collective.about, | ||
}, | ||
{ | ||
name : 'Donate', color : 'pink', url : pkg.data.funding.url, | ||
}, | ||
{ | ||
name : 'Github', logo : 'github', url : pkg.data.extra.collective.gh, | ||
}, | ||
{ | ||
name : 'Twitter', logo : 'twitter', url : pkg.data.extra.collective.social.twitter, | ||
}, | ||
{ | ||
name : 'Instagram', logo : 'instagram', url : pkg.data.extra.collective.social.instagram, | ||
}, | ||
{ | ||
name : 'Medium', logo : 'medium', url : pkg.data.extra.collective.social.medium, | ||
}, | ||
] | ||
|
||
} | ||
|
||
export const collectiveImgLInks = pkg => constructorLinks( dataWebLinks( pkg ), 'img' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* MARK. | ||
* | ||
* @description Create mark string. | ||
*/ | ||
|
||
import { generateASCII } from '../core/main.mjs' | ||
export const mark = pkg => { | ||
|
||
const data = pkg.data | ||
const author = data.author.name | ||
const authorLink = data.author.url | ||
const repoUrl = data.repository.url | ||
// const version = data.version ? data.version : 'UNDEFINDED' | ||
|
||
return `${generateASCII( pkg.data.extra.productName.toUpperCase() )} | ||
REPOSITORY: ${repoUrl} | ||
AUTHORS: | ||
- ${author} (${authorLink}) | ||
DEVELOPED BY ${author} 🐦🌈 | ||
` | ||
|
||
} |
Oops, something went wrong.