-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from MurciaDev/feat/generate-readme-by-json-fi…
…le-instead-md use json instead markdown generate file
- Loading branch information
Showing
5 changed files
with
322 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# 📂 Contribuir | ||
|
||
## 🤝 Código de conducta | ||
Ten en cuenta que este proyecto se publica bajo el [Código de Conducta de Contribuidora y Contribuidor](https://github.com/MurciaDev/CODE_OF_CONDUCT) de la comunidad . Ya sabes que al participar en este proyecto estás aceptando cumplir con los términos. | ||
|
||
## 🤔 ¿Cómo contribuir? | ||
|
||
Generamos el `README` de forma dinámica, así que no es necesario que actualices los datos ahí, tendrás que hacerlo modificando el fichero [`companies.json`](./companies.json). | ||
|
||
Añade tus cambios al fichero bajo la siguiente estructura: | ||
|
||
```json | ||
[ | ||
{ | ||
"category": "🧨 Productos peligrosos y poco reales", // String | ||
"companies": [ | ||
{ | ||
"address": "Mundo de los Looney Tunes, Ciudad ACME", // String | ||
"name": "ACME Corporation", // String | ||
"remoteWork": "NONE", // Enum<String> 'NONE' | 'FLEX' | 'FULL' | ||
"stack": "Correcaminos, Coyote", // String | ||
"url": "https://www.wbkidsgo.com/looney-tunes" // String | ||
} | ||
] | ||
} | ||
] | ||
``` | ||
|
||
Una vez tengas actualizado los datos, necesitaremos generar el nuevo `README` actualizado. Ejecuta en tu terminal el siguiente comando para generarlo: | ||
|
||
```node | ||
npm run build | ||
``` | ||
|
||
Habrá generado un nuevo `README` con los cambios que hayas realizado en el fichero [`companies.json`](./companies.json). ¡Y ahora solo tienes que preaparar tu PR! | ||
|
||
¡Gracias por tu contribución! 🤘 |
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,208 @@ | ||
[ | ||
{ | ||
"category": "📗 Empresas de producto", | ||
"companies": [ | ||
{ | ||
"address": "C. Trapería 19, 3D", | ||
"name": "DisplayNote", | ||
"remoteWork": "FULL", | ||
"stack": null, | ||
"url": "https://www.displaynote.com/" | ||
}, | ||
{ | ||
"address": "Carr. de Alicante, 215B, Nave 3, 30007 Murcia", | ||
"name": "Carsbater", | ||
"remoteWork": null, | ||
"stack": null, | ||
"url": "https://www.carsbarter.es/" | ||
}, | ||
{ | ||
"address": null, | ||
"name": "Erasmusu", | ||
"remoteWork": null, | ||
"stack": null, | ||
"url": "https://erasmusu.com/" | ||
}, | ||
{ | ||
"address": null, | ||
"name": "Gofoodie", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://gofoodie.app/" | ||
}, | ||
{ | ||
"address": "C. Campus Universitario, 7, Edificio CEEIM, 30100 Espinardo, Murcia", | ||
"name": "Legaliboo", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://legaliboo.com/" | ||
}, | ||
{ | ||
"address": "C. Campus Universitario, 7, Edificio CEEIM, 30100 Espinardo, Murcia", | ||
"name": "Leverade", | ||
"remoteWork": "FULL", | ||
"stack": null, | ||
"url": "https://leverade.com/" | ||
}, | ||
{ | ||
"address": "C. Jose Manuel Sanchez Pedreño, 1, Planta 11, 30009 Murcia", | ||
"name": "Minderest", | ||
"remoteWork": "FLEX", | ||
"stack": null, | ||
"url": "https://www.minderest.com" | ||
}, | ||
{ | ||
"address": "Parque Cientifico, 30100 Murcia", | ||
"name": "Neuromobile", | ||
"remoteWork": "FULL", | ||
"stack": null, | ||
"url": "https://neuromobile.es/" | ||
}, | ||
{ | ||
"address": "Carr. de Alicante, 215B, Nave 3, 30007 Murcia", | ||
"name": "Nido robotics", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.nidorobotics.com/" | ||
}, | ||
{ | ||
"address": "Avenida Luxemburgo, s/n Centro Empresarial Cartagena Plaza, 6ª Planta, 30353 Cartagena, Murcia", | ||
"name": "Odilo", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.odilo.es/" | ||
}, | ||
{ | ||
"address": "Polígono Industrial Las Salinas, Avenida Europa, 2-3, 30840, Murcia", | ||
"name": "PcComponentes", | ||
"remoteWork": "FULL", | ||
"stack": null, | ||
"url": "https://www.pccomponentes.com/" | ||
}, | ||
{ | ||
"address": "C. Campus Universitario, 7, Edificio CEEIM, 30100 Espinardo, Murcia", | ||
"name": "Readyme", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://readyme.app/" | ||
}, | ||
{ | ||
"address": "Parque Cientifico de Murcia Ctra. Madrid Km 388 30100 Murcia, Murcia", | ||
"name": "Slang Digital", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://slang.digital/" | ||
}, | ||
{ | ||
"address": "C. Mayor, 2, 30006 Puente Tocinos, Murcia", | ||
"name": "STEL Order", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.stelorder.com/" | ||
}, | ||
{ | ||
"address": null, | ||
"name": "Wefish", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://wefish.app/" | ||
}, | ||
{ | ||
"address": "Torre Dimóvil. Avda. Juan Carlos I. 59 5º Planta. 30100, Murcia", | ||
"name": "Stay my way", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://staymyway.com/" | ||
}, | ||
{ | ||
"address": null, | ||
"name": "Weguest", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.weguest.com/" | ||
} | ||
] | ||
}, | ||
{ | ||
"category": "📚 Consultoras / Agencias digitales", | ||
"companies": [ | ||
{ | ||
"address": "C. Central, 17C, 30100 Murcia", | ||
"name": "Aunna IT", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.aunnait.es/" | ||
}, | ||
{ | ||
"address": "P.º Joaquín Garrigues Walker, 14, 30007 Murcia", | ||
"name": "Bitec", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.bitec.es/" | ||
}, | ||
{ | ||
"address": "Urban Center, Torre B, Calle Nelva, 1, 30006 Murcia", | ||
"name": "Capgemini", | ||
"remoteWork": "FLEX", | ||
"stack": null, | ||
"url": "https://www.capgemini.com/" | ||
}, | ||
{ | ||
"address": "Edificio JC1, Avenida Juan Carlos I, 55, planta 16, Espinardo, 30100 Murcia", | ||
"name": "Digio", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://digio.es/" | ||
}, | ||
{ | ||
"address": "C, Rda. de Levante, 14, 1º - Oficina 4, 30008 Murcia", | ||
"name": "Drool Studio", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://droolstudio.com/" | ||
}, | ||
{ | ||
"address": null, | ||
"name": "Introbay", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://introbay.com/" | ||
}, | ||
{ | ||
"address": "Carril de la Condesa, 22, 30010 Murcia", | ||
"name": "Metaenlace", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://metaenlace.com/" | ||
}, | ||
{ | ||
"address": "C. Central, 10, 30100 Espinardo, Murcia", | ||
"name": "Neosistec", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://www.neosistec.com/" | ||
}, | ||
{ | ||
"address": "Edificio Torre Cristal, Av. Juan Carlos I, s/n, planta baja, 30100 Espinardo, Murcia", | ||
"name": "Ntt data / Everis", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://es.nttdata.com/" | ||
}, | ||
{ | ||
"address": "Av/ Juan Carlos I 59, planta 3, 30100, Espinardo, Murcia", | ||
"name": "Sozpic", | ||
"remoteWork": "FLEX", | ||
"stack": null, | ||
"url": "https://www.sozpic.com/" | ||
}, | ||
{ | ||
"address": "Av. de Zarandona, 29, 1 planta, 30007 Murcia", | ||
"name": "Zapp Studio", | ||
"remoteWork": false, | ||
"stack": null, | ||
"url": "https://zapp-studio.com/" | ||
} | ||
] | ||
} | ||
] |
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,5 @@ | ||
{ | ||
"scripts": { | ||
"build": "node ./scripts/generate-readme.js" | ||
} | ||
} |
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,39 @@ | ||
const fs = require('fs') | ||
const companies = require('../companies.json') | ||
|
||
const REMOTE_WORK_ICONS = { | ||
FLEX: '🔄', | ||
FULL: '✅', | ||
NONE: '🚫', | ||
} | ||
|
||
const tableHeader = '| Nombre | Remoto | Stack | Dirección |\n| :-- | :-- | :-- | :-- |\n' | ||
|
||
const companiesMarkdown = companies.map(({ category, companies }, index) => { | ||
const header = `${!!index ? '\n' : ''}## ${category}\n${tableHeader}` | ||
const body = companies | ||
.sort(({ name }, { name: nameToCompare }) => name.toLowerCase().localeCompare(nameToCompare.toLowerCase())) | ||
.map(({ address, remoteWork, name, stack, url }) => | ||
`| [${name}](${url}) | ${REMOTE_WORK_ICONS[remoteWork] || '﹖'} | ${stack || '﹖'} | ${address || '﹖'} |\n` | ||
).join('') | ||
|
||
return `${header}${body}` | ||
}).join('') | ||
|
||
const markdown = `# 📂 Murcia Tech Hub | ||
> Listado de empresas con trabajos tecnológicos dentro de la Región de Murcia. | ||
Si conoces alguna más o puedes poner algún dato más sobre las que ya existen en el listado anímate y actualiza los datos, no olvides revisar la [guía de contribución](./CONTRIBUTING.md). | ||
**Trabajo en remoto:** | ||
﹖ No lo sabemos | 🚫 No | 🔄 Híbrido / flexible | ✅ 100% remoto | ||
${companiesMarkdown}` | ||
|
||
try { | ||
fs.writeFileSync(`${process.cwd()}/README.md`, markdown, 'utf-8') | ||
console.log('\x1b[32m%s\x1b[0m', 'README generated successfully! 🍋\n') | ||
} catch (err) { | ||
throw err | ||
} |