sass-twitter-bootstrap 0.1.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/{sass-twitter-bootstrap.rb → sass/twitter/bootstrap.rb} +1 -1
- data/lib/sass/twitter/bootstrap/rails.rb +1 -5
- data/lib/sass/twitter/bootstrap/rails/engine.rb +12 -0
- data/lib/sass/twitter/bootstrap/version.rb +1 -1
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap-alert.js +32 -28
- data/vendor/assets/javascripts/twitter/bootstrap-button.js +33 -29
- data/vendor/assets/javascripts/twitter/bootstrap-carousel.js +21 -33
- data/vendor/assets/javascripts/twitter/bootstrap-collapse.js +26 -47
- data/vendor/assets/javascripts/twitter/bootstrap-dropdown.js +10 -18
- data/vendor/assets/javascripts/twitter/bootstrap-modal.js +17 -25
- data/vendor/assets/javascripts/twitter/bootstrap-popover.js +10 -13
- data/vendor/assets/javascripts/twitter/bootstrap-scrollspy.js +18 -44
- data/vendor/assets/javascripts/twitter/bootstrap-tab.js +7 -12
- data/vendor/assets/javascripts/twitter/bootstrap-tooltip.js +35 -40
- data/vendor/assets/javascripts/twitter/bootstrap-transition.js +20 -30
- data/vendor/assets/javascripts/twitter/bootstrap-typeahead.js +15 -29
- data/vendor/assets/stylesheets/tests/buttons.html +139 -0
- data/vendor/assets/stylesheets/tests/css-tests.css +99 -1
- data/vendor/assets/stylesheets/tests/css-tests.html +519 -37
- data/vendor/assets/stylesheets/tests/forms-responsive.html +71 -0
- data/vendor/assets/stylesheets/tests/navbar-fixed-top.html +104 -0
- data/vendor/assets/stylesheets/tests/navbar-static-top.html +107 -0
- data/vendor/assets/stylesheets/tests/navbar.html +38 -39
- data/vendor/assets/stylesheets/twitter/_accordion.scss +0 -5
- data/vendor/assets/stylesheets/twitter/_alerts.scss +15 -3
- data/vendor/assets/stylesheets/twitter/_breadcrumbs.scss +0 -2
- data/vendor/assets/stylesheets/twitter/_button-groups.scss +32 -76
- data/vendor/assets/stylesheets/twitter/_buttons.scss +25 -33
- data/vendor/assets/stylesheets/twitter/_close.scss +1 -12
- data/vendor/assets/stylesheets/twitter/_code.scss +8 -8
- data/vendor/assets/stylesheets/twitter/_component-animations.scss +7 -9
- data/vendor/assets/stylesheets/twitter/_dropdowns.scss +45 -58
- data/vendor/assets/stylesheets/twitter/_forms.scss +146 -206
- data/vendor/assets/stylesheets/twitter/_grid.scss +5 -2
- data/vendor/assets/stylesheets/twitter/_hero-unit.scss +1 -3
- data/vendor/assets/stylesheets/twitter/_labels.scss +32 -0
- data/vendor/assets/stylesheets/twitter/_layouts.scss +2 -2
- data/vendor/assets/stylesheets/twitter/_mixins.scss +208 -273
- data/vendor/assets/stylesheets/twitter/_modals.scss +8 -14
- data/vendor/assets/stylesheets/twitter/_navbar.scss +73 -132
- data/vendor/assets/stylesheets/twitter/_navs.scss +43 -53
- data/vendor/assets/stylesheets/twitter/_pager.scss +0 -6
- data/vendor/assets/stylesheets/twitter/_pagination.scss +0 -1
- data/vendor/assets/stylesheets/twitter/_progress-bars.scss +6 -28
- data/vendor/assets/stylesheets/twitter/_reset.scss +4 -9
- data/vendor/assets/stylesheets/twitter/_scaffolding.scss +8 -4
- data/vendor/assets/stylesheets/twitter/_sprites.scss +7 -40
- data/vendor/assets/stylesheets/twitter/_tables.scss +33 -38
- data/vendor/assets/stylesheets/twitter/_thumbnails.scss +2 -14
- data/vendor/assets/stylesheets/twitter/_tooltip.scss +1 -1
- data/vendor/assets/stylesheets/twitter/_type.scss +14 -28
- data/vendor/assets/stylesheets/twitter/_variables.scss +19 -116
- data/vendor/assets/stylesheets/twitter/_wells.scss +0 -10
- data/vendor/assets/stylesheets/twitter/bootstrap.scss +7 -3
- data/vendor/assets/stylesheets/twitter/responsive.scss +301 -15
- metadata +25 -190
- data/.gitignore +0 -4
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -14
- data/LICENSE +0 -176
- data/Makefile +0 -94
- data/README.md +0 -217
- data/Rakefile +0 -52
- data/bootstrap-2.0.4.css +0 -4661
- data/bootstrap-2.0.4.min.css +0 -9
- data/bootstrap-responsive-2.0.4.css +0 -932
- data/bootstrap-responsive-2.0.4.min.css +0 -9
- data/docs/assets/css/bootstrap-responsive.css +0 -932
- data/docs/assets/css/bootstrap.css +0 -4661
- data/docs/assets/css/docs.css +0 -846
- data/docs/assets/ico/apple-touch-icon-114-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-57-precomposed.png +0 -0
- data/docs/assets/ico/apple-touch-icon-72-precomposed.png +0 -0
- data/docs/assets/ico/favicon.ico +0 -0
- data/docs/assets/img/bird.png +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg +0 -0
- data/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg +0 -0
- data/docs/assets/img/browsers.png +0 -0
- data/docs/assets/img/example-sites/fleetio.png +0 -0
- data/docs/assets/img/example-sites/jshint.png +0 -0
- data/docs/assets/img/example-sites/kippt.png +0 -0
- data/docs/assets/img/example-sites/soundready.png +0 -0
- data/docs/assets/img/examples/bootstrap-example-fluid.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-hero.jpg +0 -0
- data/docs/assets/img/examples/bootstrap-example-starter.jpg +0 -0
- data/docs/assets/img/github-16px.png +0 -0
- data/docs/assets/img/glyphicons-halflings-white.png +0 -0
- data/docs/assets/img/glyphicons-halflings.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_009_magic.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_042_group.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_079_podium.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_082_roundabout.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_155_show_thumbnails.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_163_iphone.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_214_resize_small.png +0 -0
- data/docs/assets/img/glyphicons/glyphicons_266_book_open.png +0 -0
- data/docs/assets/img/grid-18px-masked.png +0 -0
- data/docs/assets/img/icon-css3.png +0 -0
- data/docs/assets/img/icon-github.png +0 -0
- data/docs/assets/img/icon-html5.png +0 -0
- data/docs/assets/img/icon-twitter.png +0 -0
- data/docs/assets/img/less-logo-large.png +0 -0
- data/docs/assets/img/less-small.png +0 -0
- data/docs/assets/img/responsive-illustrations.png +0 -0
- data/docs/assets/js/README.md +0 -106
- data/docs/assets/js/application.js +0 -184
- data/docs/assets/js/bootstrap-alert.js +0 -90
- data/docs/assets/js/bootstrap-button.js +0 -96
- data/docs/assets/js/bootstrap-carousel.js +0 -169
- data/docs/assets/js/bootstrap-collapse.js +0 -157
- data/docs/assets/js/bootstrap-dropdown.js +0 -100
- data/docs/assets/js/bootstrap-modal.js +0 -218
- data/docs/assets/js/bootstrap-popover.js +0 -98
- data/docs/assets/js/bootstrap-scrollspy.js +0 -151
- data/docs/assets/js/bootstrap-tab.js +0 -135
- data/docs/assets/js/bootstrap-tooltip.js +0 -275
- data/docs/assets/js/bootstrap-transition.js +0 -61
- data/docs/assets/js/bootstrap-typeahead.js +0 -285
- data/docs/assets/js/bootstrap.js +0 -1825
- data/docs/assets/js/bootstrap.min.js +0 -6
- data/docs/assets/js/google-code-prettify/prettify.css +0 -30
- data/docs/assets/js/google-code-prettify/prettify.js +0 -28
- data/docs/assets/js/jquery.js +0 -9252
- data/docs/base-css.html +0 -1710
- data/docs/build/index.js +0 -44
- data/docs/build/node_modules/.bin/hulk +0 -93
- data/docs/build/node_modules/hogan.js/.git_ignore +0 -1
- data/docs/build/node_modules/hogan.js/.gitmodules +0 -3
- data/docs/build/node_modules/hogan.js/LICENSE +0 -177
- data/docs/build/node_modules/hogan.js/Makefile +0 -62
- data/docs/build/node_modules/hogan.js/README.md +0 -93
- data/docs/build/node_modules/hogan.js/bin/hulk +0 -93
- data/docs/build/node_modules/hogan.js/lib/compiler.js +0 -348
- data/docs/build/node_modules/hogan.js/lib/hogan.js +0 -20
- data/docs/build/node_modules/hogan.js/lib/template.js +0 -233
- data/docs/build/node_modules/hogan.js/package.json +0 -20
- data/docs/build/node_modules/hogan.js/test/html/list.html +0 -8
- data/docs/build/node_modules/hogan.js/test/index.html +0 -13
- data/docs/build/node_modules/hogan.js/test/index.js +0 -848
- data/docs/build/node_modules/hogan.js/test/mustache.js +0 -90
- data/docs/build/node_modules/hogan.js/test/spec.js +0 -77
- data/docs/build/node_modules/hogan.js/test/spec/Changes +0 -31
- data/docs/build/node_modules/hogan.js/test/spec/README.md +0 -65
- data/docs/build/node_modules/hogan.js/test/spec/Rakefile +0 -27
- data/docs/build/node_modules/hogan.js/test/spec/TESTING.md +0 -46
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml +0 -103
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.yml +0 -158
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/interpolation.yml +0 -230
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/inverted.yml +0 -193
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml +0 -109
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/sections.yml +0 -256
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.json +0 -1
- data/docs/build/node_modules/hogan.js/test/spec/specs/~lambdas.yml +0 -149
- data/docs/build/node_modules/hogan.js/test/templates/list.mustache +0 -8
- data/docs/build/node_modules/hogan.js/tools/release.js +0 -74
- data/docs/build/node_modules/hogan.js/tools/web_templates.js +0 -32
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.js +0 -500
- data/docs/build/node_modules/hogan.js/web/1.0.0/hogan.min.js +0 -14
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.js +0 -500
- data/docs/build/node_modules/hogan.js/web/builds/1.0.0/hogan.min.js +0 -14
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.js +0 -545
- data/docs/build/node_modules/hogan.js/web/builds/1.0.3/hogan.min.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.amd.js +0 -576
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.common.js +0 -576
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.js +0 -572
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.amd.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.common.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.min.mustache.js +0 -5
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/hogan-1.0.5.mustache.js +0 -619
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.js +0 -233
- data/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js +0 -5
- data/docs/build/node_modules/hogan.js/web/favicon.ico +0 -0
- data/docs/build/node_modules/hogan.js/web/images/logo.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/noise.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png +0 -0
- data/docs/build/node_modules/hogan.js/web/images/stripes.png +0 -0
- data/docs/build/node_modules/hogan.js/web/index.html.mustache +0 -139
- data/docs/build/node_modules/hogan.js/web/stylesheets/layout.css +0 -206
- data/docs/build/node_modules/hogan.js/web/stylesheets/skeleton.css +0 -236
- data/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache +0 -21
- data/docs/build/node_modules/hogan.js/wrappers/common.js.mustache +0 -21
- data/docs/build/node_modules/hogan.js/wrappers/js.mustache +0 -17
- data/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache +0 -64
- data/docs/build/package.json +0 -6
- data/docs/components.html +0 -1931
- data/docs/download.html +0 -454
- data/docs/examples.html +0 -147
- data/docs/examples/fluid.html +0 -162
- data/docs/examples/hero.html +0 -109
- data/docs/examples/starter-template.html +0 -79
- data/docs/index.html +0 -259
- data/docs/javascript.html +0 -1520
- data/docs/less.html +0 -1060
- data/docs/scaffolding.html +0 -671
- data/docs/templates/layout.mustache +0 -146
- data/docs/templates/pages/base-css.mustache +0 -1594
- data/docs/templates/pages/components.mustache +0 -1815
- data/docs/templates/pages/download.mustache +0 -338
- data/docs/templates/pages/examples.mustache +0 -31
- data/docs/templates/pages/index.mustache +0 -144
- data/docs/templates/pages/javascript.mustache +0 -1405
- data/docs/templates/pages/less.mustache +0 -944
- data/docs/templates/pages/scaffolding.mustache +0 -555
- data/docs/templates/pages/upgrading.mustache +0 -194
- data/docs/upgrading.html +0 -310
- data/js/tests/index.html +0 -54
- data/js/tests/phantom.js +0 -63
- data/js/tests/server.js +0 -14
- data/js/tests/unit/bootstrap-alert.js +0 -56
- data/js/tests/unit/bootstrap-button.js +0 -77
- data/js/tests/unit/bootstrap-carousel.js +0 -28
- data/js/tests/unit/bootstrap-collapse.js +0 -54
- data/js/tests/unit/bootstrap-dropdown.js +0 -87
- data/js/tests/unit/bootstrap-modal.js +0 -114
- data/js/tests/unit/bootstrap-phantom.js +0 -21
- data/js/tests/unit/bootstrap-popover.js +0 -93
- data/js/tests/unit/bootstrap-scrollspy.js +0 -31
- data/js/tests/unit/bootstrap-tab.js +0 -61
- data/js/tests/unit/bootstrap-tooltip.js +0 -155
- data/js/tests/unit/bootstrap-transition.js +0 -13
- data/js/tests/unit/bootstrap-typeahead.js +0 -148
- data/js/tests/vendor/jquery.js +0 -9252
- data/js/tests/vendor/qunit.css +0 -232
- data/js/tests/vendor/qunit.js +0 -1510
- data/package.json +0 -25
- data/sass-twitter-bootstrap.gemspec +0 -19
- data/vendor/assets/javascripts/README.md +0 -112
- data/vendor/assets/javascripts/twitter/bootstrap.js +0 -12
- data/vendor/assets/stylesheets/twitter/_labels-badges.scss +0 -52
- data/vendor/assets/stylesheets/twitter/_responsive-1200px-min.scss +0 -26
- data/vendor/assets/stylesheets/twitter/_responsive-767px-max.scss +0 -149
- data/vendor/assets/stylesheets/twitter/_responsive-768px-979px.scss +0 -17
- data/vendor/assets/stylesheets/twitter/_responsive-navbar.scss +0 -153
- data/vendor/assets/stylesheets/twitter/_responsive-utilities.scss +0 -41
data/docs/build/index.js
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
var hogan = require('hogan.js')
|
3
|
-
, fs = require('fs')
|
4
|
-
, prod = process.argv[2] == 'production'
|
5
|
-
, title = 'Twitter Bootstrap'
|
6
|
-
|
7
|
-
var layout, pages
|
8
|
-
|
9
|
-
// compile layout template
|
10
|
-
layout = fs.readFileSync(__dirname + '/../templates/layout.mustache', 'utf-8')
|
11
|
-
layout = hogan.compile(layout, { sectionTags: [{o:'_i', c:'i'}] })
|
12
|
-
|
13
|
-
// retrieve pages
|
14
|
-
pages = fs.readdirSync(__dirname + '/../templates/pages')
|
15
|
-
|
16
|
-
// iterate over pages
|
17
|
-
pages.forEach(function (name) {
|
18
|
-
|
19
|
-
if (!name.match(/\.mustache$/)) return
|
20
|
-
|
21
|
-
var page = fs.readFileSync(__dirname + '/../templates/pages/' + name, 'utf-8')
|
22
|
-
, context = {}
|
23
|
-
|
24
|
-
context[name.replace(/\.mustache$/, '')] = 'active'
|
25
|
-
context._i = true
|
26
|
-
context.production = prod
|
27
|
-
context.title = name
|
28
|
-
.replace(/\.mustache/, '')
|
29
|
-
.replace(/\-.*/, '')
|
30
|
-
.replace(/(.)/, function ($1) { return $1.toUpperCase() })
|
31
|
-
|
32
|
-
if (context.title == 'Index') {
|
33
|
-
context.title = title
|
34
|
-
} else {
|
35
|
-
context.title += ' · ' + title
|
36
|
-
}
|
37
|
-
|
38
|
-
page = hogan.compile(page, { sectionTags: [{o:'_i', c:'i'}] })
|
39
|
-
page = layout.render(context, {
|
40
|
-
body: page
|
41
|
-
})
|
42
|
-
|
43
|
-
fs.writeFileSync(__dirname + '/../' + name.replace(/mustache$/, 'html'), page, 'utf-8')
|
44
|
-
})
|
@@ -1,93 +0,0 @@
|
|
1
|
-
#!/usr/bin/env node
|
2
|
-
|
3
|
-
/*
|
4
|
-
* Copyright 2011 Twitter, Inc.
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
* you may not use this file except in compliance with the License.
|
7
|
-
* You may obtain a copy of the License at
|
8
|
-
*
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
*
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
* See the License for the specific language governing permissions and
|
15
|
-
* limitations under the License.
|
16
|
-
*/
|
17
|
-
|
18
|
-
var hogan = require('../lib/hogan.js'),
|
19
|
-
path = require('path'),
|
20
|
-
fs = require('fs');
|
21
|
-
|
22
|
-
var specials = ['/', '.', '*', '+', '?', '|','(', ')', '[', ']', '{', '}', '\\'],
|
23
|
-
specialsRegExp = new RegExp('(\\' + specials.join('|\\') + ')', 'g'),
|
24
|
-
templates;
|
25
|
-
|
26
|
-
|
27
|
-
// Escape special regexp characters
|
28
|
-
function esc(text) {
|
29
|
-
return text.replace(specialsRegExp, '\\$1');
|
30
|
-
}
|
31
|
-
|
32
|
-
|
33
|
-
// Check for dirs and correct ext (<3 for windows)
|
34
|
-
function extractFiles(args) {
|
35
|
-
var usage = 'USAGE: hulk ./templates/*.mustaches\n' +
|
36
|
-
'NOTE: hulk supports the "*" wildcard and allows you to target specific extensions too',
|
37
|
-
files = [];
|
38
|
-
|
39
|
-
if (!args.length) {
|
40
|
-
console.log(usage);
|
41
|
-
process.exit(-1);
|
42
|
-
}
|
43
|
-
|
44
|
-
args.forEach(function (arg) {
|
45
|
-
|
46
|
-
if (/\*/.test(arg)) {
|
47
|
-
arg = arg.split('*');
|
48
|
-
return files = files.concat(
|
49
|
-
fs.readdirSync(arg[0] || '.')
|
50
|
-
.map(function (f) {
|
51
|
-
return new RegExp(esc(arg[1]) + '$').test(f) && path.join(arg[0], f);
|
52
|
-
})
|
53
|
-
.filter(function (f) {
|
54
|
-
return f;
|
55
|
-
})
|
56
|
-
);
|
57
|
-
}
|
58
|
-
|
59
|
-
files.push(arg);
|
60
|
-
|
61
|
-
})
|
62
|
-
|
63
|
-
return files;
|
64
|
-
}
|
65
|
-
|
66
|
-
|
67
|
-
// Remove utf-8 byte order mark, http://en.wikipedia.org/wiki/Byte_order_mark
|
68
|
-
function removeByteOrderMark(text) {
|
69
|
-
if (text.charCodeAt(0) === 0xfeff) {
|
70
|
-
return text.substring(1);
|
71
|
-
}
|
72
|
-
return text;
|
73
|
-
}
|
74
|
-
|
75
|
-
|
76
|
-
// Write a template foreach file that matches template extension
|
77
|
-
templates = extractFiles(process.argv.slice(2))
|
78
|
-
.map(function (file) {
|
79
|
-
var openedFile = fs.readFileSync(file, 'utf-8'), name;
|
80
|
-
if (!openedFile) return;
|
81
|
-
name = file.replace(/\..*$/, '');
|
82
|
-
openedFile = removeByteOrderMark(openedFile.trim());
|
83
|
-
return 'templates.' + name + ' = new Hogan.Template(' + hogan.compile(openedFile, { asString: 1 }) + ');';
|
84
|
-
})
|
85
|
-
.filter(function (t) {
|
86
|
-
return t;
|
87
|
-
});
|
88
|
-
|
89
|
-
|
90
|
-
// Output templates
|
91
|
-
if (!templates.length) return;
|
92
|
-
console.log('var templates = {};');
|
93
|
-
console.log(templates.join('\n'));
|
@@ -1 +0,0 @@
|
|
1
|
-
node_modules
|
@@ -1,177 +0,0 @@
|
|
1
|
-
|
2
|
-
Apache License
|
3
|
-
Version 2.0, January 2004
|
4
|
-
http://www.apache.org/licenses/
|
5
|
-
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
-
|
8
|
-
1. Definitions.
|
9
|
-
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
-
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
-
the copyright owner that is granting the License.
|
15
|
-
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
-
other entities that control, are controlled by, or are under common
|
18
|
-
control with that entity. For the purposes of this definition,
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
20
|
-
direction or management of such entity, whether by contract or
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
-
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
-
exercising permissions granted by this License.
|
26
|
-
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
28
|
-
including but not limited to software source code, documentation
|
29
|
-
source, and configuration files.
|
30
|
-
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
32
|
-
transformation or translation of a Source form, including but
|
33
|
-
not limited to compiled object code, generated documentation,
|
34
|
-
and conversions to other media types.
|
35
|
-
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
37
|
-
Object form, made available under the License, as indicated by a
|
38
|
-
copyright notice that is included in or attached to the work
|
39
|
-
(an example is provided in the Appendix below).
|
40
|
-
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
-
the Work and Derivative Works thereof.
|
48
|
-
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
50
|
-
the original version of the Work and any modifications or additions
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
52
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
-
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
-
on behalf of whom a Contribution has been received by Licensor and
|
65
|
-
subsequently incorporated within the Work.
|
66
|
-
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
73
|
-
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
-
where such license applies only to those patent claims licensable
|
80
|
-
by such Contributor that are necessarily infringed by their
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
83
|
-
institute patent litigation against any entity (including a
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
86
|
-
or contributory patent infringement, then any patent licenses
|
87
|
-
granted to You under this License for that Work shall terminate
|
88
|
-
as of the date such litigation is filed.
|
89
|
-
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
92
|
-
modifications, and in Source or Object form, provided that You
|
93
|
-
meet the following conditions:
|
94
|
-
|
95
|
-
(a) You must give any other recipients of the Work or
|
96
|
-
Derivative Works a copy of this License; and
|
97
|
-
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
99
|
-
stating that You changed the files; and
|
100
|
-
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
103
|
-
attribution notices from the Source form of the Work,
|
104
|
-
excluding those notices that do not pertain to any part of
|
105
|
-
the Derivative Works; and
|
106
|
-
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
109
|
-
include a readable copy of the attribution notices contained
|
110
|
-
within such NOTICE file, excluding those notices that do not
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
112
|
-
of the following places: within a NOTICE text file distributed
|
113
|
-
as part of the Derivative Works; within the Source form or
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
115
|
-
within a display generated by the Derivative Works, if and
|
116
|
-
wherever such third-party notices normally appear. The contents
|
117
|
-
of the NOTICE file are for informational purposes only and
|
118
|
-
do not modify the License. You may add Your own attribution
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
121
|
-
that such additional attribution notices cannot be construed
|
122
|
-
as modifying the License.
|
123
|
-
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
125
|
-
may provide additional or different license terms and conditions
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
129
|
-
the conditions stated in this License.
|
130
|
-
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
134
|
-
this License, without any additional terms or conditions.
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
-
the terms of any separate license agreement you may have executed
|
137
|
-
with Licensor regarding such Contributions.
|
138
|
-
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
141
|
-
except as required for reasonable and customary use in describing the
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
-
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
153
|
-
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
159
|
-
incidental, or consequential damages of any character arising as a
|
160
|
-
result of this License or out of the use or inability to use the
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
163
|
-
other commercial damages or losses), even if such Contributor
|
164
|
-
has been advised of the possibility of such damages.
|
165
|
-
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
-
or other liability obligations and/or rights consistent with this
|
170
|
-
License. However, in accepting such obligations, You may act only
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
175
|
-
of your accepting any such warranty or additional liability.
|
176
|
-
|
177
|
-
END OF TERMS AND CONDITIONS
|
@@ -1,62 +0,0 @@
|
|
1
|
-
REPO = git@github.com:twitter/hogan.js.git
|
2
|
-
BUILD := build
|
3
|
-
VERSION = ${shell node -e 'var s = JSON.parse(require("fs").readFileSync("package.json").toString()).version; console.log(s.substring(0, s.indexOf("-")));'}
|
4
|
-
|
5
|
-
#
|
6
|
-
# Run command line tests
|
7
|
-
#
|
8
|
-
test:
|
9
|
-
@ node test/index.js
|
10
|
-
|
11
|
-
#
|
12
|
-
# Run Mustache spec tests
|
13
|
-
#
|
14
|
-
spec:
|
15
|
-
@ node test/spec.js
|
16
|
-
|
17
|
-
#
|
18
|
-
# Run benchmark
|
19
|
-
#
|
20
|
-
benchmark:
|
21
|
-
@ node benchmark/console/index.js
|
22
|
-
|
23
|
-
clean:
|
24
|
-
@ rm -rf dist/*
|
25
|
-
#
|
26
|
-
# Make a new version of Hogan from the current dev version.
|
27
|
-
#
|
28
|
-
release: clean
|
29
|
-
@ echo "Creating a new version of Hogan."
|
30
|
-
@ mkdir -p dist/nodejs
|
31
|
-
@ cp -R lib dist/nodejs/lib
|
32
|
-
@ node tools/release.js
|
33
|
-
@ mkdir -p web/builds/$(VERSION)
|
34
|
-
@ cp dist/*.* web/builds/$(VERSION)/.
|
35
|
-
#
|
36
|
-
# Make the gh-pages website
|
37
|
-
#
|
38
|
-
# This target builds the hogan.js github website using hogan.js.
|
39
|
-
#
|
40
|
-
# cd into build/gh-pages to check in the new site.
|
41
|
-
#
|
42
|
-
GH_PAGES = $(BUILD)/gh-pages
|
43
|
-
web: | pages
|
44
|
-
@cp -R web/* $(GH_PAGES)
|
45
|
-
@@ node tools/web_templates.js
|
46
|
-
@echo
|
47
|
-
@echo "Website built in $(GH_PAGES)."
|
48
|
-
|
49
|
-
#
|
50
|
-
# Checkout the gh-pages branch.
|
51
|
-
#
|
52
|
-
pages: | $(BUILD)
|
53
|
-
@if [ ! -d "$(GH_PAGES)" ]; then \
|
54
|
-
git clone -b gh-pages $(REPO) $(GH_PAGES); \
|
55
|
-
rm -rf $(GH_PAGES)/*; \
|
56
|
-
fi;
|
57
|
-
@mkdir -p $(GH_PAGES)/images
|
58
|
-
|
59
|
-
$(BUILD):
|
60
|
-
mkdir -p $(BUILD)
|
61
|
-
|
62
|
-
.PHONY: test spec benchmark web release
|
@@ -1,93 +0,0 @@
|
|
1
|
-
## Hogan.js - A mustache compiler.
|
2
|
-
|
3
|
-
[Hogan.js](http://twitter.github.com/hogan.js/) is a compiler for the
|
4
|
-
[Mustache](http://mustache.github.com/) templating language. For information
|
5
|
-
on Mustache, see the [manpage](http://mustache.github.com/mustache.5.html) and
|
6
|
-
the [spec](https://github.com/mustache/spec).
|
7
|
-
|
8
|
-
## Basics
|
9
|
-
|
10
|
-
Hogan compiles templates to HoganTemplate objects, which have a render method.
|
11
|
-
|
12
|
-
```js
|
13
|
-
var data = {
|
14
|
-
screenName: "dhg",
|
15
|
-
};
|
16
|
-
|
17
|
-
var template = Hogan.compile("Follow @{{screenName}}.");
|
18
|
-
var output = template.render(data);
|
19
|
-
|
20
|
-
// prints "Follow @dhg."
|
21
|
-
console.log(output);
|
22
|
-
```
|
23
|
-
|
24
|
-
## Features
|
25
|
-
|
26
|
-
Hogan is fast--try it on your workload.
|
27
|
-
|
28
|
-
Hogan has separate scanning, parsing and code generation phases. This way it's
|
29
|
-
possible to add new features without touching the scanner at all, and many
|
30
|
-
different code generation techniques can be tried without changing the parser.
|
31
|
-
|
32
|
-
Hogan exposes scan and parse methods. These can be useful for
|
33
|
-
pre-processing templates on the server.
|
34
|
-
|
35
|
-
```js
|
36
|
-
var text = "{{^check}}{{i18n}}No{{/i18n}}{{/check}}";
|
37
|
-
text += "{{#check}}{{i18n}}Yes{{/i18n}}{{/check}}";
|
38
|
-
var tree = Hogan.parse(Hogan.scan(text));
|
39
|
-
|
40
|
-
// outputs "# check"
|
41
|
-
console.log(tree[0].tag + " " + tree[0].name);
|
42
|
-
|
43
|
-
// outputs "Yes"
|
44
|
-
console.log(tree[1].nodes[0].nodes[0]);
|
45
|
-
```
|
46
|
-
|
47
|
-
It's also possible to use HoganTemplate objects without the Hogan compiler
|
48
|
-
present. That means you can pre-compile your templates on the server, and
|
49
|
-
avoid shipping the compiler. However, the optional lambda features from the
|
50
|
-
Mustache spec do require the compiler to be present.
|
51
|
-
|
52
|
-
## Why Hogan.js?
|
53
|
-
|
54
|
-
Why another templating library?
|
55
|
-
|
56
|
-
Hogan.js was written to meet three templating library requirements: good
|
57
|
-
performance, standalone template objects, and a parser API.
|
58
|
-
|
59
|
-
## Issues
|
60
|
-
|
61
|
-
Have a bug? Please create an issue here on GitHub!
|
62
|
-
|
63
|
-
https://github.com/twitter/hogan.js/issues
|
64
|
-
|
65
|
-
## Versioning
|
66
|
-
|
67
|
-
For transparency and insight into our release cycle, releases will be numbered with the follow format:
|
68
|
-
|
69
|
-
`<major>.<minor>.<patch>`
|
70
|
-
|
71
|
-
And constructed with the following guidelines:
|
72
|
-
|
73
|
-
* Breaking backwards compatibility bumps the major
|
74
|
-
* New additions without breaking backwards compatibility bumps the minor
|
75
|
-
* Bug fixes and misc changes bump the patch
|
76
|
-
|
77
|
-
For more information on semantic versioning, please visit http://semver.org/.
|
78
|
-
|
79
|
-
## Authors
|
80
|
-
|
81
|
-
**Robert Sayre**
|
82
|
-
|
83
|
-
+ http://github.com/sayrer
|
84
|
-
|
85
|
-
**Jacob Thornton**
|
86
|
-
|
87
|
-
+ http://github.com/fat
|
88
|
-
|
89
|
-
## License
|
90
|
-
|
91
|
-
Copyright 2011 Twitter, Inc.
|
92
|
-
|
93
|
-
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
|