move to yaml files
This commit is contained in:
		
							parent
							
								
									cf112d7d29
								
							
						
					
					
						commit
						f74684c306
					
				
					 7 changed files with 1647 additions and 1417 deletions
				
			
		
							
								
								
									
										64
									
								
								c.js
									
										
									
									
									
								
							
							
						
						
									
										64
									
								
								c.js
									
										
									
									
									
								
							|  | @ -1,64 +0,0 @@ | |||
| const icons = require("simple-icons"); | ||||
| var argv = require("minimist")(process.argv.slice(2)); | ||||
| 
 | ||||
| // Since I can't refer back to things, I'm just gonna make them consts
 | ||||
| // and export them
 | ||||
| 
 | ||||
| const dev = false || argv.dev; | ||||
| 
 | ||||
| const port = 9696; | ||||
| const name = "ALEX HELDT"; | ||||
| const socials = [ | ||||
|   { | ||||
|     name: "twitch", | ||||
|     link: "https://twitch.tv/alexheldtmusic", | ||||
|     icon: icons["Twitch"], | ||||
|   }, | ||||
|   { | ||||
|     name: "twitter", | ||||
|     link: "https://twitter.com/alexheldtmusic", | ||||
|     icon: icons["Twitter"], | ||||
|   }, | ||||
|   { | ||||
|     name: "instagram", | ||||
|     link: "https://instagr.am/alexheldtmusic", | ||||
|     icon: icons["Instagram"], | ||||
|   }, | ||||
| ]; | ||||
| const music = [ | ||||
|   { | ||||
|     id: "kumarionrmx", | ||||
|     name: "Want It Remix", | ||||
|     image: "/assets/images/kumarionrmx.jpg", | ||||
|     link: | ||||
|       "https://soundcloud.com/alexheldtmusic/kumarion-want-it-alex-heldt-remix-1", | ||||
|   }, | ||||
|   { | ||||
|     id: "rumorsrmx", | ||||
|     name: "Rumors Remix", | ||||
|     image: "/assets/images/rumorsrmx_cover.JPG", | ||||
|     link: "https://ffm.to/dd3kjja", | ||||
|   }, | ||||
|   { | ||||
|     id: "blowfishrmx", | ||||
|     name: "Blowfish Boyfriend Remix", | ||||
|     image: "/assets/images/blowfishrmx.jpg", | ||||
|     link: "https://ffm.to/blowfishbfremix.owe", | ||||
|   }, | ||||
|   { | ||||
|     id: "serrated", | ||||
|     name: "Serrated EP", | ||||
|     image: "/assets/images/serrated.jpg", | ||||
|     link: "https://ffm.to/serrated", | ||||
|   }, | ||||
| ]; | ||||
| 
 | ||||
| const allMusic = [...music]; | ||||
| module.exports = { | ||||
|   dev, | ||||
|   port, | ||||
|   name, | ||||
|   socials, | ||||
|   music, | ||||
|   allMusic, | ||||
| }; | ||||
							
								
								
									
										33
									
								
								configs.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								configs.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,33 @@ | |||
| const icons = require("simple-icons"); | ||||
| var argv = require("minimist")(process.argv.slice(2)); | ||||
| 
 | ||||
| // Since I can't refer back to things, I'm just gonna make them consts
 | ||||
| // and export them
 | ||||
| 
 | ||||
| const dev = false || argv.dev; | ||||
| 
 | ||||
| const port = 9696; | ||||
| const name = "ALEX HELDT"; | ||||
| const yml = require("./yaml") | ||||
| function capitalize(str) { | ||||
|   return str.charAt(0).toUpperCase() + str.slice(1); | ||||
| } | ||||
| 
 | ||||
| let socials = [] | ||||
| 
 | ||||
| yml.social.forEach(element => { | ||||
|   element.icon = icons[capitalize(element.name)]; | ||||
|   socials.push(element) | ||||
| }); | ||||
| 
 | ||||
| let music = yml.music.filter(m => m.shown === true) | ||||
| let allMusic = yml.music | ||||
| 
 | ||||
| module.exports = { | ||||
|   dev, | ||||
|   port, | ||||
|   name, | ||||
|   socials, | ||||
|   music, | ||||
|   allMusic, | ||||
| }; | ||||
							
								
								
									
										43
									
								
								files/music.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								files/music.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,43 @@ | |||
