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:
37
js/vendor/require/plugins/require-handlebars-plugin/demo/app.build.js
vendored
Executable file
37
js/vendor/require/plugins/require-handlebars-plugin/demo/app.build.js
vendored
Executable 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"
|
||||
}
|
||||
]
|
||||
})
|
||||
10
js/vendor/require/plugins/require-handlebars-plugin/demo/main.js
vendored
Executable file
10
js/vendor/require/plugins/require-handlebars-plugin/demo/main.js
vendored
Executable 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']
|
||||
});
|
||||
});
|
||||
2087
js/vendor/require/plugins/require-handlebars-plugin/demo/require.js
vendored
Executable file
2087
js/vendor/require/plugins/require-handlebars-plugin/demo/require.js
vendored
Executable file
File diff suppressed because it is too large
Load Diff
3
js/vendor/require/plugins/require-handlebars-plugin/demo/styles/one.css
vendored
Executable file
3
js/vendor/require/plugins/require-handlebars-plugin/demo/styles/one.css
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
background-color: #AAAAAA;
|
||||
}
|
||||
4
js/vendor/require/plugins/require-handlebars-plugin/demo/styles/two.css
vendored
Executable file
4
js/vendor/require/plugins/require-handlebars-plugin/demo/styles/two.css
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
.partial {
|
||||
border: 2px solid #BADA55;
|
||||
padding: 5px;
|
||||
}
|
||||
10
js/vendor/require/plugins/require-handlebars-plugin/demo/template/coolPartial.hbs
vendored
Executable file
10
js/vendor/require/plugins/require-handlebars-plugin/demo/template/coolPartial.hbs
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
{{!
|
||||
{
|
||||
"name" : "coolPartial",
|
||||
"decription" : "A Demo Partial",
|
||||
"styles" : ["two"]
|
||||
}
|
||||
}}
|
||||
<div class="partial">
|
||||
This is a partial include.
|
||||
</div>
|
||||
8
js/vendor/require/plugins/require-handlebars-plugin/demo/template/helpers/myhelper.js
vendored
Normal file
8
js/vendor/require/plugins/require-handlebars-plugin/demo/template/helpers/myhelper.js
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
define(["handlebars"], function(Handlebars) {
|
||||
function myhelper(options) {
|
||||
return options.fn();
|
||||
}
|
||||
|
||||
Handlebars.registerHelper("myhelper", myhelper);
|
||||
return myhelper;
|
||||
});
|
||||
9
js/vendor/require/plugins/require-handlebars-plugin/demo/template/helpers/yeller.js
vendored
Executable file
9
js/vendor/require/plugins/require-handlebars-plugin/demo/template/helpers/yeller.js
vendored
Executable 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;
|
||||
});
|
||||
38
js/vendor/require/plugins/require-handlebars-plugin/demo/template/one.hbs
vendored
Executable file
38
js/vendor/require/plugins/require-handlebars-plugin/demo/template/one.hbs
vendored
Executable 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>
|
||||
Reference in New Issue
Block a user