1
0
mirror of https://github.com/2ec0b4/kaamelott-soundboard.git synced 2025-12-11 00:43:00 +00:00

Initialise le projet

This commit is contained in:
Antoine
2016-04-07 12:42:30 +02:00
commit 91e5d1476e
36 changed files with 39970 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
({
appDir: "./",
baseUrl: "./",
dir: "../demo-build",
optimizeCss: "standard",
// optimize: "none",
// inlining ftw
inlineText: true,
stubModules: ['hbs', 'hbs/underscore', 'hbs/json2', 'hbs/handlebars'],
paths: {
"hbs": "../hbs",
"handlebars": "../hbs/handlebars.runtime"
// if your project is already using underscore.js and you want to keep
// the hbs plugin even after build (excludeHbs:false) you should set the
// "hbs/underscore" path to point to the shared location like
// "hbs/underscore" : "lib/underscore" to avoid loading it twice
},
locale: "en_ca",
hbs : {
// default plugin settings, listing here just as a reference
templateExtension : 'hbs',
helperDirectory : "template/helpers/",
handlebarsPath: "handlebars"
},
modules: [
{
name: "main"
}
]
})

View File

@@ -0,0 +1,10 @@
// Require our template with the handlebars plugin
define(['hbs!template/one'], function (tmplOne) {
// Find our container
var container = document.getElementById('demo-app-container');
// Run your template function, and inject it.
container.innerHTML = tmplOne({
adjective : 'favorite',
listofstuff : ['bananas', 'democracy', 'expired milk']
});
});

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
body {
background-color: #AAAAAA;
}

View File

@@ -0,0 +1,4 @@
.partial {
border: 2px solid #BADA55;
padding: 5px;
}

View File

@@ -0,0 +1,10 @@
{{!
{
"name" : "coolPartial",
"decription" : "A Demo Partial",
"styles" : ["two"]
}
}}
<div class="partial">
This is a partial include.
</div>

View File

@@ -0,0 +1,8 @@
define(["handlebars"], function(Handlebars) {
function myhelper(options) {
return options.fn();
}
Handlebars.registerHelper("myhelper", myhelper);
return myhelper;
});

View File

@@ -0,0 +1,9 @@
define(["handlebars"], function ( Handlebars ){
function yeller ( context, options ) {
// Assume it's a string for simplicity.
return context + "!!!!!!oneone!!one1";
}
Handlebars.registerHelper( 'yeller', yeller );
return yeller;
});

View File

@@ -0,0 +1,38 @@
{{!
{
"name" : "one",
"decription" : "A Demo Template",
"styles" : ["one"],
"helpers": ["myhelper"]
}
}}
<div class="best class ever">
{{#myhelper}}
Wow
{{else}}
Nope
{{/myhelper}}
{{! Do a little bit of unecessary logic in here
to show that it works with block helpers
and iterators }}
{{#if "1"}}
This plugin is my {{ adjective }} plugin ever.
{{/if}}
<br />
<br />
{{#each listofstuff}}
{{#if doesntexist}}
cant get here
{{else}}
{{yeller .}}
<br />
{{/if}}
{{/each}}
<br />
{{> template/coolPartial }}
</div>