From f57de200ec32861835c9582090d52c70e73dace9 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Mon, 9 Jul 2012 21:00:51 -0400 Subject: [PATCH] refactored folder structure, added /plugins which is initially only used by #57 --- README.md | 4 ++-- css/main.css | 2 +- index.html | 8 ++++---- lib/{highlight => css}/zenburn.css | 0 .../league_gothic-webfont.ttf | Bin .../LICENSE => font/league_gothic_license} | 0 lib/{polyfills => js}/classList.js | 0 lib/{head => js}/head.min.js | 0 lib/{highlight => js}/highlight.js | 0 {lib => plugin}/slidenotes/client.js | 0 {lib => plugin}/slidenotes/index.js | 4 ++-- {lib => plugin}/slidenotes/notes.html | 0 12 files changed, 9 insertions(+), 9 deletions(-) rename lib/{highlight => css}/zenburn.css (100%) rename lib/{leaguegothic => font}/league_gothic-webfont.ttf (100%) rename lib/{leaguegothic/LICENSE => font/league_gothic_license} (100%) rename lib/{polyfills => js}/classList.js (100%) rename lib/{head => js}/head.min.js (100%) rename lib/{highlight => js}/highlight.js (100%) rename {lib => plugin}/slidenotes/client.js (100%) rename {lib => plugin}/slidenotes/index.js (89%) rename {lib => plugin}/slidenotes/notes.html (100%) diff --git a/README.md b/README.md index c8cc4a20..3087faca 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ Once Node.js and the dependencies are installed, run the following command from By default, the slides will be served at [localhost:1947](http://localhost:1947). -You can change the appearance of the speaker notes by editing the file at `lib/slidenotes/notes.html`. +You can change the appearance of the speaker notes by editing the file at `plugin/slidenotes/notes.html`. ### Known Issues @@ -159,7 +159,7 @@ You can change the appearance of the speaker notes by editing the file at `lib/s - API methods for adding or removing all event listeners - The 'slidechange' event now includes currentSlide and previousSlide - Fixed bug where 'slidechange' was firing twice when history was enabled -- Changed /lib structure +- Folder structure updates for scalability (see /lib & /plugin) - Slide notes by [rmurphey](https://github.com/rmurphey) #### 1.3 diff --git a/css/main.css b/css/main.css index ba331373..93d3d203 100644 --- a/css/main.css +++ b/css/main.css @@ -12,7 +12,7 @@ @font-face { font-family: 'League Gothic'; - src: url('../lib/leaguegothic/league_gothic-webfont.ttf') format('truetype'); + src: url('../lib/font/league_gothic-webfont.ttf') format('truetype'); font-weight: normal; font-style: normal; } diff --git a/index.html b/index.html index 4441cce0..d2dfdab9 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ - + @@ -264,7 +264,7 @@ linkify( 'a' ); - + diff --git a/lib/highlight/zenburn.css b/lib/css/zenburn.css similarity index 100% rename from lib/highlight/zenburn.css rename to lib/css/zenburn.css diff --git a/lib/leaguegothic/league_gothic-webfont.ttf b/lib/font/league_gothic-webfont.ttf similarity index 100% rename from lib/leaguegothic/league_gothic-webfont.ttf rename to lib/font/league_gothic-webfont.ttf diff --git a/lib/leaguegothic/LICENSE b/lib/font/league_gothic_license similarity index 100% rename from lib/leaguegothic/LICENSE rename to lib/font/league_gothic_license diff --git a/lib/polyfills/classList.js b/lib/js/classList.js similarity index 100% rename from lib/polyfills/classList.js rename to lib/js/classList.js diff --git a/lib/head/head.min.js b/lib/js/head.min.js similarity index 100% rename from lib/head/head.min.js rename to lib/js/head.min.js diff --git a/lib/highlight/highlight.js b/lib/js/highlight.js similarity index 100% rename from lib/highlight/highlight.js rename to lib/js/highlight.js diff --git a/lib/slidenotes/client.js b/plugin/slidenotes/client.js similarity index 100% rename from lib/slidenotes/client.js rename to plugin/slidenotes/client.js diff --git a/lib/slidenotes/index.js b/plugin/slidenotes/index.js similarity index 89% rename from lib/slidenotes/index.js rename to plugin/slidenotes/index.js index 206996d5..41282a3d 100644 --- a/lib/slidenotes/index.js +++ b/plugin/slidenotes/index.js @@ -21,7 +21,7 @@ io.sockets.on('connection', function(socket) { }); app.configure(function() { - [ 'css', 'assets', 'js', 'lib' ].forEach(function(dir) { + [ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) { app.use('/' + dir, staticDir(opts.baseDir + dir)); }); }); @@ -32,7 +32,7 @@ app.get("/", function(req, res) { app.get("/notes/:socketId", function(req, res) { - fs.readFile(opts.baseDir + 'lib/slidenotes/notes.html', function(err, data) { + fs.readFile(opts.baseDir + 'plugin/slidenotes/notes.html', function(err, data) { res.send(Mustache.to_html(data.toString(), { socketId : req.params.socketId })); diff --git a/lib/slidenotes/notes.html b/plugin/slidenotes/notes.html similarity index 100% rename from lib/slidenotes/notes.html rename to plugin/slidenotes/notes.html