| - id: disillusioned | ||||
|   name: DISILLUSIONED | ||||
|   image: /assets/images/covers/disillusioned_alt.jpg | ||||
|   link: https://ffm.to/disillusioned | ||||
|   shown: true | ||||
| 
 | ||||
| - id: laughtracks | ||||
|   name: LAUGH TRACKS | ||||
|   image: /assets/images/covers/laughtracks.jpg | ||||
|   link: https://ffm.to/laughtracks | ||||
|   shown: true | ||||
| 
 | ||||
| - id: cantfeelmyself | ||||
|   name: CAN'T FEEL MYSELF | ||||
|   image: /assets/images/covers/cantfeelmyself.jpg | ||||
|   link: https://ffm.to/cantfeelmyself | ||||
|   shown: true | ||||
| 
 | ||||
| - id: cfmmv | ||||
|   name: CAN'T FEEL MYSELF MV | ||||
|   image: /assets/images/covers/cfm_video.png | ||||
|   link: https://www.youtube.com/watch?v=vdQdjxUFV3E | ||||
|   shown: true | ||||
| 
 | ||||
| - id: kumarionrmx | ||||
|   name: Want It Remix | ||||
|   image: "/assets/images/covers/kumarionrmx.jpg" | ||||
|   link: https://soundcloud.com/alexheldtmusic/kumarion-want-it-alex-heldt-remix-1 | ||||
| 
 | ||||
| - id: rumorsrmx | ||||
|   name: Rumors Remix | ||||
|   image: "/assets/images/covers/rumors.jpg" | ||||
|   link: https://ffm.to/dd3kjja | ||||
| 
 | ||||
| - id: blowfishrmx | ||||
|   name: Blowfish Boyfriend Remix | ||||
|   image: "/assets/images/covers/blowfishrmx.jpg" | ||||
|   link: https://ffm.to/blowfishbfremix.owe | ||||
| 
 | ||||
| - id: serrated | ||||
|   name: Serrated EP | ||||
|   image: "/assets/images/covers/serrated.jpg" | ||||
|   link: https://ffm.to/serrated | ||||
							
								
								
									
										8
									
								
								files/social.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								files/social.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| - name: twitch | ||||
|   link: https://twitch.tv/alexheldtmusic | ||||
| 
 | ||||
| - name: twitter | ||||
|   link: https://twitch.tv/alexheldtmusic | ||||
| 
 | ||||
| - name: Instagram | ||||
|   link: https://instagr.am/alexheldtmusic | ||||
							
								
								
									
										2898
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										2898
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							|  | @ -5,21 +5,20 @@ | |||
|   "main": "index.js", | ||||
|   "dependencies": { | ||||
|     "chalk": "^3.0.0", | ||||
|     "compile-sass": "^1.1.1", | ||||
|     "compression": "^1.7.4", | ||||
|     "cors": "^2.8.5", | ||||
|     "express": "^4.17.1", | ||||
|     "express-handlebars": "^3.1.0", | ||||
|     "helmet": "^3.21.2", | ||||
|     "ioredis": "^4.17.3", | ||||
|     "js-yaml": "^4.1.0", | ||||
|     "minimist": "^1.2.5", | ||||
|     "morgan": "^1.9.1", | ||||
|     "node-cache": "^5.1.2", | ||||
|     "sass": "^1.41.0", | ||||
|     "simple-icons": "^3.10.0" | ||||
|   }, | ||||
|   "devDependencies": {}, | ||||
|   "scripts": { | ||||
|     "test": "echo \"Error: no test specified\" && exit 1" | ||||
|     "css": "sass assets/sass/index.sass assets/css/index.css" | ||||
|   }, | ||||
|   "keywords": [], | ||||
|   "author": "", | ||||
|  |  | |||
							
								
								
									
										11
									
								
								yaml.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								yaml.js
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| const yaml = require('js-yaml'); | ||||
| const fs = require('fs'); | ||||
| const path = require('path'); | ||||
| 
 | ||||
| let YAML = [] | ||||
| 
 | ||||
| fs.readdirSync('./files').forEach(file => { | ||||
|     YAML[file.replace('.yml', '')] = yaml.load(fs.readFileSync(path.join(__dirname, 'files', file), 'utf8')) | ||||
| }); | ||||
| 
 | ||||
| module.exports = YAML; | ||||
		Loading…
	
	Add table
		
		Reference in a new issue