From 544e089e8fc3575f1a180d910e66866b12831dd8 Mon Sep 17 00:00:00 2001 From: kevinkace Date: Tue, 13 Mar 2018 22:02:41 -0700 Subject: [PATCH] Move default songs --- src/state/song.js | 15 ++------------- src/state/songs.js | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 src/state/songs.js diff --git a/src/state/song.js b/src/state/song.js index 524a4d0..c37c6d4 100644 --- a/src/state/song.js +++ b/src/state/song.js @@ -2,20 +2,9 @@ import eol from "eol"; import hash from "string-hash"; import slugify from "slugify"; -const titleSplit = "\n\n---\n\n"; +import songs from "./songs"; -// todo: why require -const songs = [ - require("../songs/smells-like-teen-spirit.txt"), - require("../songs/judy-is-a-punk.txt"), - require("../songs/hatebreeders.txt"), - require("../songs/gods-plan.txt"), - require("../songs/perfect.txt"), - require("../songs/finesse-remix.txt"), - require("../songs/son-of-a-gun.txt"), - require("../songs/sparks.txt"), - require("../songs/black-hole-sun.txt") -]; +const titleSplit = "\n\n---\n\n"; function parseLyricString(lyricString) { return lyricString diff --git a/src/state/songs.js b/src/state/songs.js new file mode 100644 index 0000000..27021ce --- /dev/null +++ b/src/state/songs.js @@ -0,0 +1,21 @@ +import song1 from "../songs/smells-like-teen-spirit.txt"; +import song2 from "../songs/judy-is-a-punk.txt"; +import song3 from "../songs/hatebreeders.txt"; +import song4 from "../songs/gods-plan.txt"; +import song5 from "../songs/perfect.txt"; +import song6 from "../songs/finesse-remix.txt"; +import song7 from "../songs/son-of-a-gun.txt"; +import song8 from "../songs/sparks.txt"; +import song9 from "../songs/black-hole-sun.txt"; + +export default [ + song1, + song2, + song3, + song4, + song5, + song6, + song7, + song8, + song9 +];