mes 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +1 -0
- data/bin/mes +11 -0
- data/lib/middleman_ember_scaffold/cli/generators.rb +21 -0
- data/lib/middleman_ember_scaffold/cli.rb +91 -0
- data/lib/middleman_ember_scaffold/generators/scaffold.rb +22 -0
- data/lib/middleman_ember_scaffold/load_paths.rb +1 -0
- data/lib/middleman_ember_scaffold/template/Capfile +4 -0
- data/lib/middleman_ember_scaffold/template/Gemfile +10 -0
- data/lib/middleman_ember_scaffold/template/README.md +30 -0
- data/lib/middleman_ember_scaffold/template/component.json +14 -0
- data/lib/middleman_ember_scaffold/template/components/ember/component.json +20 -0
- data/lib/middleman_ember_scaffold/template/components/ember/ember.js +27755 -0
- data/lib/middleman_ember_scaffold/template/components/ember/ember.min.js +20 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/README.md +4 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/component.json +22 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/ember-data-spade.js +1 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/ember-data.amd.js +7819 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/ember-data.js +8769 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/ember-data.min.js +12 -0
- data/lib/middleman_ember_scaffold/template/components/ember-data/ember-data.prod.js +7802 -0
- data/lib/middleman_ember_scaffold/template/components/handlebars/component.json +17 -0
- data/lib/middleman_ember_scaffold/template/components/handlebars/handlebars.js +2201 -0
- data/lib/middleman_ember_scaffold/template/components/handlebars/handlebars.runtime.js +321 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/component.json +14 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/composer.json +26 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/jquery-migrate.js +496 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/jquery-migrate.min.js +3 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/jquery.js +9597 -0
- data/lib/middleman_ember_scaffold/template/components/jquery/jquery.min.js +5 -0
- data/lib/middleman_ember_scaffold/template/config/deploy.rb +66 -0
- data/lib/middleman_ember_scaffold/template/config.rb +91 -0
- data/lib/middleman_ember_scaffold/template/source/app/application.coffee +15 -0
- data/lib/middleman_ember_scaffold/template/source/app/controllers/application_controller.coffee +1 -0
- data/lib/middleman_ember_scaffold/template/source/app/controllers/index_controller.coffee +1 -0
- data/lib/middleman_ember_scaffold/template/source/app/main.coffee +17 -0
- data/lib/middleman_ember_scaffold/template/source/app/models/foo.coffee +1 -0
- data/lib/middleman_ember_scaffold/template/source/app/routes.coffee +11 -0
- data/lib/middleman_ember_scaffold/template/source/app/views/application_view.coffee +2 -0
- data/lib/middleman_ember_scaffold/template/source/app/views/index_view.coffee +2 -0
- data/lib/middleman_ember_scaffold/template/source/index.html.haml +1 -0
- data/lib/middleman_ember_scaffold/template/source/layout.haml +8 -0
- data/lib/middleman_ember_scaffold/template/source/stylesheets/application.css.scss +2 -0
- data/lib/middleman_ember_scaffold/template/source/stylesheets/variables.scss +279 -0
- data/lib/middleman_ember_scaffold/template/source/templates_emblem/application/index.emblem +2 -0
- data/lib/middleman_ember_scaffold/template/source/templates_emblem/application.emblem +4 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/.gitkeep +0 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-dropdown.js +165 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-modal.js +374 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-modalmanager.js +412 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-popover.js +114 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-tabs.js +144 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/bootstrap-tooltip.js +361 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/date.js +104 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/ember-data.js +8769 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/ember.js +27755 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/handlebars.js +2201 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/jquery.js +9597 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/jquery.validate.min.js +2 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/json2.js +480 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/underscore.js +1 -0
- data/lib/middleman_ember_scaffold/template/vendor/javascripts/utils.js +19 -0
- data/lib/middleman_ember_scaffold/template/vendor/stylesheets/.gitkeep +0 -0
- data/lib/middleman_ember_scaffold/template/watch +2 -0
- data/lib/middleman_ember_scaffold/version.rb +3 -0
- data/lib/middleman_ember_scaffold.rb +5 -0
- data/mes.gemspec +24 -0
- metadata +167 -0
@@ -0,0 +1,321 @@
|
|
1
|
+
/*
|
2
|
+
|
3
|
+
Copyright (C) 2011 by Yehuda Katz
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
22
|
+
|
23
|
+
*/
|
24
|
+
|
25
|
+
// lib/handlebars/base.js
|
26
|
+
|
27
|
+
/*jshint eqnull:true*/
|
28
|
+
this.Handlebars = {};
|
29
|
+
|
30
|
+
(function(Handlebars) {
|
31
|
+
|
32
|
+
Handlebars.VERSION = "1.0.0-rc.3";
|
33
|
+
Handlebars.COMPILER_REVISION = 2;
|
34
|
+
|
35
|
+
Handlebars.REVISION_CHANGES = {
|
36
|
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
37
|
+
2: '>= 1.0.0-rc.3'
|
38
|
+
};
|
39
|
+
|
40
|
+
Handlebars.helpers = {};
|
41
|
+
Handlebars.partials = {};
|
42
|
+
|
43
|
+
Handlebars.registerHelper = function(name, fn, inverse) {
|
44
|
+
if(inverse) { fn.not = inverse; }
|
45
|
+
this.helpers[name] = fn;
|
46
|
+
};
|
47
|
+
|
48
|
+
Handlebars.registerPartial = function(name, str) {
|
49
|
+
this.partials[name] = str;
|
50
|
+
};
|
51
|
+
|
52
|
+
Handlebars.registerHelper('helperMissing', function(arg) {
|
53
|
+
if(arguments.length === 2) {
|
54
|
+
return undefined;
|
55
|
+
} else {
|
56
|
+
throw new Error("Could not find property '" + arg + "'");
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
var toString = Object.prototype.toString, functionType = "[object Function]";
|
61
|
+
|
62
|
+
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
|
63
|
+
var inverse = options.inverse || function() {}, fn = options.fn;
|
64
|
+
|
65
|
+
|
66
|
+
var ret = "";
|
67
|
+
var type = toString.call(context);
|
68
|
+
|
69
|
+
if(type === functionType) { context = context.call(this); }
|
70
|
+
|
71
|
+
if(context === true) {
|
72
|
+
return fn(this);
|
73
|
+
} else if(context === false || context == null) {
|
74
|
+
return inverse(this);
|
75
|
+
} else if(type === "[object Array]") {
|
76
|
+
if(context.length > 0) {
|
77
|
+
return Handlebars.helpers.each(context, options);
|
78
|
+
} else {
|
79
|
+
return inverse(this);
|
80
|
+
}
|
81
|
+
} else {
|
82
|
+
return fn(context);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
|
86
|
+
Handlebars.K = function() {};
|
87
|
+
|
88
|
+
Handlebars.createFrame = Object.create || function(object) {
|
89
|
+
Handlebars.K.prototype = object;
|
90
|
+
var obj = new Handlebars.K();
|
91
|
+
Handlebars.K.prototype = null;
|
92
|
+
return obj;
|
93
|
+
};
|
94
|
+
|
95
|
+
Handlebars.logger = {
|
96
|
+
DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
|
97
|
+
|
98
|
+
methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
|
99
|
+
|
100
|
+
// can be overridden in the host environment
|
101
|
+
log: function(level, obj) {
|
102
|
+
if (Handlebars.logger.level <= level) {
|
103
|
+
var method = Handlebars.logger.methodMap[level];
|
104
|
+
if (typeof console !== 'undefined' && console[method]) {
|
105
|
+
console[method].call(console, obj);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
};
|
110
|
+
|
111
|
+
Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
|
112
|
+
|
113
|
+
Handlebars.registerHelper('each', function(context, options) {
|
114
|
+
var fn = options.fn, inverse = options.inverse;
|
115
|
+
var i = 0, ret = "", data;
|
116
|
+
|
117
|
+
if (options.data) {
|
118
|
+
data = Handlebars.createFrame(options.data);
|
119
|
+
}
|
120
|
+
|
121
|
+
if(context && typeof context === 'object') {
|
122
|
+
if(context instanceof Array){
|
123
|
+
for(var j = context.length; i<j; i++) {
|
124
|
+
if (data) { data.index = i; }
|
125
|
+
ret = ret + fn(context[i], { data: data });
|
126
|
+
}
|
127
|
+
} else {
|
128
|
+
for(var key in context) {
|
129
|
+
if(context.hasOwnProperty(key)) {
|
130
|
+
if(data) { data.key = key; }
|
131
|
+
ret = ret + fn(context[key], {data: data});
|
132
|
+
i++;
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
if(i === 0){
|
139
|
+
ret = inverse(this);
|
140
|
+
}
|
141
|
+
|
142
|
+
return ret;
|
143
|
+
});
|
144
|
+
|
145
|
+
Handlebars.registerHelper('if', function(context, options) {
|
146
|
+
var type = toString.call(context);
|
147
|
+
if(type === functionType) { context = context.call(this); }
|
148
|
+
|
149
|
+
if(!context || Handlebars.Utils.isEmpty(context)) {
|
150
|
+
return options.inverse(this);
|
151
|
+
} else {
|
152
|
+
return options.fn(this);
|
153
|
+
}
|
154
|
+
});
|
155
|
+
|
156
|
+
Handlebars.registerHelper('unless', function(context, options) {
|
157
|
+
var fn = options.fn, inverse = options.inverse;
|
158
|
+
options.fn = inverse;
|
159
|
+
options.inverse = fn;
|
160
|
+
|
161
|
+
return Handlebars.helpers['if'].call(this, context, options);
|
162
|
+
});
|
163
|
+
|
164
|
+
Handlebars.registerHelper('with', function(context, options) {
|
165
|
+
return options.fn(context);
|
166
|
+
});
|
167
|
+
|
168
|
+
Handlebars.registerHelper('log', function(context, options) {
|
169
|
+
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
170
|
+
Handlebars.log(level, context);
|
171
|
+
});
|
172
|
+
|
173
|
+
}(this.Handlebars));
|
174
|
+
;
|
175
|
+
// lib/handlebars/utils.js
|
176
|
+
|
177
|
+
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
178
|
+
|
179
|
+
Handlebars.Exception = function(message) {
|
180
|
+
var tmp = Error.prototype.constructor.apply(this, arguments);
|
181
|
+
|
182
|
+
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
|
183
|
+
for (var idx = 0; idx < errorProps.length; idx++) {
|
184
|
+
this[errorProps[idx]] = tmp[errorProps[idx]];
|
185
|
+
}
|
186
|
+
};
|
187
|
+
Handlebars.Exception.prototype = new Error();
|
188
|
+
|
189
|
+
// Build out our basic SafeString type
|
190
|
+
Handlebars.SafeString = function(string) {
|
191
|
+
this.string = string;
|
192
|
+
};
|
193
|
+
Handlebars.SafeString.prototype.toString = function() {
|
194
|
+
return this.string.toString();
|
195
|
+
};
|
196
|
+
|
197
|
+
(function() {
|
198
|
+
var escape = {
|
199
|
+
"&": "&",
|
200
|
+
"<": "<",
|
201
|
+
">": ">",
|
202
|
+
'"': """,
|
203
|
+
"'": "'",
|
204
|
+
"`": "`"
|
205
|
+
};
|
206
|
+
|
207
|
+
var badChars = /[&<>"'`]/g;
|
208
|
+
var possible = /[&<>"'`]/;
|
209
|
+
|
210
|
+
var escapeChar = function(chr) {
|
211
|
+
return escape[chr] || "&";
|
212
|
+
};
|
213
|
+
|
214
|
+
Handlebars.Utils = {
|
215
|
+
escapeExpression: function(string) {
|
216
|
+
// don't escape SafeStrings, since they're already safe
|
217
|
+
if (string instanceof Handlebars.SafeString) {
|
218
|
+
return string.toString();
|
219
|
+
} else if (string == null || string === false) {
|
220
|
+
return "";
|
221
|
+
}
|
222
|
+
|
223
|
+
if(!possible.test(string)) { return string; }
|
224
|
+
return string.replace(badChars, escapeChar);
|
225
|
+
},
|
226
|
+
|
227
|
+
isEmpty: function(value) {
|
228
|
+
if (!value && value !== 0) {
|
229
|
+
return true;
|
230
|
+
} else if(Object.prototype.toString.call(value) === "[object Array]" && value.length === 0) {
|
231
|
+
return true;
|
232
|
+
} else {
|
233
|
+
return false;
|
234
|
+
}
|
235
|
+
}
|
236
|
+
};
|
237
|
+
})();;
|
238
|
+
// lib/handlebars/runtime.js
|
239
|
+
Handlebars.VM = {
|
240
|
+
template: function(templateSpec) {
|
241
|
+
// Just add water
|
242
|
+
var container = {
|
243
|
+
escapeExpression: Handlebars.Utils.escapeExpression,
|
244
|
+
invokePartial: Handlebars.VM.invokePartial,
|
245
|
+
programs: [],
|
246
|
+
program: function(i, fn, data) {
|
247
|
+
var programWrapper = this.programs[i];
|
248
|
+
if(data) {
|
249
|
+
return Handlebars.VM.program(fn, data);
|
250
|
+
} else if(programWrapper) {
|
251
|
+
return programWrapper;
|
252
|
+
} else {
|
253
|
+
programWrapper = this.programs[i] = Handlebars.VM.program(fn);
|
254
|
+
return programWrapper;
|
255
|
+
}
|
256
|
+
},
|
257
|
+
programWithDepth: Handlebars.VM.programWithDepth,
|
258
|
+
noop: Handlebars.VM.noop,
|
259
|
+
compilerInfo: null
|
260
|
+
};
|
261
|
+
|
262
|
+
return function(context, options) {
|
263
|
+
options = options || {};
|
264
|
+
var result = templateSpec.call(container, Handlebars, context, options.helpers, options.partials, options.data);
|
265
|
+
|
266
|
+
var compilerInfo = container.compilerInfo || [],
|
267
|
+
compilerRevision = compilerInfo[0] || 1,
|
268
|
+
currentRevision = Handlebars.COMPILER_REVISION;
|
269
|
+
|
270
|
+
if (compilerRevision !== currentRevision) {
|
271
|
+
if (compilerRevision < currentRevision) {
|
272
|
+
var runtimeVersions = Handlebars.REVISION_CHANGES[currentRevision],
|
273
|
+
compilerVersions = Handlebars.REVISION_CHANGES[compilerRevision];
|
274
|
+
throw "Template was precompiled with an older version of Handlebars than the current runtime. "+
|
275
|
+
"Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").";
|
276
|
+
} else {
|
277
|
+
// Use the embedded version info since the runtime doesn't know about this revision yet
|
278
|
+
throw "Template was precompiled with a newer version of Handlebars than the current runtime. "+
|
279
|
+
"Please update your runtime to a newer version ("+compilerInfo[1]+").";
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
return result;
|
284
|
+
};
|
285
|
+
},
|
286
|
+
|
287
|
+
programWithDepth: function(fn, data, $depth) {
|
288
|
+
var args = Array.prototype.slice.call(arguments, 2);
|
289
|
+
|
290
|
+
return function(context, options) {
|
291
|
+
options = options || {};
|
292
|
+
|
293
|
+
return fn.apply(this, [context, options.data || data].concat(args));
|
294
|
+
};
|
295
|
+
},
|
296
|
+
program: function(fn, data) {
|
297
|
+
return function(context, options) {
|
298
|
+
options = options || {};
|
299
|
+
|
300
|
+
return fn(context, options.data || data);
|
301
|
+
};
|
302
|
+
},
|
303
|
+
noop: function() { return ""; },
|
304
|
+
invokePartial: function(partial, name, context, helpers, partials, data) {
|
305
|
+
var options = { helpers: helpers, partials: partials, data: data };
|
306
|
+
|
307
|
+
if(partial === undefined) {
|
308
|
+
throw new Handlebars.Exception("The partial " + name + " could not be found");
|
309
|
+
} else if(partial instanceof Function) {
|
310
|
+
return partial(context, options);
|
311
|
+
} else if (!Handlebars.compile) {
|
312
|
+
throw new Handlebars.Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
|
313
|
+
} else {
|
314
|
+
partials[name] = Handlebars.compile(partial, {data: data !== undefined});
|
315
|
+
return partials[name](context, options);
|
316
|
+
}
|
317
|
+
}
|
318
|
+
};
|
319
|
+
|
320
|
+
Handlebars.template = Handlebars.VM.template;
|
321
|
+
;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{
|
2
|
+
"name": "jquery",
|
3
|
+
"version": "1.9.1",
|
4
|
+
"main": "./jquery.js",
|
5
|
+
"dependencies": {},
|
6
|
+
"gitHead": "c09c0bde45fa279780815d789d8ee53d3762ace3",
|
7
|
+
"_id": "jquery@1.9.1",
|
8
|
+
"readme": "ERROR: No README.md file found!",
|
9
|
+
"description": "ERROR: No README.md file found!",
|
10
|
+
"repository": {
|
11
|
+
"type": "git",
|
12
|
+
"url": "git://github.com/components/jquery.git"
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "components/jquery",
|
3
|
+
"description": "jQuery JavaScript Library",
|
4
|
+
"type": "component",
|
5
|
+
"homepage": "http://jquery.com",
|
6
|
+
"license": "MIT",
|
7
|
+
"support": {
|
8
|
+
"irc": "irc://irc.freenode.org/jquery",
|
9
|
+
"issues": "http://bugs.jquery.com",
|
10
|
+
"forum": "http://forum.jquery.com",
|
11
|
+
"wiki": "http://docs.jquery.com/",
|
12
|
+
"source": "https://github.com/jquery/jquery"
|
13
|
+
},
|
14
|
+
"authors": [
|
15
|
+
{
|
16
|
+
"name": "John Resig",
|
17
|
+
"email": "jeresig@gmail.com"
|
18
|
+
}
|
19
|
+
],
|
20
|
+
"require": {
|
21
|
+
"robloach/component-installer": "*"
|
22
|
+
},
|
23
|
+
"extra": {
|
24
|
+
"js": "jquery.js"
|
25
|
+
}
|
26
|
+
}
|