`.
29 |
30 | 3. Use it as you would the regular Bootstrap. It's that simple.
31 |
32 | ## Customizations
33 |
34 | If you want to edit anything, fork or clone the repo and open `variables.less`.
35 | It contains the original Bootstrap variables along with some new ones for Inspiritas.
36 |
37 | Make whichever changes you want and then run a less compiler to create
38 | the updated and minified CSS for you.
39 |
40 | ## Adding overrides
41 |
42 | All styling by Inspiritas extends or overrides the original Bootstrap styling. This makes
43 | it easy to get new patches from Bootstrap into the theme.
44 |
45 | We recommend you use the same method if you want to change more than what the variables
46 | allow you to. In the end of `inspiritas-theme.less`, you can add your own styles.
47 |
48 | If you keep all the original styling of both Bootstrap and Inspiritas intact, you can
49 | get new updates from us as well, without having to go through tons of git conflicts.
50 |
51 | ## Photoshop file included
52 |
53 | We've included the original PSD file we used to build this design. Note that
54 | when coding the theme some subtle changes were made and we perceive the coded theme
55 | to be the correct version in most cases, but the PSD file may still be useful for you.
56 |
57 | Also, the PSD includes some elements we've not yet coded but may in the future.
58 |
59 | ## Highcharts charting library
60 | The JavaScript library for the graph is called HighchartsJS.
61 | It's free for non-commerical projects but quite costly for commerical use.
62 |
--------------------------------------------------------------------------------
/bootstrap/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 0.6
--------------------------------------------------------------------------------
/bootstrap/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Bootstrap
2 |
3 | Looking to contribute something to Bootstrap? **Here's how you can help.**
4 |
5 |
6 |
7 | ## Reporting issues
8 |
9 | We only accept issues that are bug reports or feature requests. Bugs must be isolated and reproducible problems that we can fix within the Bootstrap core. Please read the following guidelines before opening any issue.
10 |
11 | 1. **Search for existing issues.** We get a lot of duplicate issues, and you'd help us out a lot by first checking if someone else has reported the same issue. Moreover, the issue may have already been resolved with a fix available.
12 | 2. **Create an isolated and reproducible test case.** Be sure the problem exists in Bootstrap's code with a [reduced test cases](http://css-tricks.com/reduced-test-cases/) that should be included in each bug report.
13 | 3. **Include a live example.** Make use of jsFiddle or jsBin to share your isolated test cases.
14 | 4. **Share as much information as possible.** Include operating system and version, browser and version, version of Bootstrap, customized or vanilla build, etc. where appropriate. Also include steps to reproduce the bug.
15 |
16 |
17 |
18 | ## Key branches
19 |
20 | - `master` is the latest, deployed version.
21 | - `gh-pages` is the hosted docs (not to be used for pull requests).
22 | - `*-wip` is the official work in progress branch for the next release.
23 |
24 |
25 |
26 | ## Notes on the repo
27 |
28 | As of v2.0.0, Bootstrap's documentation is powered by Mustache templates and built via `make` before each commit and release. This was done to enable internationalization (translation) in a future release by uploading our strings to the [Twitter Translation Center](http://translate.twttr.com/). Any edits to the docs should be first done in the Mustache files and then recompiled into the HTML.
29 |
30 |
31 |
32 | ## Pull requests
33 |
34 | - Try to submit pull requests against the latest `*-wip` branch for easier merging
35 | - Any changes to the docs must be made to the Mustache templates, not just the compiled HTML pages
36 | - CSS changes must be done in .less files first, never just the compiled files
37 | - If modifying the .less files, always recompile and commit the compiled files bootstrap.css and bootstrap.min.css
38 | - Try not to pollute your pull request with unintended changes--keep them simple and small
39 | - Try to share which browsers your code has been tested in before submitting a pull request
40 |
41 |
42 |
43 | ## Coding standards: HTML
44 |
45 | - Two spaces for indentation, never tabs
46 | - Double quotes only, never single quotes
47 | - Always use proper indentation
48 | - Use tags and elements appropriate for an HTML5 doctype (e.g., self-closing tags)
49 |
50 |
51 |
52 | ## Coding standards: CSS
53 |
54 | - Adhere to the [Recess CSS property order](http://markdotto.com/2011/11/29/css-property-order/)
55 | - Multiple-line approach (one property and value per line)
56 | - Always a space after a property's colon (.e.g, `display: block;` and not `display:block;`)
57 | - End all lines with a semi-colon
58 | - For multiple, comma-separated selectors, place each selector on it's own line
59 | - Attribute selectors, like `input[type="text"]` should always wrap the attribute's value in double quotes, for consistency and safety (see this [blog post on unquoted attribute values](http://mathiasbynens.be/notes/unquoted-attribute-values) that can lead to XSS attacks).
60 |
61 |
62 |
63 | ## Coding standards: JS
64 |
65 | - No semicolons
66 | - Comma first
67 | - 2 spaces (no tabs)
68 | - strict mode
69 | - "Attractive"
70 |
71 |
72 |
73 | ## License
74 |
75 | By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/twitter/bootstrap/blob/master/LICENSE
76 |
--------------------------------------------------------------------------------
/bootstrap/Makefile:
--------------------------------------------------------------------------------
1 | BOOTSTRAP = ./docs/assets/css/bootstrap.css
2 | BOOTSTRAP_LESS = ./less/bootstrap.less
3 | BOOTSTRAP_RESPONSIVE = ./docs/assets/css/bootstrap-responsive.css
4 | BOOTSTRAP_RESPONSIVE_LESS = ./less/responsive.less
5 | DATE=$(shell date +%I:%M%p)
6 | CHECK=\033[32m✔\033[39m
7 | HR=\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#
8 |
9 |
10 | #
11 | # BUILD DOCS
12 | #
13 |
14 | build:
15 | @echo "\n${HR}"
16 | @echo "Building Bootstrap..."
17 | @echo "${HR}\n"
18 | @jshint js/*.js --config js/.jshintrc
19 | @jshint js/tests/unit/*.js --config js/.jshintrc
20 | @echo "Running JSHint on javascript... ${CHECK} Done"
21 | @recess --compile ${BOOTSTRAP_LESS} > ${BOOTSTRAP}
22 | @recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > ${BOOTSTRAP_RESPONSIVE}
23 | @echo "Compiling LESS with Recess... ${CHECK} Done"
24 | @node docs/build
25 | @cp img/* docs/assets/img/
26 | @cp js/*.js docs/assets/js/
27 | @cp js/tests/vendor/jquery.js docs/assets/js/
28 | @echo "Compiling documentation... ${CHECK} Done"
29 | @cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > docs/assets/js/bootstrap.js
30 | @uglifyjs -nc docs/assets/js/bootstrap.js > docs/assets/js/bootstrap.min.tmp.js
31 | @echo "/**\n* Bootstrap.js v2.2.1 by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > docs/assets/js/copyright.js
32 | @cat docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js > docs/assets/js/bootstrap.min.js
33 | @rm docs/assets/js/copyright.js docs/assets/js/bootstrap.min.tmp.js
34 | @echo "Compiling and minifying javascript... ${CHECK} Done"
35 | @echo "\n${HR}"
36 | @echo "Bootstrap successfully built at ${DATE}."
37 | @echo "${HR}\n"
38 | @echo "Thanks for using Bootstrap,"
39 | @echo "<3 @mdo and @fat\n"
40 |
41 | #
42 | # RUN JSHINT & QUNIT TESTS IN PHANTOMJS
43 | #
44 |
45 | test:
46 | jshint js/*.js --config js/.jshintrc
47 | jshint js/tests/unit/*.js --config js/.jshintrc
48 | node js/tests/server.js &
49 | phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
50 | kill -9 `cat js/tests/pid.txt`
51 | rm js/tests/pid.txt
52 |
53 | #
54 | # CLEANS THE ROOT DIRECTORY OF PRIOR BUILDS
55 | #
56 |
57 | clean:
58 | rm -r bootstrap
59 |
60 | #
61 | # BUILD SIMPLE BOOTSTRAP DIRECTORY
62 | # recess & uglifyjs are required
63 | #
64 |
65 | bootstrap:
66 | mkdir -p bootstrap/img
67 | mkdir -p bootstrap/css
68 | mkdir -p bootstrap/js
69 | cp img/* bootstrap/img/
70 | recess --compile ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.css
71 | recess --compress ${BOOTSTRAP_LESS} > bootstrap/css/bootstrap.min.css
72 | recess --compile ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.css
73 | recess --compress ${BOOTSTRAP_RESPONSIVE_LESS} > bootstrap/css/bootstrap-responsive.min.css
74 | cat js/bootstrap-transition.js js/bootstrap-alert.js js/bootstrap-button.js js/bootstrap-carousel.js js/bootstrap-collapse.js js/bootstrap-dropdown.js js/bootstrap-modal.js js/bootstrap-tooltip.js js/bootstrap-popover.js js/bootstrap-scrollspy.js js/bootstrap-tab.js js/bootstrap-typeahead.js js/bootstrap-affix.js > bootstrap/js/bootstrap.js
75 | uglifyjs -nc bootstrap/js/bootstrap.js > bootstrap/js/bootstrap.min.tmp.js
76 | echo "/*!\n* Bootstrap.js by @fat & @mdo\n* Copyright 2012 Twitter, Inc.\n* http://www.apache.org/licenses/LICENSE-2.0.txt\n*/" > bootstrap/js/copyright.js
77 | cat bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js > bootstrap/js/bootstrap.min.js
78 | rm bootstrap/js/copyright.js bootstrap/js/bootstrap.min.tmp.js
79 |
80 | #
81 | # MAKE FOR GH-PAGES 4 FAT & MDO ONLY (O_O )
82 | #
83 |
84 | gh-pages: bootstrap docs
85 | rm -f docs/assets/bootstrap.zip
86 | zip -r docs/assets/bootstrap.zip bootstrap
87 | rm -r bootstrap
88 | rm -f ../bootstrap-gh-pages/assets/bootstrap.zip
89 | node docs/build production
90 | cp -r docs/* ../bootstrap-gh-pages
91 |
92 | #
93 | # WATCH LESS FILES
94 | #
95 |
96 | watch:
97 | echo "Watching less files..."; \
98 | watchr -e "watch('less/.*\.less') { system 'make' }"
99 |
100 |
101 | .PHONY: docs watch gh-pages
--------------------------------------------------------------------------------
/bootstrap/component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap",
3 | "version": "2.2.1",
4 | "main": ["./docs/assets/js/bootstrap.js", "./docs/assets/css/bootstrap.css"],
5 | "dependencies": {
6 | "jquery": "~1.8.0"
7 | }
8 | }
--------------------------------------------------------------------------------
/bootstrap/docs/assets/ico/apple-touch-icon-114-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/ico/apple-touch-icon-114-precomposed.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/ico/apple-touch-icon-144-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/ico/apple-touch-icon-144-precomposed.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/ico/apple-touch-icon-57-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/ico/apple-touch-icon-57-precomposed.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/ico/apple-touch-icon-72-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/ico/apple-touch-icon-72-precomposed.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/ico/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/ico/favicon.ico
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-01.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-02.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bootstrap-mdo-sfmoma-03.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bs-docs-bootstrap-features.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bs-docs-bootstrap-features.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bs-docs-masthead-pattern.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bs-docs-masthead-pattern.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bs-docs-responsive-illustrations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bs-docs-responsive-illustrations.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/bs-docs-twitter-github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/bs-docs-twitter-github.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/8020select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/8020select.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/adoptahydrant.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/adoptahydrant.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/breakingnews.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/breakingnews.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/fleetio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/fleetio.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/gathercontent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/gathercontent.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/jshint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/jshint.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/kippt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/kippt.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/example-sites/soundready.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/example-sites/soundready.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-carousel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-carousel.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-fluid.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-fluid.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-hero.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-hero.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-marketing-narrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-marketing-narrow.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-signin.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-starter.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-starter.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/bootstrap-example-sticky-footer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/bootstrap-example-sticky-footer.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/browser-icon-chrome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/browser-icon-chrome.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/browser-icon-firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/browser-icon-firefox.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/browser-icon-safari.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/browser-icon-safari.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/slide-01.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/slide-01.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/slide-02.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/slide-02.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/examples/slide-03.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/examples/slide-03.jpg
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/glyphicons-halflings-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/glyphicons-halflings-white.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/grid-baseline-20px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/grid-baseline-20px.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/less-logo-large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/less-logo-large.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/img/responsive-illustrations.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/assets/img/responsive-illustrations.png
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/README.md:
--------------------------------------------------------------------------------
1 | ## 2.0 BOOTSTRAP JS PHILOSOPHY
2 | These are the high-level design rules which guide the development of Bootstrap's plugin apis.
3 |
4 | ---
5 |
6 | ### DATA-ATTRIBUTE API
7 |
8 | We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
9 |
10 | We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
11 |
12 | $('body').off('.data-api')
13 |
14 | To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
15 |
16 | $('body').off('.alert.data-api')
17 |
18 | ---
19 |
20 | ### PROGRAMATIC API
21 |
22 | We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
23 |
24 | All public APIs should be single, chainable methods, and return the collection acted upon.
25 |
26 | $(".btn.danger").button("toggle").addClass("fat")
27 |
28 | All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
29 |
30 | $("#myModal").modal() // initialized with defaults
31 | $("#myModal").modal({ keyboard: false }) // initialized with now keyboard
32 | $("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
33 |
34 | ---
35 |
36 | ### OPTIONS
37 |
38 | Options should be sparse and add universal value. We should pick the right defaults.
39 |
40 | All plugins should have a default object which can be modified to effect all instance's default options. The defaults object should be available via `$.fn.plugin.defaults`.
41 |
42 | $.fn.modal.defaults = { … }
43 |
44 | An options definition should take the following form:
45 |
46 | *noun*: *adjective* - describes or modifies a quality of an instance
47 |
48 | examples:
49 |
50 | backdrop: true
51 | keyboard: false
52 | placement: 'top'
53 |
54 | ---
55 |
56 | ### EVENTS
57 |
58 | All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
59 |
60 | show | shown
61 | hide | hidden
62 |
63 | ---
64 |
65 | ### CONSTRUCTORS
66 |
67 | Each plugin should expose it's raw constructor on a `Constructor` property -- accessed in the following way:
68 |
69 |
70 | $.fn.popover.Constructor
71 |
72 | ---
73 |
74 | ### DATA ACCESSOR
75 |
76 | Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
77 |
78 | $('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
79 |
80 | ---
81 |
82 | ### DATA ATTRIBUTES
83 |
84 | Data attributes should take the following form:
85 |
86 | - data-{{verb}}={{plugin}} - defines main interaction
87 | - data-target || href^=# - defined on "control" element (if element controls an element other than self)
88 | - data-{{noun}} - defines class instance options
89 |
90 | examples:
91 |
92 | // control other targets
93 | data-toggle="modal" data-target="#foo"
94 | data-toggle="collapse" data-target="#foo" data-parent="#bar"
95 |
96 | // defined on element they control
97 | data-spy="scroll"
98 |
99 | data-dismiss="modal"
100 | data-dismiss="alert"
101 |
102 | data-toggle="dropdown"
103 |
104 | data-toggle="button"
105 | data-toggle="buttons-checkbox"
106 | data-toggle="buttons-radio"
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-affix.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-affix.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#affix
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* AFFIX CLASS DEFINITION
27 | * ====================== */
28 |
29 | var Affix = function (element, options) {
30 | this.options = $.extend({}, $.fn.affix.defaults, options)
31 | this.$window = $(window)
32 | .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
33 | .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
34 | this.$element = $(element)
35 | this.checkPosition()
36 | }
37 |
38 | Affix.prototype.checkPosition = function () {
39 | if (!this.$element.is(':visible')) return
40 |
41 | var scrollHeight = $(document).height()
42 | , scrollTop = this.$window.scrollTop()
43 | , position = this.$element.offset()
44 | , offset = this.options.offset
45 | , offsetBottom = offset.bottom
46 | , offsetTop = offset.top
47 | , reset = 'affix affix-top affix-bottom'
48 | , affix
49 |
50 | if (typeof offset != 'object') offsetBottom = offsetTop = offset
51 | if (typeof offsetTop == 'function') offsetTop = offset.top()
52 | if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
53 |
54 | affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
55 | false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
56 | 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
57 | 'top' : false
58 |
59 | if (this.affixed === affix) return
60 |
61 | this.affixed = affix
62 | this.unpin = affix == 'bottom' ? position.top - scrollTop : null
63 |
64 | this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
65 | }
66 |
67 |
68 | /* AFFIX PLUGIN DEFINITION
69 | * ======================= */
70 |
71 | $.fn.affix = function (option) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('affix')
75 | , options = typeof option == 'object' && option
76 | if (!data) $this.data('affix', (data = new Affix(this, options)))
77 | if (typeof option == 'string') data[option]()
78 | })
79 | }
80 |
81 | $.fn.affix.Constructor = Affix
82 |
83 | $.fn.affix.defaults = {
84 | offset: 0
85 | }
86 |
87 |
88 | /* AFFIX DATA-API
89 | * ============== */
90 |
91 | $(window).on('load', function () {
92 | $('[data-spy="affix"]').each(function () {
93 | var $spy = $(this)
94 | , data = $spy.data()
95 |
96 | data.offset = data.offset || {}
97 |
98 | data.offsetBottom && (data.offset.bottom = data.offsetBottom)
99 | data.offsetTop && (data.offset.top = data.offsetTop)
100 |
101 | $spy.affix(data)
102 | })
103 | })
104 |
105 |
106 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-alert.js:
--------------------------------------------------------------------------------
1 | /* ==========================================================
2 | * bootstrap-alert.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#alerts
4 | * ==========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* ALERT CLASS DEFINITION
27 | * ====================== */
28 |
29 | var dismiss = '[data-dismiss="alert"]'
30 | , Alert = function (el) {
31 | $(el).on('click', dismiss, this.close)
32 | }
33 |
34 | Alert.prototype.close = function (e) {
35 | var $this = $(this)
36 | , selector = $this.attr('data-target')
37 | , $parent
38 |
39 | if (!selector) {
40 | selector = $this.attr('href')
41 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
42 | }
43 |
44 | $parent = $(selector)
45 |
46 | e && e.preventDefault()
47 |
48 | $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
49 |
50 | $parent.trigger(e = $.Event('close'))
51 |
52 | if (e.isDefaultPrevented()) return
53 |
54 | $parent.removeClass('in')
55 |
56 | function removeElement() {
57 | $parent
58 | .trigger('closed')
59 | .remove()
60 | }
61 |
62 | $.support.transition && $parent.hasClass('fade') ?
63 | $parent.on($.support.transition.end, removeElement) :
64 | removeElement()
65 | }
66 |
67 |
68 | /* ALERT PLUGIN DEFINITION
69 | * ======================= */
70 |
71 | $.fn.alert = function (option) {
72 | return this.each(function () {
73 | var $this = $(this)
74 | , data = $this.data('alert')
75 | if (!data) $this.data('alert', (data = new Alert(this)))
76 | if (typeof option == 'string') data[option].call($this)
77 | })
78 | }
79 |
80 | $.fn.alert.Constructor = Alert
81 |
82 |
83 | /* ALERT DATA-API
84 | * ============== */
85 |
86 | $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
87 |
88 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | /* ============================================================
2 | * bootstrap-button.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#buttons
4 | * ============================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ============================================================ */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* BUTTON PUBLIC CLASS DEFINITION
27 | * ============================== */
28 |
29 | var Button = function (element, options) {
30 | this.$element = $(element)
31 | this.options = $.extend({}, $.fn.button.defaults, options)
32 | }
33 |
34 | Button.prototype.setState = function (state) {
35 | var d = 'disabled'
36 | , $el = this.$element
37 | , data = $el.data()
38 | , val = $el.is('input') ? 'val' : 'html'
39 |
40 | state = state + 'Text'
41 | data.resetText || $el.data('resetText', $el[val]())
42 |
43 | $el[val](data[state] || this.options[state])
44 |
45 | // push to event loop to allow forms to submit
46 | setTimeout(function () {
47 | state == 'loadingText' ?
48 | $el.addClass(d).attr(d, d) :
49 | $el.removeClass(d).removeAttr(d)
50 | }, 0)
51 | }
52 |
53 | Button.prototype.toggle = function () {
54 | var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
55 |
56 | $parent && $parent
57 | .find('.active')
58 | .removeClass('active')
59 |
60 | this.$element.toggleClass('active')
61 | }
62 |
63 |
64 | /* BUTTON PLUGIN DEFINITION
65 | * ======================== */
66 |
67 | $.fn.button = function (option) {
68 | return this.each(function () {
69 | var $this = $(this)
70 | , data = $this.data('button')
71 | , options = typeof option == 'object' && option
72 | if (!data) $this.data('button', (data = new Button(this, options)))
73 | if (option == 'toggle') data.toggle()
74 | else if (option) data.setState(option)
75 | })
76 | }
77 |
78 | $.fn.button.defaults = {
79 | loadingText: 'loading...'
80 | }
81 |
82 | $.fn.button.Constructor = Button
83 |
84 |
85 | /* BUTTON DATA-API
86 | * =============== */
87 |
88 | $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
89 | var $btn = $(e.target)
90 | if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
91 | $btn.button('toggle')
92 | })
93 |
94 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-popover.js:
--------------------------------------------------------------------------------
1 | /* ===========================================================
2 | * bootstrap-popover.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#popovers
4 | * ===========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * =========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* POPOVER PUBLIC CLASS DEFINITION
27 | * =============================== */
28 |
29 | var Popover = function (element, options) {
30 | this.init('popover', element, options)
31 | }
32 |
33 |
34 | /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
35 | ========================================== */
36 |
37 | Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
38 |
39 | constructor: Popover
40 |
41 | , setContent: function () {
42 | var $tip = this.tip()
43 | , title = this.getTitle()
44 | , content = this.getContent()
45 |
46 | $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
47 | $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
48 |
49 | $tip.removeClass('fade top bottom left right in')
50 | }
51 |
52 | , hasContent: function () {
53 | return this.getTitle() || this.getContent()
54 | }
55 |
56 | , getContent: function () {
57 | var content
58 | , $e = this.$element
59 | , o = this.options
60 |
61 | content = $e.attr('data-content')
62 | || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
63 |
64 | return content
65 | }
66 |
67 | , tip: function () {
68 | if (!this.$tip) {
69 | this.$tip = $(this.options.template)
70 | }
71 | return this.$tip
72 | }
73 |
74 | , destroy: function () {
75 | this.hide().$element.off('.' + this.type).removeData(this.type)
76 | }
77 |
78 | })
79 |
80 |
81 | /* POPOVER PLUGIN DEFINITION
82 | * ======================= */
83 |
84 | $.fn.popover = function (option) {
85 | return this.each(function () {
86 | var $this = $(this)
87 | , data = $this.data('popover')
88 | , options = typeof option == 'object' && option
89 | if (!data) $this.data('popover', (data = new Popover(this, options)))
90 | if (typeof option == 'string') data[option]()
91 | })
92 | }
93 |
94 | $.fn.popover.Constructor = Popover
95 |
96 | $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
97 | placement: 'right'
98 | , trigger: 'click'
99 | , content: ''
100 | , template: '
'
101 | })
102 |
103 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-tab.js:
--------------------------------------------------------------------------------
1 | /* ========================================================
2 | * bootstrap-tab.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#tabs
4 | * ========================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ======================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* TAB CLASS DEFINITION
27 | * ==================== */
28 |
29 | var Tab = function (element) {
30 | this.element = $(element)
31 | }
32 |
33 | Tab.prototype = {
34 |
35 | constructor: Tab
36 |
37 | , show: function () {
38 | var $this = this.element
39 | , $ul = $this.closest('ul:not(.dropdown-menu)')
40 | , selector = $this.attr('data-target')
41 | , previous
42 | , $target
43 | , e
44 |
45 | if (!selector) {
46 | selector = $this.attr('href')
47 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
48 | }
49 |
50 | if ( $this.parent('li').hasClass('active') ) return
51 |
52 | previous = $ul.find('.active:last a')[0]
53 |
54 | e = $.Event('show', {
55 | relatedTarget: previous
56 | })
57 |
58 | $this.trigger(e)
59 |
60 | if (e.isDefaultPrevented()) return
61 |
62 | $target = $(selector)
63 |
64 | this.activate($this.parent('li'), $ul)
65 | this.activate($target, $target.parent(), function () {
66 | $this.trigger({
67 | type: 'shown'
68 | , relatedTarget: previous
69 | })
70 | })
71 | }
72 |
73 | , activate: function ( element, container, callback) {
74 | var $active = container.find('> .active')
75 | , transition = callback
76 | && $.support.transition
77 | && $active.hasClass('fade')
78 |
79 | function next() {
80 | $active
81 | .removeClass('active')
82 | .find('> .dropdown-menu > .active')
83 | .removeClass('active')
84 |
85 | element.addClass('active')
86 |
87 | if (transition) {
88 | element[0].offsetWidth // reflow for transition
89 | element.addClass('in')
90 | } else {
91 | element.removeClass('fade')
92 | }
93 |
94 | if ( element.parent('.dropdown-menu') ) {
95 | element.closest('li.dropdown').addClass('active')
96 | }
97 |
98 | callback && callback()
99 | }
100 |
101 | transition ?
102 | $active.one($.support.transition.end, next) :
103 | next()
104 |
105 | $active.removeClass('in')
106 | }
107 | }
108 |
109 |
110 | /* TAB PLUGIN DEFINITION
111 | * ===================== */
112 |
113 | $.fn.tab = function ( option ) {
114 | return this.each(function () {
115 | var $this = $(this)
116 | , data = $this.data('tab')
117 | if (!data) $this.data('tab', (data = new Tab(this)))
118 | if (typeof option == 'string') data[option]()
119 | })
120 | }
121 |
122 | $.fn.tab.Constructor = Tab
123 |
124 |
125 | /* TAB DATA-API
126 | * ============ */
127 |
128 | $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
129 | e.preventDefault()
130 | $(this).tab('show')
131 | })
132 |
133 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/bootstrap-transition.js:
--------------------------------------------------------------------------------
1 | /* ===================================================
2 | * bootstrap-transition.js v2.2.1
3 | * http://twitter.github.com/bootstrap/javascript.html#transitions
4 | * ===================================================
5 | * Copyright 2012 Twitter, Inc.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * you may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | * ========================================================== */
19 |
20 |
21 | !function ($) {
22 |
23 | "use strict"; // jshint ;_;
24 |
25 |
26 | /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
27 | * ======================================================= */
28 |
29 | $(function () {
30 |
31 | $.support.transition = (function () {
32 |
33 | var transitionEnd = (function () {
34 |
35 | var el = document.createElement('bootstrap')
36 | , transEndEventNames = {
37 | 'WebkitTransition' : 'webkitTransitionEnd'
38 | , 'MozTransition' : 'transitionend'
39 | , 'OTransition' : 'oTransitionEnd otransitionend'
40 | , 'transition' : 'transitionend'
41 | }
42 | , name
43 |
44 | for (name in transEndEventNames){
45 | if (el.style[name] !== undefined) {
46 | return transEndEventNames[name]
47 | }
48 | }
49 |
50 | }())
51 |
52 | return transitionEnd && {
53 | end: transitionEnd
54 | }
55 |
56 | })()
57 |
58 | })
59 |
60 | }(window.jQuery);
--------------------------------------------------------------------------------
/bootstrap/docs/assets/js/google-code-prettify/prettify.css:
--------------------------------------------------------------------------------
1 | .com { color: #93a1a1; }
2 | .lit { color: #195f91; }
3 | .pun, .opn, .clo { color: #93a1a1; }
4 | .fun { color: #dc322f; }
5 | .str, .atv { color: #D14; }
6 | .kwd, .prettyprint .tag { color: #1e347b; }
7 | .typ, .atn, .dec, .var { color: teal; }
8 | .pln { color: #48484c; }
9 |
10 | .prettyprint {
11 | padding: 8px;
12 | background-color: #f7f7f9;
13 | border: 1px solid #e1e1e8;
14 | }
15 | .prettyprint.linenums {
16 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
17 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
18 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0;
19 | }
20 |
21 | /* Specify class=linenums on a pre to get line numbering */
22 | ol.linenums {
23 | margin: 0 0 0 33px; /* IE indents via margin-left */
24 | }
25 | ol.linenums li {
26 | padding-left: 12px;
27 | color: #bebec5;
28 | line-height: 20px;
29 | text-shadow: 0 1px 0 #fff;
30 | }
--------------------------------------------------------------------------------
/bootstrap/docs/build/index.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 | var hogan = require('hogan.js')
3 | , fs = require('fs')
4 | , prod = process.argv[2] == 'production'
5 | , title = '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 | })
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/.bin/hulk:
--------------------------------------------------------------------------------
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'));
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/.git_ignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "test/spec"]
2 | path = test/spec
3 | url = https://github.com/mustache/spec.git
4 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/Makefile:
--------------------------------------------------------------------------------
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
63 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/README.md:
--------------------------------------------------------------------------------
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 | `..`
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
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/bin/hulk:
--------------------------------------------------------------------------------
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'));
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/lib/hogan.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | // This file is for use with Node.js. See dist/ for browser files.
17 |
18 | var Hogan = require('./compiler');
19 | Hogan.Template = require('./template').Template;
20 | module.exports = Hogan;
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "hogan.js"
3 | , "description": "A mustache compiler."
4 | , "version": "1.0.5-dev"
5 | , "keywords": ["mustache", "template"]
6 | , "main": "./lib/hogan.js"
7 | , "homepage": "http://twitter.github.com/hogan.js/"
8 | , "author": "Twitter Inc."
9 | , "repository": {
10 | "type": "git"
11 | , "url": "https://github.com/twitter/hogan.js.git"
12 | }
13 | , "licenses": [
14 | { "type": "Apache-2.0"
15 | , "url": "http://www.apache.org/licenses/LICENSE-2.0"
16 | }
17 | ]
18 | , "devDependencies": { "uglify-js": "*" }
19 | , "bin" : { "hulk" : "./bin/hulk" }
20 | }
21 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/html/list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | test
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/mustache.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | var doc = this['document'];
17 | var fs = require('fs');
18 |
19 | var passed = 0;
20 | var failed = 0;
21 |
22 | if (!this['output']) {
23 | var output = function (string) {
24 | return doc ? doc.write(string + ' ') : console.log(string);
25 | };
26 | }
27 |
28 | var Hogan = require(__dirname + '/../lib/hogan');
29 | var template = fs.readFileSync(__dirname + '/../lib/template.js').toString();
30 | var compiler = fs.readFileSync(__dirname + '/../lib/compiler.js').toString();
31 | var mustache_wrapper = fs.readFileSync(__dirname + '/../wrappers/mustache.js.mustache').toString();
32 |
33 | // Create a Mustache.js emulator from the distribution template
34 | var engines = (new Function(Hogan.compile(mustache_wrapper).render({template: template, compiler: compiler}) +
35 | '; return {Hogan: Hogan, Mustache: Mustache};'))();
36 |
37 | var Mustache = engines.Mustache;
38 | var Hogan2 = engines.Hogan;
39 |
40 |
41 | // sanity check
42 | is(Mustache.hasOwnProperty('to_html'), true, 'Mustache has to_html method.');
43 |
44 | // Check for Mustache.js partial resolution behavior.
45 | var context = {
46 | foo: 'bar',
47 | mypartial: {
48 | baz: 'qux'
49 | }
50 | }
51 | var text = 'abc {{foo}} def {{>mypartial}} ghi';
52 | var partialText = '{{baz}}';
53 | var s = Mustache.to_html(text, context, {'mypartial': partialText});
54 | is(s, 'abc bar def qux ghi', 'Correct emulation of Mustache.js partial-name-in-context resolution.');
55 |
56 | // Now check to see that the Hogan resolution is unaffected.
57 | var t = Hogan2.compile(text);
58 | s = t.render(context, {'mypartial': partialText});
59 | is(s, 'abc bar def ghi', 'Hogan behavior not changed by Mustache.js emulation.');
60 |
61 | // Check for sendFun behavior
62 | var buf = "";
63 | function send(s) {
64 | buf += "-FOO " + s + " FOO-";
65 | }
66 | var s = Mustache.to_html(text, context, {'mypartial': partialText}, send);
67 | is(buf, '-FOO abc bar def qux ghi FOO-', 'Correct emulation of Mustache.js sendFun.');
68 |
69 |
70 | function is(got, expected, msg) {
71 | if (got === expected) {
72 | output("OK: " + msg);
73 | ++passed;
74 | } else {
75 | output("FAIL: " + msg);
76 | output("Expected |" + expected + "|");
77 | output(" Got |" + got + "|");
78 | ++failed;
79 | }
80 | }
81 |
82 | function complete() {
83 | output("\nTests Complete");
84 | output("--------------");
85 | output("Passed: " + passed);
86 | output("Failed: " + failed);
87 | output("\n");
88 | }
89 |
90 | complete();
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | var Hogan = Hogan || require('../lib/hogan');
17 | var doc = this["document"];
18 | var fs = require('fs');
19 |
20 | var passed = 0;
21 | var failed = 0;
22 |
23 | if (!this["output"]) {
24 | var output = function (string) {
25 | return doc ? doc.write(string + ' ') : console.log(string);
26 | };
27 | }
28 |
29 | function runTest(tests) {
30 | tests.forEach(function(test) {
31 | var partials = {};
32 | for (var i in test.partials) {
33 | partials[i] = Hogan.compile(test.partials[i]);
34 | }
35 | var t = Hogan.compile(test.template);
36 |
37 | if (test.data.lambda) {
38 | var func = (new Function ('return ' + test.data.lambda.js)());
39 | test.data.lambda = function() { return func; };
40 | }
41 |
42 | var s = t.render(test.data, partials);
43 | is(s, test.expected, test.name + ': ' + test.desc);
44 | });
45 | }
46 |
47 | var testDir = './test/spec/specs';
48 | var files = fs.readdirSync(testDir)
49 | .filter(function(f) { return f.indexOf('.json') > 0; })
50 | .map(function(f) { return testDir + '/' + f});
51 |
52 | for (var i = 0; i < files.length; i++) {
53 | var test = JSON.parse(fs.readFileSync(files[i]).toString());
54 | runTest(test.tests);
55 | }
56 |
57 | function is(got, expected, msg) {
58 | if (got === expected) {
59 | output("OK: " + msg);
60 | ++passed;
61 | } else {
62 | output("FAIL: " + msg);
63 | output("Expected |" + expected + "|");
64 | output(" Got |" + got + "|");
65 | ++failed;
66 | }
67 | }
68 |
69 | function complete() {
70 | output("\nTests Complete");
71 | output("--------------");
72 | output("Passed: " + passed);
73 | output("Failed: " + failed);
74 | output("\n");
75 | }
76 |
77 | complete();
78 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/Changes:
--------------------------------------------------------------------------------
1 | 2011-03-20: v1.1.2
2 | Added tests for standalone tags at string boundaries.
3 | Added tests for rendering lambda returns after delimiter changes.
4 |
5 | 2011-03-20: v1.0.3
6 | Added tests for standalone tags at string boundaries.
7 | Added tests for rendering lambda returns after delimiter changes.
8 |
9 | 2011-03-05: v1.1.1
10 | Added tests for indented inline sections.
11 | Added tests for Windows-style newlines.
12 |
13 | 2011-03-05: v1.0.2
14 | Added tests for indented inline sections.
15 | Added tests for Windows-style newlines.
16 |
17 | 2011-03-04: v1.1.0
18 | Implicit iterators.
19 | A single period (`.`) may now be used as a name in Interpolation tags,
20 | which represents the top of stack (cast as a String).
21 | Dotted names.
22 | Names containing one or more periods should be resolved as chained
23 | properties; naïvely, this is like nesting section tags, but with some
24 | built-in scoping protections.
25 |
26 | 2011-03-02: v1.0.1
27 | Clarifying a point in the README about version compliance.
28 | Adding high-level documentation to each spec file.
29 |
30 | 2011-02-28: v1.0.0
31 | Initial Release
32 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/README.md:
--------------------------------------------------------------------------------
1 | The repository at https://github.com/mustache/spec is the formal standard for
2 | Mustache. It defines both normal usage and edge-case behavior for libraries
3 | parsing the Mustache templating language (or a superset thereof).
4 |
5 | The specification is developed as a series of YAML files, under the `specs`
6 | directory.
7 |
8 | Versioning
9 | ----------
10 | This specification is being [semantically versioned](http://semver.org).
11 | Roughly described, major version changes will always represent backwards
12 | incompatible changes, minor version changes will always represent new language
13 | features and will be backwards compatible, and patch ('tiny') version changes
14 | will always be bug fixes. For the purposes of semantic versioning, the public
15 | API is the contents of the `specs` directory and the algorithm for testing
16 | against it.
17 |
18 | Mustache implementations SHOULD report the most recent version of the spec
19 | (major and minor version numbers). If an implementation has support for any
20 | optional modules, they SHOULD indicate so with a remark attached to the
21 | version number (e.g. "vX.Y, including lambdas" or "v.X.Y+λ"). It is
22 | RECOMMENDED that implementations not supporting at least v1.0.0 of this spec
23 | refer to themselves as "Mustache-like", or "Mustache-inspired".
24 |
25 | Alternate Formats
26 | -----------------
27 |
28 | Since YAML is a reasonably complex format that not every language has good
29 | tools for working with, we also provide JSON versions of the specs on a
30 | best-effort basis.
31 |
32 | These should be identical to the YAML specifications, but if you find the need
33 | to regenerate them, they can be trivially rebuilt by invoking `rake build`.
34 |
35 | It is also worth noting that some specifications (notably, the lambda module)
36 | rely on YAML "tags" to denote special types of data (e.g. source code). Since
37 | JSON offers no way to denote this, a special key ("`__tag__`") is injected
38 | with the name of the tag as its value. See `TESTING.md` for more information
39 | about handling tagged data.
40 |
41 | Optional Modules
42 | ----------------
43 |
44 | Specification files beginning with a tilde (`~`) describe optional modules.
45 | At present, the only module being described as optional is regarding support
46 | for lambdas. As a guideline, a module may be a candidate for optionality
47 | when:
48 |
49 | * It does not affect the core syntax of the language.
50 | * It does not significantly affect the output of rendered templates.
51 | * It concerns implementation language features or data types that are not
52 | common to or core in every targeted language.
53 | * The lack of support by an implementation does not diminish the usage of
54 | Mustache in the target language.
55 |
56 | As an example, the lambda module is primarily concerned with the handling of a
57 | particular data type (code). This is a type of data that may be difficult to
58 | support in some languages, and users of those languages will not see the lack
59 | as an 'inconsistency' between implementations.
60 |
61 | Support for specific pragmas or syntax extensions, however, are best managed
62 | outside this core specification, as adjunct specifications.
63 |
64 | Implementors are strongly encouraged to support any and all modules they are
65 | reasonably capable of supporting.
66 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/Rakefile:
--------------------------------------------------------------------------------
1 | require 'json'
2 | require 'yaml'
3 |
4 | # Our custom YAML tags must retain their magic.
5 | %w[ code ].each do |tag|
6 | YAML::add_builtin_type(tag) { |_,val| val.merge(:__tag__ => tag) }
7 | end
8 |
9 | desc 'Build all alternate versions of the specs.'
10 | multitask :build => [ 'build:json' ]
11 |
12 | namespace :build do
13 | note = 'Do not edit this file; changes belong in the appropriate YAML file.'
14 |
15 | desc 'Build JSON versions of the specs.'
16 | task :json do
17 | rm(Dir['specs/*.json'], :verbose => false)
18 | Dir.glob('specs/*.yml').each do |filename|
19 | json_file = filename.gsub('.yml', '.json')
20 |
21 | File.open(json_file, 'w') do |file|
22 | doc = YAML.load_file(filename)
23 | file << doc.merge(:__ATTN__ => note).to_json()
24 | end
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/TESTING.md:
--------------------------------------------------------------------------------
1 | Testing your Mustache implementation against this specification should be
2 | relatively simple. If you have a readily available testing framework on your
3 | platform, your task may be even simpler.
4 |
5 | In general, the process for each `.yml` file is as follows:
6 |
7 | 1. Use a YAML parser to load the file.
8 |
9 | 2. For each test in the 'tests' array:
10 |
11 | 1. Ensure that each element of the 'partials' hash (if it exists) is
12 | stored in a place where the interpreter will look for it.
13 |
14 | 2. If your implementation will not support lambdas, feel free to skip over
15 | the optional '~lambdas.yml' file.
16 |
17 | 2.1. If your implementation will support lambdas, ensure that each member of
18 | 'data' tagged with '!code' is properly processed into a language-
19 | specific lambda reference.
20 |
21 | * e.g. Given this YAML data hash:
22 |
23 | `{ x: !code { ruby: 'proc { "x" }', perl: 'sub { "x" }' } }`
24 |
25 | a Ruby-based Mustache implementation would process it such that it
26 | was equivalent to this Ruby hash:
27 |
28 | `{ 'x' => proc { "x" } }`
29 |
30 | * If your implementation language does not currently have lambda
31 | examples in the spec, feel free to implement them and send a pull
32 | request.
33 |
34 | * The JSON version of the spec represents these tagged values as a hash
35 | with a '`__tag__`' key of 'code'.
36 |
37 | 3. Render the template (stored in the 'template' key) with the given 'data'
38 | hash.
39 |
40 | 4. Compare the results of your rendering against the 'expected' value; any
41 | differences should be reported, along with any useful debugging
42 | information.
43 |
44 | * Of note, the 'desc' key contains a rough one-line description of the
45 | behavior being tested -- this is most useful in conjunction with the
46 | file name and test 'name'.
47 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/specs/comments.json:
--------------------------------------------------------------------------------
1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Comment tags represent content that should never appear in the resulting\noutput.\n\nThe tag's content may contain any substring (including newlines) EXCEPT the\nclosing delimiter.\n\nComment tags SHOULD be treated as standalone when appropriate.\n","tests":[{"name":"Inline","data":{},"expected":"1234567890","template":"12345{{! Comment Block! }}67890","desc":"Comment blocks should be removed from the template."},{"name":"Multiline","data":{},"expected":"1234567890\n","template":"12345{{!\n This is a\n multi-line comment...\n}}67890\n","desc":"Multiline comments should be permitted."},{"name":"Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{! Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{! Indented Comment Block! }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n|","template":"|\r\n{{! Standalone Comment }}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags."},{"name":"Standalone Without Previous Line","data":{},"expected":"!","template":" {{! I'm Still Standalone }}\n!","desc":"Standalone tags should not require a newline to precede them."},{"name":"Standalone Without Newline","data":{},"expected":"!\n","template":"!\n {{! I'm Still Standalone }}","desc":"Standalone tags should not require a newline to follow them."},{"name":"Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{!\nSomething's going on here...\n}}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Multiline Standalone","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{!\n Something's going on here...\n }}\nEnd.\n","desc":"All standalone comment lines should be removed."},{"name":"Indented Inline","data":{},"expected":" 12 \n","template":" 12 {{! 34 }}\n","desc":"Inline comments should not strip whitespace"},{"name":"Surrounding Whitespace","data":{},"expected":"12345 67890","template":"12345 {{! Comment Block! }} 67890","desc":"Comment removal should preserve surrounding whitespace."}]}
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/specs/comments.yml:
--------------------------------------------------------------------------------
1 | overview: |
2 | Comment tags represent content that should never appear in the resulting
3 | output.
4 |
5 | The tag's content may contain any substring (including newlines) EXCEPT the
6 | closing delimiter.
7 |
8 | Comment tags SHOULD be treated as standalone when appropriate.
9 | tests:
10 | - name: Inline
11 | desc: Comment blocks should be removed from the template.
12 | data: { }
13 | template: '12345{{! Comment Block! }}67890'
14 | expected: '1234567890'
15 |
16 | - name: Multiline
17 | desc: Multiline comments should be permitted.
18 | data: { }
19 | template: |
20 | 12345{{!
21 | This is a
22 | multi-line comment...
23 | }}67890
24 | expected: |
25 | 1234567890
26 |
27 | - name: Standalone
28 | desc: All standalone comment lines should be removed.
29 | data: { }
30 | template: |
31 | Begin.
32 | {{! Comment Block! }}
33 | End.
34 | expected: |
35 | Begin.
36 | End.
37 |
38 | - name: Indented Standalone
39 | desc: All standalone comment lines should be removed.
40 | data: { }
41 | template: |
42 | Begin.
43 | {{! Indented Comment Block! }}
44 | End.
45 | expected: |
46 | Begin.
47 | End.
48 |
49 | - name: Standalone Line Endings
50 | desc: '"\r\n" should be considered a newline for standalone tags.'
51 | data: { }
52 | template: "|\r\n{{! Standalone Comment }}\r\n|"
53 | expected: "|\r\n|"
54 |
55 | - name: Standalone Without Previous Line
56 | desc: Standalone tags should not require a newline to precede them.
57 | data: { }
58 | template: " {{! I'm Still Standalone }}\n!"
59 | expected: "!"
60 |
61 | - name: Standalone Without Newline
62 | desc: Standalone tags should not require a newline to follow them.
63 | data: { }
64 | template: "!\n {{! I'm Still Standalone }}"
65 | expected: "!\n"
66 |
67 | - name: Multiline Standalone
68 | desc: All standalone comment lines should be removed.
69 | data: { }
70 | template: |
71 | Begin.
72 | {{!
73 | Something's going on here...
74 | }}
75 | End.
76 | expected: |
77 | Begin.
78 | End.
79 |
80 | - name: Indented Multiline Standalone
81 | desc: All standalone comment lines should be removed.
82 | data: { }
83 | template: |
84 | Begin.
85 | {{!
86 | Something's going on here...
87 | }}
88 | End.
89 | expected: |
90 | Begin.
91 | End.
92 |
93 | - name: Indented Inline
94 | desc: Inline comments should not strip whitespace
95 | data: { }
96 | template: " 12 {{! 34 }}\n"
97 | expected: " 12 \n"
98 |
99 | - name: Surrounding Whitespace
100 | desc: Comment removal should preserve surrounding whitespace.
101 | data: { }
102 | template: '12345 {{! Comment Block! }} 67890'
103 | expected: '12345 67890'
104 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/specs/delimiters.json:
--------------------------------------------------------------------------------
1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Set Delimiter tags are used to change the tag delimiters for all content\nfollowing the tag in the current compilation unit.\n\nThe tag's content MUST be any two non-whitespace sequences (separated by\nwhitespace) EXCEPT an equals sign ('=') followed by the current closing\ndelimiter.\n\nSet Delimiter tags SHOULD be treated as standalone when appropriate.\n","tests":[{"name":"Pair Behavior","data":{"text":"Hey!"},"expected":"(Hey!)","template":"{{=<% %>=}}(<%text%>)","desc":"The equals sign (used on both sides) should permit delimiter changes."},{"name":"Special Characters","data":{"text":"It worked!"},"expected":"(It worked!)","template":"({{=[ ]=}}[text])","desc":"Characters with special meaning regexen should be valid delimiters."},{"name":"Sections","data":{"section":true,"data":"I got interpolated."},"expected":"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n","template":"[\n{{#section}}\n {{data}}\n |data|\n{{/section}}\n\n{{= | | =}}\n|#section|\n {{data}}\n |data|\n|/section|\n]\n","desc":"Delimiters set outside sections should persist."},{"name":"Inverted Sections","data":{"section":false,"data":"I got interpolated."},"expected":"[\n I got interpolated.\n |data|\n\n {{data}}\n I got interpolated.\n]\n","template":"[\n{{^section}}\n {{data}}\n |data|\n{{/section}}\n\n{{= | | =}}\n|^section|\n {{data}}\n |data|\n|/section|\n]\n","desc":"Delimiters set outside inverted sections should persist."},{"name":"Partial Inheritence","data":{"value":"yes"},"expected":"[ .yes. ]\n[ .yes. ]\n","template":"[ {{>include}} ]\n{{= | | =}}\n[ |>include| ]\n","desc":"Delimiters set in a parent template should not affect a partial.","partials":{"include":".{{value}}."}},{"name":"Post-Partial Behavior","data":{"value":"yes"},"expected":"[ .yes. .yes. ]\n[ .yes. .|value|. ]\n","template":"[ {{>include}} ]\n[ .{{value}}. .|value|. ]\n","desc":"Delimiters set in a partial should not affect the parent template.","partials":{"include":".{{value}}. {{= | | =}} .|value|."}},{"name":"Surrounding Whitespace","data":{},"expected":"| |","template":"| {{=@ @=}} |","desc":"Surrounding whitespace should be left untouched."},{"name":"Outlying Whitespace (Inline)","data":{},"expected":" | \n","template":" | {{=@ @=}}\n","desc":"Whitespace should be left untouched."},{"name":"Standalone Tag","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n{{=@ @=}}\nEnd.\n","desc":"Standalone lines should be removed from the template."},{"name":"Indented Standalone Tag","data":{},"expected":"Begin.\nEnd.\n","template":"Begin.\n {{=@ @=}}\nEnd.\n","desc":"Indented standalone lines should be removed from the template."},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n|","template":"|\r\n{{= @ @ =}}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags."},{"name":"Standalone Without Previous Line","data":{},"expected":"=","template":" {{=@ @=}}\n=","desc":"Standalone tags should not require a newline to precede them."},{"name":"Standalone Without Newline","data":{},"expected":"=\n","template":"=\n {{=@ @=}}","desc":"Standalone tags should not require a newline to follow them."},{"name":"Pair with Padding","data":{},"expected":"||","template":"|{{= @ @ =}}|","desc":"Superfluous in-tag whitespace should be ignored."}]}
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/specs/partials.json:
--------------------------------------------------------------------------------
1 | {"__ATTN__":"Do not edit this file; changes belong in the appropriate YAML file.","overview":"Partial tags are used to expand an external template into the current\ntemplate.\n\nThe tag's content MUST be a non-whitespace character sequence NOT containing\nthe current closing delimiter.\n\nThis tag's content names the partial to inject. Set Delimiter tags MUST NOT\naffect the parsing of a partial. The partial MUST be rendered against the\ncontext stack local to the tag. If the named partial cannot be found, the\nempty string SHOULD be used instead, as in interpolations.\n\nPartial tags SHOULD be treated as standalone when appropriate. If this tag\nis used standalone, any whitespace preceding the tag should treated as\nindentation, and prepended to each line of the partial before rendering.\n","tests":[{"name":"Basic Behavior","data":{},"expected":"\"from partial\"","template":"\"{{>text}}\"","desc":"The greater-than operator should expand to the named partial.","partials":{"text":"from partial"}},{"name":"Failed Lookup","data":{},"expected":"\"\"","template":"\"{{>text}}\"","desc":"The empty string should be used when the named partial is not found.","partials":{}},{"name":"Context","data":{"text":"content"},"expected":"\"*content*\"","template":"\"{{>partial}}\"","desc":"The greater-than operator should operate within the current context.","partials":{"partial":"*{{text}}*"}},{"name":"Recursion","data":{"content":"X","nodes":[{"content":"Y","nodes":[]}]},"expected":"X>","template":"{{>node}}","desc":"The greater-than operator should properly recurse.","partials":{"node":"{{content}}<{{#nodes}}{{>node}}{{/nodes}}>"}},{"name":"Surrounding Whitespace","data":{},"expected":"| \t|\t |","template":"| {{>partial}} |","desc":"The greater-than operator should not alter surrounding whitespace.","partials":{"partial":"\t|\t"}},{"name":"Inline Indentation","data":{"data":"|"},"expected":" | >\n>\n","template":" {{data}} {{> partial}}\n","desc":"Whitespace should be left untouched.","partials":{"partial":">\n>"}},{"name":"Standalone Line Endings","data":{},"expected":"|\r\n>|","template":"|\r\n{{>partial}}\r\n|","desc":"\"\\r\\n\" should be considered a newline for standalone tags.","partials":{"partial":">"}},{"name":"Standalone Without Previous Line","data":{},"expected":" >\n >>","template":" {{>partial}}\n>","desc":"Standalone tags should not require a newline to precede them.","partials":{"partial":">\n>"}},{"name":"Standalone Without Newline","data":{},"expected":">\n >\n >","template":">\n {{>partial}}","desc":"Standalone tags should not require a newline to follow them.","partials":{"partial":">\n>"}},{"name":"Standalone Indentation","data":{"content":"<\n->"},"expected":"\\\n |\n <\n->\n |\n/\n","template":"\\\n {{>partial}}\n/\n","desc":"Each line of the partial should be indented before rendering.","partials":{"partial":"|\n{{{content}}}\n|\n"}},{"name":"Padding Whitespace","data":{"boolean":true},"expected":"|[]|","template":"|{{> partial }}|","desc":"Superfluous in-tag whitespace should be ignored.","partials":{"partial":"[]"}}]}
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/spec/specs/partials.yml:
--------------------------------------------------------------------------------
1 | overview: |
2 | Partial tags are used to expand an external template into the current
3 | template.
4 |
5 | The tag's content MUST be a non-whitespace character sequence NOT containing
6 | the current closing delimiter.
7 |
8 | This tag's content names the partial to inject. Set Delimiter tags MUST NOT
9 | affect the parsing of a partial. The partial MUST be rendered against the
10 | context stack local to the tag. If the named partial cannot be found, the
11 | empty string SHOULD be used instead, as in interpolations.
12 |
13 | Partial tags SHOULD be treated as standalone when appropriate. If this tag
14 | is used standalone, any whitespace preceding the tag should treated as
15 | indentation, and prepended to each line of the partial before rendering.
16 | tests:
17 | - name: Basic Behavior
18 | desc: The greater-than operator should expand to the named partial.
19 | data: { }
20 | template: '"{{>text}}"'
21 | partials: { text: 'from partial' }
22 | expected: '"from partial"'
23 |
24 | - name: Failed Lookup
25 | desc: The empty string should be used when the named partial is not found.
26 | data: { }
27 | template: '"{{>text}}"'
28 | partials: { }
29 | expected: '""'
30 |
31 | - name: Context
32 | desc: The greater-than operator should operate within the current context.
33 | data: { text: 'content' }
34 | template: '"{{>partial}}"'
35 | partials: { partial: '*{{text}}*' }
36 | expected: '"*content*"'
37 |
38 | - name: Recursion
39 | desc: The greater-than operator should properly recurse.
40 | data: { content: "X", nodes: [ { content: "Y", nodes: [] } ] }
41 | template: '{{>node}}'
42 | partials: { node: '{{content}}<{{#nodes}}{{>node}}{{/nodes}}>' }
43 | expected: 'X>'
44 |
45 | # Whitespace Sensitivity
46 |
47 | - name: Surrounding Whitespace
48 | desc: The greater-than operator should not alter surrounding whitespace.
49 | data: { }
50 | template: '| {{>partial}} |'
51 | partials: { partial: "\t|\t" }
52 | expected: "| \t|\t |"
53 |
54 | - name: Inline Indentation
55 | desc: Whitespace should be left untouched.
56 | data: { data: '|' }
57 | template: " {{data}} {{> partial}}\n"
58 | partials: { partial: ">\n>" }
59 | expected: " | >\n>\n"
60 |
61 | - name: Standalone Line Endings
62 | desc: '"\r\n" should be considered a newline for standalone tags.'
63 | data: { }
64 | template: "|\r\n{{>partial}}\r\n|"
65 | partials: { partial: ">" }
66 | expected: "|\r\n>|"
67 |
68 | - name: Standalone Without Previous Line
69 | desc: Standalone tags should not require a newline to precede them.
70 | data: { }
71 | template: " {{>partial}}\n>"
72 | partials: { partial: ">\n>"}
73 | expected: " >\n >>"
74 |
75 | - name: Standalone Without Newline
76 | desc: Standalone tags should not require a newline to follow them.
77 | data: { }
78 | template: ">\n {{>partial}}"
79 | partials: { partial: ">\n>" }
80 | expected: ">\n >\n >"
81 |
82 | - name: Standalone Indentation
83 | desc: Each line of the partial should be indented before rendering.
84 | data: { content: "<\n->" }
85 | template: |
86 | \
87 | {{>partial}}
88 | /
89 | partials:
90 | partial: |
91 | |
92 | {{{content}}}
93 | |
94 | expected: |
95 | \
96 | |
97 | <
98 | ->
99 | |
100 | /
101 |
102 | # Whitespace Insensitivity
103 |
104 | - name: Padding Whitespace
105 | desc: Superfluous in-tag whitespace should be ignored.
106 | data: { boolean: true }
107 | template: "|{{> partial }}|"
108 | partials: { partial: "[]" }
109 | expected: '|[]|'
110 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/test/templates/list.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/tools/release.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | var fs = require('fs');
17 | var path = require('path');
18 | var Hogan = require(__dirname + '/../lib/hogan');
19 | var minlicense = '/**\n* @preserve Copyright 2012 Twitter, Inc.\n* @license http://www.apache.org/licenses/LICENSE-2.0.txt\n*/\n';
20 |
21 | function read(path) {
22 | return fs.readFileSync(path).toString()
23 | }
24 |
25 | // Good enough for little js files
26 | function copy(src, dst) {
27 | return fs.writeFileSync(dst, read(src));
28 | }
29 |
30 | function uglify(src, dst) {
31 | var jsp = require("uglify-js").parser;
32 | var pro = require("uglify-js").uglify;
33 | var orig_code = read(src);
34 | var ast = jsp.parse(orig_code); // parse code and get the initial AST
35 | ast = pro.ast_mangle(ast); // get a new AST with mangled names
36 | ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
37 | fs.writeFileSync(dst, minlicense + pro.gen_code(ast));
38 | }
39 |
40 | var packageJSON = JSON.parse(read('package.json'));
41 | var version = packageJSON.version.substring(0, packageJSON.version.indexOf('-'));
42 |
43 | function removeFirstComment(text) {
44 | return text.substring(text.indexOf('*/') + 2);
45 | }
46 |
47 | var context = {
48 | template: removeFirstComment(read(__dirname + '/../lib/template.js')),
49 | compiler: removeFirstComment(read(__dirname + '/../lib/compiler.js'))
50 | };
51 |
52 | var wrapperPath = '/../wrappers/';
53 | var wrappers = fs.readdirSync(__dirname + wrapperPath).map(function(f) {
54 | return __dirname + wrapperPath + f;
55 | });
56 |
57 | var distPath = __dirname + '/../dist/';
58 | wrappers.forEach(function(wrapper) {
59 | var tail = path.basename(wrapper, '.mustache');
60 | var target = distPath + 'hogan-' + version + '.' + tail;
61 | var uglified = distPath + 'hogan-' + version + '.min.' + tail;
62 | fs.writeFileSync(target, Hogan.compile(read(wrapper)).render(context));
63 | uglify(target, uglified);
64 | });
65 |
66 | // Also release Hogan.Template on its own.
67 | var templateTarget = distPath + 'template-' + version + '.js';
68 | fs.writeFileSync(templateTarget, read(__dirname + '/../lib/template.js'));
69 | uglify(templateTarget, distPath + 'template-' + version + '.min.js');
70 |
71 | // Add packageJSON to node distribution
72 | packageJSON.version = version;
73 | fs.writeFileSync(__dirname + '/../dist/nodejs/package.json',
74 | JSON.stringify(packageJSON, null, " "));
75 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/tools/web_templates.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | var Hogan = require(__dirname + '/../lib/hogan.js');
17 | var fs = require('fs');
18 | var path = require('path');
19 |
20 | // Substitute variables in the homepage with values from package.json
21 | var homeTemplatePath = __dirname + '/../build/gh-pages/index.html.mustache';
22 | var contextPath = __dirname + '/../dist/nodejs/package.json';
23 |
24 | var homepage = fs.readFileSync(homeTemplatePath).toString();
25 | var context = JSON.parse(fs.readFileSync(contextPath).toString());
26 |
27 | var template = Hogan.compile(homepage);
28 |
29 | fs.writeFileSync(path.dirname(homeTemplatePath) + '/index.html',
30 | template.render(context));
31 |
32 | fs.unlinkSync(homeTemplatePath);
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/builds/1.0.5/template-1.0.5.min.js:
--------------------------------------------------------------------------------
1 | /**
2 | * @preserve Copyright 2012 Twitter, Inc.
3 | * @license http://www.apache.org/licenses/LICENSE-2.0.txt
4 | */
5 | var Hogan={};(function(a){function h(a){return a=String(a===null||a===undefined?"":a),g.test(a)?a.replace(b,"&").replace(c,"<").replace(d,">").replace(e,"'").replace(f,"""):a}a.Template=function j(a,b,c){a&&(this.r=a),this.c=c,this.text=b||""},a.Template.prototype={r:function(a,b,c){return""},v:h,render:function(b,c,d){return this.ri([b],c||{},d)},ri:function(a,b,c){return this.r(a,b,c)},rp:function(a,b,c,d){var e=c[a];return e?(this.c&&typeof e=="string"&&(e=this.c.compile(e)),e.ri(b,c,d)):""},rs:function(a,b,c){var d="",e=a[a.length-1];if(!i(e))return d=c(a,b);for(var f=0;f=0;h--){f=b[h];if(f&&typeof f=="object"&&a in f){e=f[a],g=!0;break}}return g?(!d&&typeof e=="function"&&(e=this.lv(e,b,c)),e):d?!1:""},ho:function(a,b,c,d,e){var f=this.c,g=a.call(b,d,function(a){return f.compile(a,{delimiters:e}).render(b,c)}),h=f.compile(g.toString(),{delimiters:e}).render(b,c);return this.b=h,!1},b:"",ls:function(a,b,c,d,e,f,g){var h=b[b.length-1],i=null;if(!d&&this.c&&a.length>0)return this.ho(a,h,c,this.text.substring(e,f),g);i=a.call(h);if(typeof i=="function"){if(d)return!0;if(this.c)return this.ho(i,h,c,this.text.substring(e,f),g)}return i},lv:function(a,b,c){var d=b[b.length-1],e=a.call(d);return typeof e=="function"&&(e=e.call(d)),e=e.toString(),this.c&&~e.indexOf("{{")?this.c.compile(e).render(d,c):e}};var b=/&/g,c=//g,e=/\'/g,f=/\"/g,g=/[&<>\"\']/,i=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"}})(typeof exports!="undefined"?exports:Hogan)
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/build/node_modules/hogan.js/web/favicon.ico
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/build/node_modules/hogan.js/web/images/logo.png
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/images/noise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/build/node_modules/hogan.js/web/images/noise.png
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/build/node_modules/hogan.js/web/images/small-hogan-icon.png
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/web/images/stripes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/littke/inspiritas-bootstrap/bacc1e50690ec9935069f1758daefcdeb0f6e4c1/bootstrap/docs/build/node_modules/hogan.js/web/images/stripes.png
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/wrappers/amd.js.mustache:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {{{template}}}
17 | {{{compiler}}}
18 |
19 | if (typeof define === 'function' && define.amd) {
20 | define(Hogan);
21 | }
22 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/wrappers/common.js.mustache:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {{{template}}}
17 | {{{compiler}}}
18 |
19 | if (typeof module !== 'undefined' && module.exports) {
20 | module.exports = Hogan;
21 | }
22 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/wrappers/js.mustache:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | {{{template}}}
17 | {{{compiler}}}
18 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/node_modules/hogan.js/wrappers/mustache.js.mustache:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2011 Twitter, Inc.
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | // A wrapper for compatibility with Mustache.js, quirks and all
17 |
18 | {{{template}}}
19 | {{{compiler}}}
20 |
21 | var Mustache = (function (Hogan) {
22 |
23 | // Mustache.js has non-spec partial context behavior
24 | function mustachePartial(name, context, partials, indent) {
25 | var partialScope = this.f(name, context, partials, 0);
26 | var cx = context;
27 | if (partialScope) {
28 | cx = cx.concat(partialScope);
29 | }
30 |
31 | return Hogan.Template.prototype.rp.call(this, name, cx, partials, indent);
32 | }
33 |
34 | var HoganTemplateWrapper = function(renderFunc, text, compiler){
35 | this.rp = mustachePartial;
36 | Hogan.Template.call(this, renderFunc, text, compiler);
37 | };
38 | HoganTemplateWrapper.prototype = Hogan.Template.prototype;
39 |
40 | // Add a wrapper for Hogan's generate method. Mustache and Hogan keep
41 | // separate caches, and Mustache returns wrapped templates.
42 | var wrapper;
43 | var HoganWrapper = function(){
44 | this.cache = {};
45 | this.generate = function(code, text, options) {
46 | return new HoganTemplateWrapper(new Function('c', 'p', 'i', code), text, wrapper);
47 | }
48 | };
49 | HoganWrapper.prototype = Hogan;
50 | wrapper = new HoganWrapper();
51 |
52 | return {
53 | to_html: function(text, data, partials, sendFun) {
54 | var template = wrapper.compile(text);
55 | var result = template.render(data, partials);
56 | if (!sendFun) {
57 | return result;
58 | }
59 |
60 | sendFun(result);
61 | }
62 | }
63 |
64 | })(Hogan);
65 |
--------------------------------------------------------------------------------
/bootstrap/docs/build/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "bootstrap-doc-builder"
3 | , "version": "0.0.1"
4 | , "description": "build bootstrap docs"
5 | , "dependencies": { "hogan.js": "1.0.5-dev" }
6 | }
7 |
--------------------------------------------------------------------------------
/bootstrap/docs/examples/signin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Sign in · Twitter Bootstrap
6 |
7 |
8 |
9 |
10 |
11 |
12 |
45 |
46 |
47 |
48 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
Holy guacamole! Best check yo self, you\'re not looking too good.
'
31 | + '
'
32 | , alert = $(alertHTML).appendTo('#qunit-fixture').alert()
33 |
34 | ok($('#qunit-fixture').find('.alert-message').length, 'element added to dom')
35 |
36 | alert.find('.close').click()
37 |
38 | ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
39 | })
40 |
41 | test("should not fire closed when close is prevented", function () {
42 | $.support.transition = false
43 | stop();
44 | $('')
45 | .bind('close', function (e) {
46 | e.preventDefault();
47 | ok(true);
48 | start();
49 | })
50 | .bind('closed', function () {
51 | ok(false);
52 | })
53 | .alert('close')
54 | })
55 |
56 | })
--------------------------------------------------------------------------------
/bootstrap/js/tests/unit/bootstrap-button.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-buttons")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).button, 'button method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).button()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should return set state to loading", function () {
14 | var btn = $('')
15 | equals(btn.html(), 'mdo', 'btn text equals mdo')
16 | btn.button('loading')
17 | equals(btn.html(), 'fat', 'btn text equals fat')
18 | stop()
19 | setTimeout(function () {
20 | ok(btn.attr('disabled'), 'btn is disabled')
21 | ok(btn.hasClass('disabled'), 'btn has disabled class')
22 | start()
23 | }, 0)
24 | })
25 |
26 | test("should return reset state", function () {
27 | var btn = $('')
28 | equals(btn.html(), 'mdo', 'btn text equals mdo')
29 | btn.button('loading')
30 | equals(btn.html(), 'fat', 'btn text equals fat')
31 | stop()
32 | setTimeout(function () {
33 | ok(btn.attr('disabled'), 'btn is disabled')
34 | ok(btn.hasClass('disabled'), 'btn has disabled class')
35 | start()
36 | stop()
37 | }, 0)
38 | btn.button('reset')
39 | equals(btn.html(), 'mdo', 'btn text equals mdo')
40 | setTimeout(function () {
41 | ok(!btn.attr('disabled'), 'btn is not disabled')
42 | ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
43 | start()
44 | }, 0)
45 | })
46 |
47 | test("should toggle active", function () {
48 | var btn = $('')
49 | ok(!btn.hasClass('active'), 'btn does not have active class')
50 | btn.button('toggle')
51 | ok(btn.hasClass('active'), 'btn has class active')
52 | })
53 |
54 | test("should toggle active when btn children are clicked", function () {
55 | var btn = $('')
56 | , inner = $('')
57 | btn
58 | .append(inner)
59 | .appendTo($('#qunit-fixture'))
60 | ok(!btn.hasClass('active'), 'btn does not have active class')
61 | inner.click()
62 | ok(btn.hasClass('active'), 'btn has class active')
63 | })
64 |
65 | test("should toggle active when btn children are clicked within btn-group", function () {
66 | var btngroup = $('')
67 | , btn = $('')
68 | , inner = $('')
69 | btngroup
70 | .append(btn.append(inner))
71 | .appendTo($('#qunit-fixture'))
72 | ok(!btn.hasClass('active'), 'btn does not have active class')
73 | inner.click()
74 | ok(btn.hasClass('active'), 'btn has class active')
75 | })
76 |
77 | test("should check for closest matching toggle", function () {
78 | var group = $("")
79 | , btn1 = $("")
80 | , btn2 = $("")
81 | , wrap = $("")
82 |
83 | wrap.append(btn1, btn2)
84 |
85 | group
86 | .append(wrap)
87 | .appendTo($('#qunit-fixture'))
88 |
89 | ok(btn1.hasClass('active'), 'btn1 has active class')
90 | ok(!btn2.hasClass('active'), 'btn2 does not have active class')
91 | btn2.click()
92 | ok(!btn1.hasClass('active'), 'btn1 does not have active class')
93 | ok(btn2.hasClass('active'), 'btn2 has active class')
94 | })
95 |
96 | })
--------------------------------------------------------------------------------
/bootstrap/js/tests/unit/bootstrap-carousel.js:
--------------------------------------------------------------------------------
1 | $(function () {
2 |
3 | module("bootstrap-carousel")
4 |
5 | test("should be defined on jquery object", function () {
6 | ok($(document.body).carousel, 'carousel method is defined')
7 | })
8 |
9 | test("should return element", function () {
10 | ok($(document.body).carousel()[0] == document.body, 'document.body returned')
11 | })
12 |
13 | test("should not fire sliden when slide is prevented", function () {
14 | $.support.transition = false
15 | stop()
16 | $('')
17 | .bind('slide', function (e) {
18 | e.preventDefault();
19 | ok(true);
20 | start();
21 | })
22 | .bind('slid', function () {
23 | ok(false);
24 | })
25 | .carousel('next')
26 | })
27 |
28 | test("should fire slide event with relatedTarget", function () {
29 | var template = '
{{_i}}First Thumbnail label{{/i}}
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
{{_i}}Second Thumbnail label{{/i}}
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
{{_i}}Third Thumbnail label{{/i}}
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
{{_i}}Second Thumbnail label{{/i}}
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.
{{_i}}Third Thumbnail label{{/i}}
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.