Skip to content

Commit

Permalink
Use bower for deps. Add initial markdown support
Browse files Browse the repository at this point in the history
  • Loading branch information
briancavalier committed May 22, 2013
1 parent a642949 commit 862ec9b
Show file tree
Hide file tree
Showing 30 changed files with 45 additions and 1,758 deletions.
4 changes: 4 additions & 0 deletions .gitignore
@@ -0,0 +1,4 @@
/node_modules
/.idea
/components
.DS_Store
Empty file removed .gitmodules
Empty file.
2 changes: 1 addition & 1 deletion LICENSE.txt
Expand Up @@ -2,7 +2,7 @@ Open Source Initiative OSI - The MIT License

http://www.opensource.org/licenses/mit-license.php

Copyright (c) 2011 Brian Cavalier
Copyright (c) 2011-2013 Brian Cavalier

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions app/hc/markdown.js
@@ -0,0 +1,15 @@
/*
@license Copyright (c) 2011 Brian Cavalier
LICENSE: see the LICENSE.txt file. If file is missing, this file is subject
to the MIT License at: http://www.opensource.org/licenses/mit-license.php.
*/
define(['marked'], function(marked) {
return {
load: function (absId, require, loaded, config) {
require(['text!' + absId], function(text) {
marked.setOptions(config);
loaded(marked(text));
});
}
}
});
4 changes: 2 additions & 2 deletions app/hc/slides/PresentationController.js
@@ -1,12 +1,12 @@
/*
@license Copyright (c) 2011 Brian Cavalier
@license Copyright (c) 2011-2013 Brian Cavalier
LICENSE: see the LICENSE.txt file. If file is missing, this file is subject
to the MIT License at: http://www.opensource.org/licenses/mit-license.php.
*/
/*
Class: PresentationController
*/
define([], function() {
define(function() {

var doc = window.document,
html = doc.getElementsByTagName('html')[0],
Expand Down
2 changes: 1 addition & 1 deletion app/hc/slides/SingleFilePresentationModel.js
Expand Up @@ -29,7 +29,7 @@ define(['require', 'when'], function(require, when) {
loaded = false,
resolveOnLoad = [];

require(['text!' + slidePath], function(slideContent) {
require([slidePath], function(slideContent) {
cachedSlides = slideContent.split(/\s*\<hr\s*\/?\>\s*|\s*----\s*/i);
loaded = true;

Expand Down
2 changes: 1 addition & 1 deletion app/main.js
Expand Up @@ -9,7 +9,7 @@ define([
function(Model, View, Controller) {
var model, view, controller;

model = new Model('slides/slides.html');
model = new Model('text!slides/slides.html');
view = new View(document.getElementById('slide-container'), model);
controller = new Controller(view);

Expand Down
19 changes: 10 additions & 9 deletions app/run.js
Expand Up @@ -3,16 +3,17 @@
// Configure curl and load components, theme css,
// and wait for DOM Ready. Then create model, view,
// and controller, and start the presentation.
var config = {
baseUrl: '',
curl({
main: 'app/main',
paths: {
'themes': 'css/themes'
'themes': 'css/themes',
'markdown': 'app/hc/markdown'
},
packages: [
{ name: 'when', location: 'lib/when', main: 'when' }
]
};

curl(config, ['app/main']);
packages: {
curl: { location: 'components/curl/src/curl' },
when: { location: 'components/when', main: 'when' },
marked: { location: 'components/marked', main: 'lib/marked' }
}
});

})(window.curl);
9 changes: 9 additions & 0 deletions bower.json
@@ -0,0 +1,9 @@
{
"name": "slides",
"version": "2.0.0",
"dependencies": {
"when": "~2",
"marked": "~0.2",
"curl": "~0.7"
}
}
4 changes: 2 additions & 2 deletions index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>

<!--
Copyright (c) 2011 Brian Cavalier
Copyright (c) 2011-2013 Brian Cavalier
LICENSE: see the LICENSE.txt file. If file is missing, this file is subject
to the MIT License at: http://www.opensource.org/licenses/mit-license.php.
Expand Down Expand Up @@ -42,7 +42,7 @@
</style>

<!-- Load curl AMD Loader -->
<script src="lib/curl.js"></script>
<script src="components/curl/src/curl.js"></script>

<!-- Start the app by configuring curl and loading modules -->
<script src="app/run.js"></script>
Expand Down
29 changes: 0 additions & 29 deletions lib/curl.js

This file was deleted.

6 changes: 0 additions & 6 deletions lib/when/.editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions lib/when/.gitignore

This file was deleted.

Empty file removed lib/when/.gitmodules
Empty file.
74 changes: 0 additions & 74 deletions lib/when/.jshintrc

This file was deleted.

7 changes: 0 additions & 7 deletions lib/when/.travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions lib/when/LICENSE.txt

This file was deleted.

0 comments on commit 862ec9b

Please sign in to comment.