cssesc-source 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/cssesc/source.rb +7 -0
- data/vendor/LICENSE-MIT.txt +20 -0
- data/vendor/README.md +207 -0
- data/vendor/bin/cssesc +122 -0
- data/vendor/cssesc.js +177 -0
- data/vendor/man/cssesc.1 +70 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/MIT-LICENSE.txt +21 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/README.md +43 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/bin/stripcolorcodes.js +18 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/index.js +3 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/package.json +42 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/with-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/fixture/without-colors +2 -0
- data/vendor/node_modules/grunt-shell/node_modules/stripcolorcodes/test/stripcolorcodes-test.js +20 -0
- data/vendor/node_modules/grunt-shell/package.json +53 -0
- data/vendor/node_modules/grunt-shell/readme.md +221 -0
- data/vendor/node_modules/grunt-shell/tasks/shell.js +54 -0
- data/vendor/node_modules/grunt-template/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/grunt-template/README.md +123 -0
- data/vendor/node_modules/grunt-template/package.json +50 -0
- data/vendor/node_modules/grunt-template/tasks/template.js +44 -0
- data/vendor/node_modules/grunt/CONTRIBUTING.md +1 -0
- data/vendor/node_modules/grunt/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/README.md +16 -0
- data/vendor/node_modules/grunt/internal-tasks/bump.js +151 -0
- data/vendor/node_modules/grunt/internal-tasks/subgrunt.js +34 -0
- data/vendor/node_modules/grunt/lib/grunt.js +156 -0
- data/vendor/node_modules/grunt/lib/grunt/cli.js +128 -0
- data/vendor/node_modules/grunt/lib/grunt/config.js +118 -0
- data/vendor/node_modules/grunt/lib/grunt/event.js +16 -0
- data/vendor/node_modules/grunt/lib/grunt/fail.js +84 -0
- data/vendor/node_modules/grunt/lib/grunt/file.js +440 -0
- data/vendor/node_modules/grunt/lib/grunt/help.js +129 -0
- data/vendor/node_modules/grunt/lib/grunt/log.js +352 -0
- data/vendor/node_modules/grunt/lib/grunt/option.js +42 -0
- data/vendor/node_modules/grunt/lib/grunt/task.js +451 -0
- data/vendor/node_modules/grunt/lib/grunt/template.js +95 -0
- data/vendor/node_modules/grunt/lib/grunt/util.js +188 -0
- data/vendor/node_modules/grunt/lib/util/task.js +323 -0
- data/vendor/node_modules/grunt/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/grunt/node_modules/async/Makefile +25 -0
- data/vendor/node_modules/grunt/node_modules/async/README.md +1021 -0
- data/vendor/node_modules/grunt/node_modules/async/index.js +3 -0
- data/vendor/node_modules/grunt/node_modules/async/lib/async.js +692 -0
- data/vendor/node_modules/grunt/node_modules/async/package.json +32 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/README +51 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/Rakefile +78 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/cake +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/bin/coffee +7 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf +44 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/browser.js +92 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/cake.js +111 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/coffee-script.js +167 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/command.js +500 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/grammar.js +606 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/helpers.js +77 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/index.js +11 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/lexer.js +788 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/nodes.js +2986 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/optparse.js +138 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/parser.js +683 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/repl.js +261 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/rewriter.js +349 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/lib/coffee-script/scope.js +146 -0
- data/vendor/node_modules/grunt/node_modules/coffee-script/package.json +47 -0
- data/vendor/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt +22 -0
- data/vendor/node_modules/grunt/node_modules/colors/ReadMe.md +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/colors.js +342 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.html +76 -0
- data/vendor/node_modules/grunt/node_modules/colors/example.js +77 -0
- data/vendor/node_modules/grunt/node_modules/colors/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/colors/test.js +70 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-dark.js +12 -0
- data/vendor/node_modules/grunt/node_modules/colors/themes/winston-light.js +12 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/Readme.md +67 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/lib/dateformat.js +165 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/package.json +20 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.js +4 -0
- data/vendor/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh +27 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/README.md +212 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/lib/eventemitter2.js +561 -0
- data/vendor/node_modules/grunt/node_modules/eventemitter2/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/exit/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/exit/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/exit/README.md +75 -0
- data/vendor/node_modules/grunt/node_modules/exit/lib/exit.js +41 -0
- data/vendor/node_modules/grunt/node_modules/exit/package.json +51 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/exit_test.js +121 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stderr.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout-stderr.txt +20 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/10-stdout.txt +10 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stderr.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout-stderr.txt +200 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/100-stdout.txt +100 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stderr.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout-stderr.txt +2000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/1000-stdout.txt +1000 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/create-files.sh +8 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log-broken.js +23 -0
- data/vendor/node_modules/grunt/node_modules/exit/test/fixtures/log.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/Gruntfile.js +25 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/README.md +44 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js +46 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md +164 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.js +5152 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.compat.min.js +42 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js +4983 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.min.js +40 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.js +4307 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.underscore.min.js +34 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/findup-sync_test.js +48 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/b/bar.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/a/foo.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/findup-sync/test/fixtures/aaa.txt +0 -0
- data/vendor/node_modules/grunt/node_modules/getobject/Gruntfile.js +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/getobject/README.md +20 -0
- data/vendor/node_modules/grunt/node_modules/getobject/lib/getobject.js +60 -0
- data/vendor/node_modules/grunt/node_modules/getobject/package.json +48 -0
- data/vendor/node_modules/grunt/node_modules/getobject/test/namespace_test.js +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/README.md +233 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/grunt/node_modules/glob/glob.js +643 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/README.md +33 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/graceful-fs.js +442 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/package.json +49 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/open.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/graceful-fs/test/ulimit.js +158 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/README.md +51 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/inherits.js +29 -0
- data/vendor/node_modules/grunt/node_modules/glob/node_modules/inherits/package.json +30 -0
- data/vendor/node_modules/grunt/node_modules/glob/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/bash-results.json +348 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/grunt/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/grunt/node_modules/hooker/LICENSE-MIT +22 -0
- data/vendor/node_modules/grunt/node_modules/hooker/README.md +186 -0
- data/vendor/node_modules/grunt/node_modules/hooker/child.js +101 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.js +169 -0
- data/vendor/node_modules/grunt/node_modules/hooker/dist/ba-hooker.min.js +4 -0
- data/vendor/node_modules/grunt/node_modules/hooker/grunt.js +47 -0
- data/vendor/node_modules/grunt/node_modules/hooker/lib/hooker.js +174 -0
- data/vendor/node_modules/grunt/node_modules/hooker/package.json +45 -0
- data/vendor/node_modules/grunt/node_modules/hooker/parent.js +17 -0
- data/vendor/node_modules/grunt/node_modules/hooker/test/hooker_test.js +435 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md +72 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/README.md~ +54 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/big5.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/gbk.js +9 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/singlebyte.js +340 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/big5.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/encodings/table/gbk.js +1 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-big5-table.js +25 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/generation/generate-singlebyte.js +142 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/index.js +231 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/package.json +80 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5-test.js +36 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/big5File.txt +13 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/cyrillic-test.js +86 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbk-test.js +38 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/gbkFile.txt +14 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/greek-test.js +79 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/main-test.js +55 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/performance.js +67 -0
- data/vendor/node_modules/grunt/node_modules/iconv-lite/test/turkish-test.js +90 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/HISTORY.md +155 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/README.md +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/bin/js-yaml.js +125 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.js +104 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/custom_types.yaml +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/dumper.json +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.js +15 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/examples/sample_document.yaml +197 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/common.js +60 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/dumper.js +437 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/exception.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/loader.js +1549 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/mark.js +78 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/require.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema.js +103 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/default.js +16 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/minimal.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/schema/safe.js +25 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type.js +82 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/binary.js +118 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/bool.js +74 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/float.js +102 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/int.js +85 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/function.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +56 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/map.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/merge.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/null.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/omap.js +53 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/pairs.js +41 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/seq.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/set.js +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/str.js +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +91 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/HISTORY.md +109 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/LICENSE +21 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/README.md +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/arguments.js +36 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/choice.js +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/constants.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/help.js +13 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/nargs.js +33 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/parents.js +28 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/prefix_chars.js +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sub_commands.js +49 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/sum.js +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/examples/testformatters.js +270 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action.js +146 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append.js +55 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/append/constant.js +47 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/count.js +40 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/help.js +48 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/constant.js +43 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/false.js +27 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/store/true.js +26 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/subparsers.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action/version.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/action_container.js +481 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argparse.js +14 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/error.js +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/exclusive.js +54 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument/group.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/argument_parser.js +1165 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/const.js +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/added_formatters.js +88 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/help/formatter.js +803 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/lib/namespace.js +77 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile +4 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Gemfile.lock +17 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/README.markdown +814 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/Rakefile +23 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/component.json +11 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/lib/underscore.string.js +673 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/libpeerconnection.log +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/package.json +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/run-qunit.js +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/speed.js +148 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings.js +685 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/arrays.js +200 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/collections.js +426 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/functions.js +259 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/index.html +45 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/objects.js +548 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/speed.js +75 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/utility.js +249 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +9404 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +235 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +1977 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore.string/test/underscore.js +1201 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CNAME +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/CONTRIBUTING.md +9 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/LICENSE +22 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/README.md +19 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/favicon.ico +0 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.html +2467 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/index.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/package.json +35 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore-min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/node_modules/underscore/underscore.js +1226 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/argparse/package.json +50 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/grunt/node_modules/js-yaml/package.json +60 -0
- data/vendor/node_modules/grunt/node_modules/lodash/README.md +140 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.js +4258 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.min.js +35 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.js +3688 -0
- data/vendor/node_modules/grunt/node_modules/lodash/lodash.underscore.min.js +28 -0
- data/vendor/node_modules/grunt/node_modules/lodash/package.json +62 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/grunt/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/grunt/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/README.md +208 -0
- data/vendor/node_modules/grunt/node_modules/nopt/bin/nopt.js +44 -0
- data/vendor/node_modules/grunt/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/grunt/node_modules/nopt/lib/nopt.js +552 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/grunt/node_modules/nopt/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/grunt/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/AUTHORS +6 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/README.md +21 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +312 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/package.json +40 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/node_modules/graceful-fs/test/open.js +41 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/package.json +59 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/rimraf.js +161 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/run.sh +10 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/setup.sh +47 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-async.js +5 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-fiber.js +0 -0
- data/vendor/node_modules/grunt/node_modules/rimraf/test/test-sync.js +3 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile +5 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Gemfile.lock +34 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/README.markdown +668 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/Rakefile +28 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/dist/underscore.string.min.js +1 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/lib/underscore.string.js +525 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/package.json +72 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/run-qunit.js +44 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/speed.js +138 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings.js +438 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/strings_standalone.js +12 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test.html +31 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_standalone.html +18 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/arrays.js +166 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/chaining.js +59 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/collections.js +270 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/functions.js +198 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/objects.js +535 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/speed.js +70 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp.js +27 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/temp_tests.html +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/test.html +43 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/utility.js +155 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jquery.js +19 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/jslitmus.js +670 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.css +196 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/test_underscore/vendor/qunit.js +2360 -0
- data/vendor/node_modules/grunt/node_modules/underscore.string/test/underscore.js +999 -0
- data/vendor/node_modules/grunt/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/grunt/node_modules/which/README.md +5 -0
- data/vendor/node_modules/grunt/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/grunt/node_modules/which/package.json +31 -0
- data/vendor/node_modules/grunt/node_modules/which/which.js +104 -0
- data/vendor/node_modules/grunt/package.json +82 -0
- data/vendor/node_modules/istanbul/CHANGELOG.md +57 -0
- data/vendor/node_modules/istanbul/LICENSE +24 -0
- data/vendor/node_modules/istanbul/README.md +205 -0
- data/vendor/node_modules/istanbul/index.js +115 -0
- data/vendor/node_modules/istanbul/lib/cli.js +74 -0
- data/vendor/node_modules/istanbul/lib/collector.js +121 -0
- data/vendor/node_modules/istanbul/lib/command/check-coverage.js +115 -0
- data/vendor/node_modules/istanbul/lib/command/common/run-with-cover.js +199 -0
- data/vendor/node_modules/istanbul/lib/command/cover.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/help.js +58 -0
- data/vendor/node_modules/istanbul/lib/command/index.js +33 -0
- data/vendor/node_modules/istanbul/lib/command/instrument.js +244 -0
- data/vendor/node_modules/istanbul/lib/command/report.js +97 -0
- data/vendor/node_modules/istanbul/lib/command/test.js +31 -0
- data/vendor/node_modules/istanbul/lib/hook.js +187 -0
- data/vendor/node_modules/istanbul/lib/instrumenter.js +759 -0
- data/vendor/node_modules/istanbul/lib/object-utils.js +341 -0
- data/vendor/node_modules/istanbul/lib/register-plugins.js +15 -0
- data/vendor/node_modules/istanbul/lib/report/cobertura.js +207 -0
- data/vendor/node_modules/istanbul/lib/report/html.js +517 -0
- data/vendor/node_modules/istanbul/lib/report/index.js +60 -0
- data/vendor/node_modules/istanbul/lib/report/json.js +55 -0
- data/vendor/node_modules/istanbul/lib/report/lcov.js +49 -0
- data/vendor/node_modules/istanbul/lib/report/lcovonly.js +93 -0
- data/vendor/node_modules/istanbul/lib/report/none.js +20 -0
- data/vendor/node_modules/istanbul/lib/report/teamcity.js +82 -0
- data/vendor/node_modules/istanbul/lib/report/templates/foot.txt +102 -0
- data/vendor/node_modules/istanbul/lib/report/templates/head.txt +200 -0
- data/vendor/node_modules/istanbul/lib/report/text-summary.js +72 -0
- data/vendor/node_modules/istanbul/lib/report/text.js +210 -0
- data/vendor/node_modules/istanbul/lib/store/fslookup.js +60 -0
- data/vendor/node_modules/istanbul/lib/store/index.js +122 -0
- data/vendor/node_modules/istanbul/lib/store/memory.js +55 -0
- data/vendor/node_modules/istanbul/lib/store/tmp.js +80 -0
- data/vendor/node_modules/istanbul/lib/util/factory.js +88 -0
- data/vendor/node_modules/istanbul/lib/util/file-matcher.js +60 -0
- data/vendor/node_modules/istanbul/lib/util/file-writer.js +131 -0
- data/vendor/node_modules/istanbul/lib/util/flow-control.js +26 -0
- data/vendor/node_modules/istanbul/lib/util/help-formatter.js +24 -0
- data/vendor/node_modules/istanbul/lib/util/input-error.js +12 -0
- data/vendor/node_modules/istanbul/lib/util/insertion-text.js +109 -0
- data/vendor/node_modules/istanbul/lib/util/meta.js +13 -0
- data/vendor/node_modules/istanbul/lib/util/tree-summarizer.js +213 -0
- data/vendor/node_modules/istanbul/lib/util/writer.js +56 -0
- data/vendor/node_modules/istanbul/lib/util/yui-load-hook.js +49 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.css +1 -0
- data/vendor/node_modules/istanbul/lib/vendor/prettify.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/README.md +23 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/lib/abbrev.js +111 -0
- data/vendor/node_modules/istanbul/node_modules/abbrev/package.json +29 -0
- data/vendor/node_modules/istanbul/node_modules/async/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/async/README.md +1414 -0
- data/vendor/node_modules/istanbul/node_modules/async/component.json +11 -0
- data/vendor/node_modules/istanbul/node_modules/async/lib/async.js +955 -0
- data/vendor/node_modules/istanbul/node_modules/async/package.json +43 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/LICENSE.source-map +27 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/README.md +99 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/escodegen.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/bin/esgenerate.js +45 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/component.json +48 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.browser.js +3072 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/escodegen.js +2275 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD +19 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/README.md +29 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/estraverse.js +315 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/estraverse/package.json +41 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/node_modules/amdefine/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/escodegen/package.json +58 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/README.md +73 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esparse.js +117 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/bin/esvalidate.js +177 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/esprima.js +3908 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/package.json +59 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/compat.js +239 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/reflect.js +422 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/run.js +66 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/runner.js +387 -0
- data/vendor/node_modules/istanbul/node_modules/esprima/test/test.js +20238 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/LICENSE-MIT +22 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/README.md +87 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/lib/fileset.js +64 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/README.md +250 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/g.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/examples/usr-local.js +9 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/glob.js +680 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/00-setup.js +176 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-comparison.js +63 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/bash-results.json +350 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/cwd-test.js +55 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/globstar-match.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/mark.js +74 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/new-glob-optional-options.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/nocase-nomagic.js +113 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/pause-resume.js +73 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root-nomount.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/root.js +46 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/stat.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/glob/test/zz-cleanup.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/README.md +218 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/minimatch.js +1055 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/README.md +97 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +252 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/package.json +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/basic.js +369 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +52 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +50 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/LICENSE +27 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/README.md +53 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/bench.js +283 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/sigmund.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/node_modules/sigmund/test/basic.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/package.json +40 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/brace-expand.js +33 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/caching.js +14 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/fixtures/an (odd) filename.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/helper.js +61 -0
- data/vendor/node_modules/istanbul/node_modules/fileset/tests/test.js +133 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/LICENSE +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/README.markdown +391 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bin/handlebars +213 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/bower.json +9 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.js +2278 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.min.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.js +362 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/dist/handlebars.runtime.min.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global-test.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/global.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars-source.gemspec +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/handlebars.js.nuspec +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars.js +43 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/base.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-prefix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/browser-suffix.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/ast.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/base.js +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/compiler.js +1305 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/index.js +16 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/parser.js +483 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/printer.js +138 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/compiler/visitor.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/runtime.js +106 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/source.rb +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/lib/handlebars/utils.js +83 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/min.sh +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/bool.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_double.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/boolean_single.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_hash.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/default_singles.js +7 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/divide.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_options.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/line_count_wrap.js +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/nonopt.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/reflect.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/short.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/string.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/usage-options.js +19 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/example/xup.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/index.js +478 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/package.json +46 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/readme.markdown +487 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/argv.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/_/bin.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/parse.js +446 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/optimist/test/usage.js +292 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/LICENSE +29 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/README.md +588 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/bin/uglifyjs +402 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/ast.js +985 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/compress.js +2028 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/mozilla-ast.js +267 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/output.js +1229 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/parse.js +1410 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/scope.js +581 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/sourcemap.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/transform.js +217 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/lib/utils.js +295 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/CHANGELOG.md +112 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-consumer.js +477 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/package.json +110 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/run-tests.js +71 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/package.json +39 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/arrays.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/blocks.js +49 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/conditionals.js +143 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/dead-code.js +89 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/debugger.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/drop-unused.js +97 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-105.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-12.js +11 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-143.js +48 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-22.js +17 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-44.js +31 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/issue-59.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/labels.js +163 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/loops.js +123 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/properties.js +54 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/sequences.js +161 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/switch.js +260 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/compress/typeof.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/test/run-tests.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/node_modules/uglify-js/tools/node.js +165 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/package.json +42 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/release-notes.md +93 -0
- data/vendor/node_modules/istanbul/node_modules/handlebars/test.js +20 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/LICENSE +21 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/examples/pow.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/index.js +82 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/package.json +34 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/readme.markdown +63 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/chmod.js +38 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/clobber.js +37 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/mkdirp.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/perm_sync.js +39 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/race.js +41 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/rel.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/return_sync.js +24 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/root.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask.js +28 -0
- data/vendor/node_modules/istanbul/node_modules/mkdirp/test/umask_sync.js +32 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/README.md +210 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/bin/nopt.js +51 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/examples/my-program.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/lib/nopt.js +612 -0
- data/vendor/node_modules/istanbul/node_modules/nopt/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/LICENSE +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/async.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/example/sync.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/index.js +5 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/async.js +125 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/caller.js +8 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.js +4 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/core.json +38 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/node-modules-paths.js +25 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/lib/sync.js +80 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/package.json +36 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/readme.markdown +144 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/core.js +12 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter.js +18 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/filter_sync.js +15 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock.js +142 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/mock_sync.js +68 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver.js +270 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/doom.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/baz/quux.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/cup.coffee +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/foo.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.coffee +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/mug.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/other_path/root.js +0 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/quux/foo/index.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/main.js +6 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js +1 -0
- data/vendor/node_modules/istanbul/node_modules/resolve/test/resolver_sync.js +170 -0
- data/vendor/node_modules/istanbul/node_modules/which/LICENSE +23 -0
- data/vendor/node_modules/istanbul/node_modules/which/README.md +5 -0
- data/vendor/node_modules/istanbul/node_modules/which/bin/which +14 -0
- data/vendor/node_modules/istanbul/node_modules/which/package.json +32 -0
- data/vendor/node_modules/istanbul/node_modules/which/which.js +104 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/README.markdown +70 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/center.js +10 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/example/meat.js +3 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/index.js +76 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/package.json +45 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/break.js +30 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/idleness.txt +63 -0
- data/vendor/node_modules/istanbul/node_modules/wordwrap/test/wrap.js +31 -0
- data/vendor/node_modules/istanbul/package.json +117 -0
- data/vendor/node_modules/istanbul/test/browser/support/index.html +153 -0
- data/vendor/node_modules/istanbul/test/browser/support/phantom-test.client.js +49 -0
- data/vendor/node_modules/istanbul/test/browser/support/server.js +154 -0
- data/vendor/node_modules/istanbul/test/browser/test-browser-instrumentation.js +94 -0
- data/vendor/node_modules/istanbul/test/cli-helper.js +219 -0
- data/vendor/node_modules/istanbul/test/cli/package.json +8 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/ipsum.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/amd/lorem.js +7 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/bar.js +13 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/foo.js +12 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/bad.js +1 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/lib/util/generate-names.js +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/dependency/index.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/hook.js +11 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/node_modules/post-require/package.json +5 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/amd-run.js +16 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/global-leak.js +30 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/test/run.js +25 -0
- data/vendor/node_modules/istanbul/test/cli/sample-project/vendor/dummy_vendor_lib.js +9 -0
- data/vendor/node_modules/istanbul/test/cli/test-base-cli.js +39 -0
- data/vendor/node_modules/istanbul/test/cli/test-check-coverage-command.js +97 -0
- data/vendor/node_modules/istanbul/test/cli/test-cobertura-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-cover-command.js +170 -0
- data/vendor/node_modules/istanbul/test/cli/test-html-report.js +125 -0
- data/vendor/node_modules/istanbul/test/cli/test-instrument-command.js +167 -0
- data/vendor/node_modules/istanbul/test/cli/test-json-report.js +60 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcov-report.js +58 -0
- data/vendor/node_modules/istanbul/test/cli/test-lcovonly-report.js +61 -0
- data/vendor/node_modules/istanbul/test/cli/test-lots-of-files.js +87 -0
- data/vendor/node_modules/istanbul/test/cli/test-none-report.js +17 -0
- data/vendor/node_modules/istanbul/test/cli/test-report-command.js +65 -0
- data/vendor/node_modules/istanbul/test/cli/test-teamcity-report.js +54 -0
- data/vendor/node_modules/istanbul/test/cli/test-test-command.js +43 -0
- data/vendor/node_modules/istanbul/test/common.js +19 -0
- data/vendor/node_modules/istanbul/test/helper.js +122 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-do.js +53 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-expressions.js +70 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-for.js +206 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-forin.js +50 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-functions.js +102 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-if.js +393 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-misc.js +35 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-statement.js +182 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-strict.js +121 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-switch.js +155 -0
- data/vendor/node_modules/istanbul/test/instrumentation/test-while.js +104 -0
- data/vendor/node_modules/istanbul/test/loader.js +38 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/fixture.xml +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile1 +0 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/myfile2 +1 -0
- data/vendor/node_modules/istanbul/test/other/data-complete-copy/subdir/x.css +3 -0
- data/vendor/node_modules/istanbul/test/other/data/baz.js +3 -0
- data/vendor/node_modules/istanbul/test/other/data/foo.js +4 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/general.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/general/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/lib/lib-top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/dep/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/node_modules/mod-file.js +2 -0
- data/vendor/node_modules/istanbul/test/other/data/matcher/top.js +2 -0
- data/vendor/node_modules/istanbul/test/other/test-collector.js +85 -0
- data/vendor/node_modules/istanbul/test/other/test-command-xface.js +35 -0
- data/vendor/node_modules/istanbul/test/other/test-file-writer.js +71 -0
- data/vendor/node_modules/istanbul/test/other/test-help-formatter.js +31 -0
- data/vendor/node_modules/istanbul/test/other/test-hook.js +87 -0
- data/vendor/node_modules/istanbul/test/other/test-index-xface.js +17 -0
- data/vendor/node_modules/istanbul/test/other/test-input-error.js +10 -0
- data/vendor/node_modules/istanbul/test/other/test-insertion-text.js +102 -0
- data/vendor/node_modules/istanbul/test/other/test-matcher.js +93 -0
- data/vendor/node_modules/istanbul/test/other/test-object-utils.js +201 -0
- data/vendor/node_modules/istanbul/test/other/test-store.js +129 -0
- data/vendor/node_modules/istanbul/test/other/test-summarizer.js +172 -0
- data/vendor/node_modules/istanbul/test/run-again.js +19 -0
- data/vendor/node_modules/istanbul/test/run.js +108 -0
- data/vendor/node_modules/istanbul/yui-coverage-comparison.md +85 -0
- data/vendor/node_modules/qunit-clib/LICENSE.txt +20 -0
- data/vendor/node_modules/qunit-clib/README.md +2 -0
- data/vendor/node_modules/qunit-clib/package.json +36 -0
- data/vendor/node_modules/qunit-clib/qunit-clib.js +570 -0
- data/vendor/node_modules/qunitjs/AUTHORS.txt +55 -0
- data/vendor/node_modules/qunitjs/History.md +496 -0
- data/vendor/node_modules/qunitjs/README.md +62 -0
- data/vendor/node_modules/qunitjs/addons/canvas/README.md +17 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas-test.js +76 -0
- data/vendor/node_modules/qunitjs/addons/canvas/canvas.html +15 -0
- data/vendor/node_modules/qunitjs/addons/canvas/qunit-canvas.js +6 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough-test.js +35 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/close-enough.html +14 -0
- data/vendor/node_modules/qunitjs/addons/close-enough/qunit-close-enough.js +32 -0
- data/vendor/node_modules/qunitjs/addons/composite/README.md +26 -0
- data/vendor/node_modules/qunitjs/addons/composite/composite-demo-test.html +24 -0
- data/vendor/node_modules/qunitjs/addons/composite/index.html +34 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.css +13 -0
- data/vendor/node_modules/qunitjs/addons/composite/qunit-composite.js +112 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/README.md +18 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/index.html +44 -0
- data/vendor/node_modules/qunitjs/addons/junitlogger/junitlogger.js +306 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/README.md +16 -0
- data/vendor/node_modules/qunitjs/addons/phantomjs/runner.js +127 -0
- data/vendor/node_modules/qunitjs/addons/step/README.md +20 -0
- data/vendor/node_modules/qunitjs/addons/step/qunit-step.js +26 -0
- data/vendor/node_modules/qunitjs/addons/step/step-test.js +15 -0
- data/vendor/node_modules/qunitjs/addons/step/step.html +14 -0
- data/vendor/node_modules/qunitjs/addons/themes/README.md +6 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.css +371 -0
- data/vendor/node_modules/qunitjs/addons/themes/gabe.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.css +196 -0
- data/vendor/node_modules/qunitjs/addons/themes/ninja.html +15 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.css +217 -0
- data/vendor/node_modules/qunitjs/addons/themes/nv.html +15 -0
- data/vendor/node_modules/qunitjs/grunt.js +101 -0
- data/vendor/node_modules/qunitjs/package.json +49 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.css +244 -0
- data/vendor/node_modules/qunitjs/qunit/qunit.js +2152 -0
- data/vendor/node_modules/qunitjs/test/async.html +26 -0
- data/vendor/node_modules/qunitjs/test/async.js +6 -0
- data/vendor/node_modules/qunitjs/test/deepEqual.js +1438 -0
- data/vendor/node_modules/qunitjs/test/headless.html +28 -0
- data/vendor/node_modules/qunitjs/test/index.html +16 -0
- data/vendor/node_modules/qunitjs/test/logs.html +14 -0
- data/vendor/node_modules/qunitjs/test/logs.js +184 -0
- data/vendor/node_modules/qunitjs/test/narwhal-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/node-test.js +22 -0
- data/vendor/node_modules/qunitjs/test/swarminject.js +10 -0
- data/vendor/node_modules/qunitjs/test/test.js +804 -0
- data/vendor/node_modules/regenerate/LICENSE-MIT.txt +20 -0
- data/vendor/node_modules/regenerate/README.md +467 -0
- data/vendor/node_modules/regenerate/package.json +50 -0
- data/vendor/node_modules/regenerate/regenerate.js +617 -0
- data/vendor/node_modules/requirejs/README.md +9 -0
- data/vendor/node_modules/requirejs/bin/r.js +26059 -0
- data/vendor/node_modules/requirejs/package.json +39 -0
- data/vendor/node_modules/requirejs/require.js +2054 -0
- data/vendor/package.json +56 -0
- metadata +949 -0
@@ -0,0 +1,166 @@
|
|
1
|
+
/*jshint eqnull: true */
|
2
|
+
|
3
|
+
module.exports.create = function() {
|
4
|
+
|
5
|
+
var Handlebars = {};
|
6
|
+
|
7
|
+
// BEGIN(BROWSER)
|
8
|
+
|
9
|
+
Handlebars.VERSION = "1.0.0";
|
10
|
+
Handlebars.COMPILER_REVISION = 4;
|
11
|
+
|
12
|
+
Handlebars.REVISION_CHANGES = {
|
13
|
+
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
|
14
|
+
2: '== 1.0.0-rc.3',
|
15
|
+
3: '== 1.0.0-rc.4',
|
16
|
+
4: '>= 1.0.0'
|
17
|
+
};
|
18
|
+
|
19
|
+
Handlebars.helpers = {};
|
20
|
+
Handlebars.partials = {};
|
21
|
+
|
22
|
+
var toString = Object.prototype.toString,
|
23
|
+
functionType = '[object Function]',
|
24
|
+
objectType = '[object Object]';
|
25
|
+
|
26
|
+
Handlebars.registerHelper = function(name, fn, inverse) {
|
27
|
+
if (toString.call(name) === objectType) {
|
28
|
+
if (inverse || fn) { throw new Handlebars.Exception('Arg not supported with multiple helpers'); }
|
29
|
+
Handlebars.Utils.extend(this.helpers, name);
|
30
|
+
} else {
|
31
|
+
if (inverse) { fn.not = inverse; }
|
32
|
+
this.helpers[name] = fn;
|
33
|
+
}
|
34
|
+
};
|
35
|
+
|
36
|
+
Handlebars.registerPartial = function(name, str) {
|
37
|
+
if (toString.call(name) === objectType) {
|
38
|
+
Handlebars.Utils.extend(this.partials, name);
|
39
|
+
} else {
|
40
|
+
this.partials[name] = str;
|
41
|
+
}
|
42
|
+
};
|
43
|
+
|
44
|
+
Handlebars.registerHelper('helperMissing', function(arg) {
|
45
|
+
if(arguments.length === 2) {
|
46
|
+
return undefined;
|
47
|
+
} else {
|
48
|
+
throw new Error("Missing helper: '" + arg + "'");
|
49
|
+
}
|
50
|
+
});
|
51
|
+
|
52
|
+
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
|
53
|
+
var inverse = options.inverse || function() {}, fn = options.fn;
|
54
|
+
|
55
|
+
var type = toString.call(context);
|
56
|
+
|
57
|
+
if(type === functionType) { context = context.call(this); }
|
58
|
+
|
59
|
+
if(context === true) {
|
60
|
+
return fn(this);
|
61
|
+
} else if(context === false || context == null) {
|
62
|
+
return inverse(this);
|
63
|
+
} else if(type === "[object Array]") {
|
64
|
+
if(context.length > 0) {
|
65
|
+
return Handlebars.helpers.each(context, options);
|
66
|
+
} else {
|
67
|
+
return inverse(this);
|
68
|
+
}
|
69
|
+
} else {
|
70
|
+
return fn(context);
|
71
|
+
}
|
72
|
+
});
|
73
|
+
|
74
|
+
Handlebars.K = function() {};
|
75
|
+
|
76
|
+
Handlebars.createFrame = Object.create || function(object) {
|
77
|
+
Handlebars.K.prototype = object;
|
78
|
+
var obj = new Handlebars.K();
|
79
|
+
Handlebars.K.prototype = null;
|
80
|
+
return obj;
|
81
|
+
};
|
82
|
+
|
83
|
+
Handlebars.logger = {
|
84
|
+
DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3, level: 3,
|
85
|
+
|
86
|
+
methodMap: {0: 'debug', 1: 'info', 2: 'warn', 3: 'error'},
|
87
|
+
|
88
|
+
// can be overridden in the host environment
|
89
|
+
log: function(level, obj) {
|
90
|
+
if (Handlebars.logger.level <= level) {
|
91
|
+
var method = Handlebars.logger.methodMap[level];
|
92
|
+
if (typeof console !== 'undefined' && console[method]) {
|
93
|
+
console[method].call(console, obj);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
};
|
98
|
+
|
99
|
+
Handlebars.log = function(level, obj) { Handlebars.logger.log(level, obj); };
|
100
|
+
|
101
|
+
Handlebars.registerHelper('each', function(context, options) {
|
102
|
+
var fn = options.fn, inverse = options.inverse;
|
103
|
+
var i = 0, ret = "", data;
|
104
|
+
|
105
|
+
var type = toString.call(context);
|
106
|
+
if(type === functionType) { context = context.call(this); }
|
107
|
+
|
108
|
+
if (options.data) {
|
109
|
+
data = Handlebars.createFrame(options.data);
|
110
|
+
}
|
111
|
+
|
112
|
+
if(context && typeof context === 'object') {
|
113
|
+
if(context instanceof Array){
|
114
|
+
for(var j = context.length; i<j; i++) {
|
115
|
+
if (data) { data.index = i; }
|
116
|
+
ret = ret + fn(context[i], { data: data });
|
117
|
+
}
|
118
|
+
} else {
|
119
|
+
for(var key in context) {
|
120
|
+
if(context.hasOwnProperty(key)) {
|
121
|
+
if(data) { data.key = key; }
|
122
|
+
ret = ret + fn(context[key], {data: data});
|
123
|
+
i++;
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
|
129
|
+
if(i === 0){
|
130
|
+
ret = inverse(this);
|
131
|
+
}
|
132
|
+
|
133
|
+
return ret;
|
134
|
+
});
|
135
|
+
|
136
|
+
Handlebars.registerHelper('if', function(conditional, options) {
|
137
|
+
var type = toString.call(conditional);
|
138
|
+
if(type === functionType) { conditional = conditional.call(this); }
|
139
|
+
|
140
|
+
if(!conditional || Handlebars.Utils.isEmpty(conditional)) {
|
141
|
+
return options.inverse(this);
|
142
|
+
} else {
|
143
|
+
return options.fn(this);
|
144
|
+
}
|
145
|
+
});
|
146
|
+
|
147
|
+
Handlebars.registerHelper('unless', function(conditional, options) {
|
148
|
+
return Handlebars.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn});
|
149
|
+
});
|
150
|
+
|
151
|
+
Handlebars.registerHelper('with', function(context, options) {
|
152
|
+
var type = toString.call(context);
|
153
|
+
if(type === functionType) { context = context.call(this); }
|
154
|
+
|
155
|
+
if (!Handlebars.Utils.isEmpty(context)) return options.fn(context);
|
156
|
+
});
|
157
|
+
|
158
|
+
Handlebars.registerHelper('log', function(context, options) {
|
159
|
+
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
160
|
+
Handlebars.log(level, context);
|
161
|
+
});
|
162
|
+
|
163
|
+
// END(BROWSER)
|
164
|
+
|
165
|
+
return Handlebars;
|
166
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
})(Handlebars);
|
@@ -0,0 +1,138 @@
|
|
1
|
+
exports.attach = function(Handlebars) {
|
2
|
+
|
3
|
+
// BEGIN(BROWSER)
|
4
|
+
Handlebars.AST = {};
|
5
|
+
|
6
|
+
Handlebars.AST.ProgramNode = function(statements, inverse) {
|
7
|
+
this.type = "program";
|
8
|
+
this.statements = statements;
|
9
|
+
if(inverse) { this.inverse = new Handlebars.AST.ProgramNode(inverse); }
|
10
|
+
};
|
11
|
+
|
12
|
+
Handlebars.AST.MustacheNode = function(rawParams, hash, unescaped) {
|
13
|
+
this.type = "mustache";
|
14
|
+
this.escaped = !unescaped;
|
15
|
+
this.hash = hash;
|
16
|
+
|
17
|
+
var id = this.id = rawParams[0];
|
18
|
+
var params = this.params = rawParams.slice(1);
|
19
|
+
|
20
|
+
// a mustache is an eligible helper if:
|
21
|
+
// * its id is simple (a single part, not `this` or `..`)
|
22
|
+
var eligibleHelper = this.eligibleHelper = id.isSimple;
|
23
|
+
|
24
|
+
// a mustache is definitely a helper if:
|
25
|
+
// * it is an eligible helper, and
|
26
|
+
// * it has at least one parameter or hash segment
|
27
|
+
this.isHelper = eligibleHelper && (params.length || hash);
|
28
|
+
|
29
|
+
// if a mustache is an eligible helper but not a definite
|
30
|
+
// helper, it is ambiguous, and will be resolved in a later
|
31
|
+
// pass or at runtime.
|
32
|
+
};
|
33
|
+
|
34
|
+
Handlebars.AST.PartialNode = function(partialName, context) {
|
35
|
+
this.type = "partial";
|
36
|
+
this.partialName = partialName;
|
37
|
+
this.context = context;
|
38
|
+
};
|
39
|
+
|
40
|
+
Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {
|
41
|
+
var verifyMatch = function(open, close) {
|
42
|
+
if(open.original !== close.original) {
|
43
|
+
throw new Handlebars.Exception(open.original + " doesn't match " + close.original);
|
44
|
+
}
|
45
|
+
};
|
46
|
+
|
47
|
+
verifyMatch(mustache.id, close);
|
48
|
+
this.type = "block";
|
49
|
+
this.mustache = mustache;
|
50
|
+
this.program = program;
|
51
|
+
this.inverse = inverse;
|
52
|
+
|
53
|
+
if (this.inverse && !this.program) {
|
54
|
+
this.isInverse = true;
|
55
|
+
}
|
56
|
+
};
|
57
|
+
|
58
|
+
Handlebars.AST.ContentNode = function(string) {
|
59
|
+
this.type = "content";
|
60
|
+
this.string = string;
|
61
|
+
};
|
62
|
+
|
63
|
+
Handlebars.AST.HashNode = function(pairs) {
|
64
|
+
this.type = "hash";
|
65
|
+
this.pairs = pairs;
|
66
|
+
};
|
67
|
+
|
68
|
+
Handlebars.AST.IdNode = function(parts) {
|
69
|
+
this.type = "ID";
|
70
|
+
|
71
|
+
var original = "",
|
72
|
+
dig = [],
|
73
|
+
depth = 0;
|
74
|
+
|
75
|
+
for(var i=0,l=parts.length; i<l; i++) {
|
76
|
+
var part = parts[i].part;
|
77
|
+
original += (parts[i].separator || '') + part;
|
78
|
+
|
79
|
+
if (part === ".." || part === "." || part === "this") {
|
80
|
+
if (dig.length > 0) { throw new Handlebars.Exception("Invalid path: " + original); }
|
81
|
+
else if (part === "..") { depth++; }
|
82
|
+
else { this.isScoped = true; }
|
83
|
+
}
|
84
|
+
else { dig.push(part); }
|
85
|
+
}
|
86
|
+
|
87
|
+
this.original = original;
|
88
|
+
this.parts = dig;
|
89
|
+
this.string = dig.join('.');
|
90
|
+
this.depth = depth;
|
91
|
+
|
92
|
+
// an ID is simple if it only has one part, and that part is not
|
93
|
+
// `..` or `this`.
|
94
|
+
this.isSimple = parts.length === 1 && !this.isScoped && depth === 0;
|
95
|
+
|
96
|
+
this.stringModeValue = this.string;
|
97
|
+
};
|
98
|
+
|
99
|
+
Handlebars.AST.PartialNameNode = function(name) {
|
100
|
+
this.type = "PARTIAL_NAME";
|
101
|
+
this.name = name.original;
|
102
|
+
};
|
103
|
+
|
104
|
+
Handlebars.AST.DataNode = function(id) {
|
105
|
+
this.type = "DATA";
|
106
|
+
this.id = id;
|
107
|
+
};
|
108
|
+
|
109
|
+
Handlebars.AST.StringNode = function(string) {
|
110
|
+
this.type = "STRING";
|
111
|
+
this.original =
|
112
|
+
this.string =
|
113
|
+
this.stringModeValue = string;
|
114
|
+
};
|
115
|
+
|
116
|
+
Handlebars.AST.IntegerNode = function(integer) {
|
117
|
+
this.type = "INTEGER";
|
118
|
+
this.original =
|
119
|
+
this.integer = integer;
|
120
|
+
this.stringModeValue = Number(integer);
|
121
|
+
};
|
122
|
+
|
123
|
+
Handlebars.AST.BooleanNode = function(bool) {
|
124
|
+
this.type = "BOOLEAN";
|
125
|
+
this.bool = bool;
|
126
|
+
this.stringModeValue = bool === "true";
|
127
|
+
};
|
128
|
+
|
129
|
+
Handlebars.AST.CommentNode = function(comment) {
|
130
|
+
this.type = "comment";
|
131
|
+
this.comment = comment;
|
132
|
+
};
|
133
|
+
|
134
|
+
// END(BROWSER)
|
135
|
+
|
136
|
+
return Handlebars;
|
137
|
+
};
|
138
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
var handlebars = require("./parser");
|
2
|
+
|
3
|
+
exports.attach = function(Handlebars) {
|
4
|
+
|
5
|
+
// BEGIN(BROWSER)
|
6
|
+
|
7
|
+
Handlebars.Parser = handlebars;
|
8
|
+
|
9
|
+
Handlebars.parse = function(input) {
|
10
|
+
|
11
|
+
// Just return if an already-compile AST was passed in.
|
12
|
+
if(input.constructor === Handlebars.AST.ProgramNode) { return input; }
|
13
|
+
|
14
|
+
Handlebars.Parser.yy = Handlebars.AST;
|
15
|
+
return Handlebars.Parser.parse(input);
|
16
|
+
};
|
17
|
+
|
18
|
+
// END(BROWSER)
|
19
|
+
|
20
|
+
return Handlebars;
|
21
|
+
};
|
@@ -0,0 +1,1305 @@
|
|
1
|
+
var compilerbase = require("./base");
|
2
|
+
|
3
|
+
exports.attach = function(Handlebars) {
|
4
|
+
|
5
|
+
compilerbase.attach(Handlebars);
|
6
|
+
|
7
|
+
// BEGIN(BROWSER)
|
8
|
+
|
9
|
+
/*jshint eqnull:true*/
|
10
|
+
var Compiler = Handlebars.Compiler = function() {};
|
11
|
+
var JavaScriptCompiler = Handlebars.JavaScriptCompiler = function() {};
|
12
|
+
|
13
|
+
// the foundHelper register will disambiguate helper lookup from finding a
|
14
|
+
// function in a context. This is necessary for mustache compatibility, which
|
15
|
+
// requires that context functions in blocks are evaluated by blockHelperMissing,
|
16
|
+
// and then proceed as if the resulting value was provided to blockHelperMissing.
|
17
|
+
|
18
|
+
Compiler.prototype = {
|
19
|
+
compiler: Compiler,
|
20
|
+
|
21
|
+
disassemble: function() {
|
22
|
+
var opcodes = this.opcodes, opcode, out = [], params, param;
|
23
|
+
|
24
|
+
for (var i=0, l=opcodes.length; i<l; i++) {
|
25
|
+
opcode = opcodes[i];
|
26
|
+
|
27
|
+
if (opcode.opcode === 'DECLARE') {
|
28
|
+
out.push("DECLARE " + opcode.name + "=" + opcode.value);
|
29
|
+
} else {
|
30
|
+
params = [];
|
31
|
+
for (var j=0; j<opcode.args.length; j++) {
|
32
|
+
param = opcode.args[j];
|
33
|
+
if (typeof param === "string") {
|
34
|
+
param = "\"" + param.replace("\n", "\\n") + "\"";
|
35
|
+
}
|
36
|
+
params.push(param);
|
37
|
+
}
|
38
|
+
out.push(opcode.opcode + " " + params.join(" "));
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
return out.join("\n");
|
43
|
+
},
|
44
|
+
equals: function(other) {
|
45
|
+
var len = this.opcodes.length;
|
46
|
+
if (other.opcodes.length !== len) {
|
47
|
+
return false;
|
48
|
+
}
|
49
|
+
|
50
|
+
for (var i = 0; i < len; i++) {
|
51
|
+
var opcode = this.opcodes[i],
|
52
|
+
otherOpcode = other.opcodes[i];
|
53
|
+
if (opcode.opcode !== otherOpcode.opcode || opcode.args.length !== otherOpcode.args.length) {
|
54
|
+
return false;
|
55
|
+
}
|
56
|
+
for (var j = 0; j < opcode.args.length; j++) {
|
57
|
+
if (opcode.args[j] !== otherOpcode.args[j]) {
|
58
|
+
return false;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
len = this.children.length;
|
64
|
+
if (other.children.length !== len) {
|
65
|
+
return false;
|
66
|
+
}
|
67
|
+
for (i = 0; i < len; i++) {
|
68
|
+
if (!this.children[i].equals(other.children[i])) {
|
69
|
+
return false;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
return true;
|
74
|
+
},
|
75
|
+
|
76
|
+
guid: 0,
|
77
|
+
|
78
|
+
compile: function(program, options) {
|
79
|
+
this.children = [];
|
80
|
+
this.depths = {list: []};
|
81
|
+
this.options = options;
|
82
|
+
|
83
|
+
// These changes will propagate to the other compiler components
|
84
|
+
var knownHelpers = this.options.knownHelpers;
|
85
|
+
this.options.knownHelpers = {
|
86
|
+
'helperMissing': true,
|
87
|
+
'blockHelperMissing': true,
|
88
|
+
'each': true,
|
89
|
+
'if': true,
|
90
|
+
'unless': true,
|
91
|
+
'with': true,
|
92
|
+
'log': true
|
93
|
+
};
|
94
|
+
if (knownHelpers) {
|
95
|
+
for (var name in knownHelpers) {
|
96
|
+
this.options.knownHelpers[name] = knownHelpers[name];
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
return this.program(program);
|
101
|
+
},
|
102
|
+
|
103
|
+
accept: function(node) {
|
104
|
+
return this[node.type](node);
|
105
|
+
},
|
106
|
+
|
107
|
+
program: function(program) {
|
108
|
+
var statements = program.statements, statement;
|
109
|
+
this.opcodes = [];
|
110
|
+
|
111
|
+
for(var i=0, l=statements.length; i<l; i++) {
|
112
|
+
statement = statements[i];
|
113
|
+
this[statement.type](statement);
|
114
|
+
}
|
115
|
+
this.isSimple = l === 1;
|
116
|
+
|
117
|
+
this.depths.list = this.depths.list.sort(function(a, b) {
|
118
|
+
return a - b;
|
119
|
+
});
|
120
|
+
|
121
|
+
return this;
|
122
|
+
},
|
123
|
+
|
124
|
+
compileProgram: function(program) {
|
125
|
+
var result = new this.compiler().compile(program, this.options);
|
126
|
+
var guid = this.guid++, depth;
|
127
|
+
|
128
|
+
this.usePartial = this.usePartial || result.usePartial;
|
129
|
+
|
130
|
+
this.children[guid] = result;
|
131
|
+
|
132
|
+
for(var i=0, l=result.depths.list.length; i<l; i++) {
|
133
|
+
depth = result.depths.list[i];
|
134
|
+
|
135
|
+
if(depth < 2) { continue; }
|
136
|
+
else { this.addDepth(depth - 1); }
|
137
|
+
}
|
138
|
+
|
139
|
+
return guid;
|
140
|
+
},
|
141
|
+
|
142
|
+
block: function(block) {
|
143
|
+
var mustache = block.mustache,
|
144
|
+
program = block.program,
|
145
|
+
inverse = block.inverse;
|
146
|
+
|
147
|
+
if (program) {
|
148
|
+
program = this.compileProgram(program);
|
149
|
+
}
|
150
|
+
|
151
|
+
if (inverse) {
|
152
|
+
inverse = this.compileProgram(inverse);
|
153
|
+
}
|
154
|
+
|
155
|
+
var type = this.classifyMustache(mustache);
|
156
|
+
|
157
|
+
if (type === "helper") {
|
158
|
+
this.helperMustache(mustache, program, inverse);
|
159
|
+
} else if (type === "simple") {
|
160
|
+
this.simpleMustache(mustache);
|
161
|
+
|
162
|
+
// now that the simple mustache is resolved, we need to
|
163
|
+
// evaluate it by executing `blockHelperMissing`
|
164
|
+
this.opcode('pushProgram', program);
|
165
|
+
this.opcode('pushProgram', inverse);
|
166
|
+
this.opcode('emptyHash');
|
167
|
+
this.opcode('blockValue');
|
168
|
+
} else {
|
169
|
+
this.ambiguousMustache(mustache, program, inverse);
|
170
|
+
|
171
|
+
// now that the simple mustache is resolved, we need to
|
172
|
+
// evaluate it by executing `blockHelperMissing`
|
173
|
+
this.opcode('pushProgram', program);
|
174
|
+
this.opcode('pushProgram', inverse);
|
175
|
+
this.opcode('emptyHash');
|
176
|
+
this.opcode('ambiguousBlockValue');
|
177
|
+
}
|
178
|
+
|
179
|
+
this.opcode('append');
|
180
|
+
},
|
181
|
+
|
182
|
+
hash: function(hash) {
|
183
|
+
var pairs = hash.pairs, pair, val;
|
184
|
+
|
185
|
+
this.opcode('pushHash');
|
186
|
+
|
187
|
+
for(var i=0, l=pairs.length; i<l; i++) {
|
188
|
+
pair = pairs[i];
|
189
|
+
val = pair[1];
|
190
|
+
|
191
|
+
if (this.options.stringParams) {
|
192
|
+
if(val.depth) {
|
193
|
+
this.addDepth(val.depth);
|
194
|
+
}
|
195
|
+
this.opcode('getContext', val.depth || 0);
|
196
|
+
this.opcode('pushStringParam', val.stringModeValue, val.type);
|
197
|
+
} else {
|
198
|
+
this.accept(val);
|
199
|
+
}
|
200
|
+
|
201
|
+
this.opcode('assignToHash', pair[0]);
|
202
|
+
}
|
203
|
+
this.opcode('popHash');
|
204
|
+
},
|
205
|
+
|
206
|
+
partial: function(partial) {
|
207
|
+
var partialName = partial.partialName;
|
208
|
+
this.usePartial = true;
|
209
|
+
|
210
|
+
if(partial.context) {
|
211
|
+
this.ID(partial.context);
|
212
|
+
} else {
|
213
|
+
this.opcode('push', 'depth0');
|
214
|
+
}
|
215
|
+
|
216
|
+
this.opcode('invokePartial', partialName.name);
|
217
|
+
this.opcode('append');
|
218
|
+
},
|
219
|
+
|
220
|
+
content: function(content) {
|
221
|
+
this.opcode('appendContent', content.string);
|
222
|
+
},
|
223
|
+
|
224
|
+
mustache: function(mustache) {
|
225
|
+
var options = this.options;
|
226
|
+
var type = this.classifyMustache(mustache);
|
227
|
+
|
228
|
+
if (type === "simple") {
|
229
|
+
this.simpleMustache(mustache);
|
230
|
+
} else if (type === "helper") {
|
231
|
+
this.helperMustache(mustache);
|
232
|
+
} else {
|
233
|
+
this.ambiguousMustache(mustache);
|
234
|
+
}
|
235
|
+
|
236
|
+
if(mustache.escaped && !options.noEscape) {
|
237
|
+
this.opcode('appendEscaped');
|
238
|
+
} else {
|
239
|
+
this.opcode('append');
|
240
|
+
}
|
241
|
+
},
|
242
|
+
|
243
|
+
ambiguousMustache: function(mustache, program, inverse) {
|
244
|
+
var id = mustache.id,
|
245
|
+
name = id.parts[0],
|
246
|
+
isBlock = program != null || inverse != null;
|
247
|
+
|
248
|
+
this.opcode('getContext', id.depth);
|
249
|
+
|
250
|
+
this.opcode('pushProgram', program);
|
251
|
+
this.opcode('pushProgram', inverse);
|
252
|
+
|
253
|
+
this.opcode('invokeAmbiguous', name, isBlock);
|
254
|
+
},
|
255
|
+
|
256
|
+
simpleMustache: function(mustache) {
|
257
|
+
var id = mustache.id;
|
258
|
+
|
259
|
+
if (id.type === 'DATA') {
|
260
|
+
this.DATA(id);
|
261
|
+
} else if (id.parts.length) {
|
262
|
+
this.ID(id);
|
263
|
+
} else {
|
264
|
+
// Simplified ID for `this`
|
265
|
+
this.addDepth(id.depth);
|
266
|
+
this.opcode('getContext', id.depth);
|
267
|
+
this.opcode('pushContext');
|
268
|
+
}
|
269
|
+
|
270
|
+
this.opcode('resolvePossibleLambda');
|
271
|
+
},
|
272
|
+
|
273
|
+
helperMustache: function(mustache, program, inverse) {
|
274
|
+
var params = this.setupFullMustacheParams(mustache, program, inverse),
|
275
|
+
name = mustache.id.parts[0];
|
276
|
+
|
277
|
+
if (this.options.knownHelpers[name]) {
|
278
|
+
this.opcode('invokeKnownHelper', params.length, name);
|
279
|
+
} else if (this.options.knownHelpersOnly) {
|
280
|
+
throw new Error("You specified knownHelpersOnly, but used the unknown helper " + name);
|
281
|
+
} else {
|
282
|
+
this.opcode('invokeHelper', params.length, name);
|
283
|
+
}
|
284
|
+
},
|
285
|
+
|
286
|
+
ID: function(id) {
|
287
|
+
this.addDepth(id.depth);
|
288
|
+
this.opcode('getContext', id.depth);
|
289
|
+
|
290
|
+
var name = id.parts[0];
|
291
|
+
if (!name) {
|
292
|
+
this.opcode('pushContext');
|
293
|
+
} else {
|
294
|
+
this.opcode('lookupOnContext', id.parts[0]);
|
295
|
+
}
|
296
|
+
|
297
|
+
for(var i=1, l=id.parts.length; i<l; i++) {
|
298
|
+
this.opcode('lookup', id.parts[i]);
|
299
|
+
}
|
300
|
+
},
|
301
|
+
|
302
|
+
DATA: function(data) {
|
303
|
+
this.options.data = true;
|
304
|
+
if (data.id.isScoped || data.id.depth) {
|
305
|
+
throw new Handlebars.Exception('Scoped data references are not supported: ' + data.original);
|
306
|
+
}
|
307
|
+
|
308
|
+
this.opcode('lookupData');
|
309
|
+
var parts = data.id.parts;
|
310
|
+
for(var i=0, l=parts.length; i<l; i++) {
|
311
|
+
this.opcode('lookup', parts[i]);
|
312
|
+
}
|
313
|
+
},
|
314
|
+
|
315
|
+
STRING: function(string) {
|
316
|
+
this.opcode('pushString', string.string);
|
317
|
+
},
|
318
|
+
|
319
|
+
INTEGER: function(integer) {
|
320
|
+
this.opcode('pushLiteral', integer.integer);
|
321
|
+
},
|
322
|
+
|
323
|
+
BOOLEAN: function(bool) {
|
324
|
+
this.opcode('pushLiteral', bool.bool);
|
325
|
+
},
|
326
|
+
|
327
|
+
comment: function() {},
|
328
|
+
|
329
|
+
// HELPERS
|
330
|
+
opcode: function(name) {
|
331
|
+
this.opcodes.push({ opcode: name, args: [].slice.call(arguments, 1) });
|
332
|
+
},
|
333
|
+
|
334
|
+
declare: function(name, value) {
|
335
|
+
this.opcodes.push({ opcode: 'DECLARE', name: name, value: value });
|
336
|
+
},
|
337
|
+
|
338
|
+
addDepth: function(depth) {
|
339
|
+
if(isNaN(depth)) { throw new Error("EWOT"); }
|
340
|
+
if(depth === 0) { return; }
|
341
|
+
|
342
|
+
if(!this.depths[depth]) {
|
343
|
+
this.depths[depth] = true;
|
344
|
+
this.depths.list.push(depth);
|
345
|
+
}
|
346
|
+
},
|
347
|
+
|
348
|
+
classifyMustache: function(mustache) {
|
349
|
+
var isHelper = mustache.isHelper;
|
350
|
+
var isEligible = mustache.eligibleHelper;
|
351
|
+
var options = this.options;
|
352
|
+
|
353
|
+
// if ambiguous, we can possibly resolve the ambiguity now
|
354
|
+
if (isEligible && !isHelper) {
|
355
|
+
var name = mustache.id.parts[0];
|
356
|
+
|
357
|
+
if (options.knownHelpers[name]) {
|
358
|
+
isHelper = true;
|
359
|
+
} else if (options.knownHelpersOnly) {
|
360
|
+
isEligible = false;
|
361
|
+
}
|
362
|
+
}
|
363
|
+
|
364
|
+
if (isHelper) { return "helper"; }
|
365
|
+
else if (isEligible) { return "ambiguous"; }
|
366
|
+
else { return "simple"; }
|
367
|
+
},
|
368
|
+
|
369
|
+
pushParams: function(params) {
|
370
|
+
var i = params.length, param;
|
371
|
+
|
372
|
+
while(i--) {
|
373
|
+
param = params[i];
|
374
|
+
|
375
|
+
if(this.options.stringParams) {
|
376
|
+
if(param.depth) {
|
377
|
+
this.addDepth(param.depth);
|
378
|
+
}
|
379
|
+
|
380
|
+
this.opcode('getContext', param.depth || 0);
|
381
|
+
this.opcode('pushStringParam', param.stringModeValue, param.type);
|
382
|
+
} else {
|
383
|
+
this[param.type](param);
|
384
|
+
}
|
385
|
+
}
|
386
|
+
},
|
387
|
+
|
388
|
+
setupMustacheParams: function(mustache) {
|
389
|
+
var params = mustache.params;
|
390
|
+
this.pushParams(params);
|
391
|
+
|
392
|
+
if(mustache.hash) {
|
393
|
+
this.hash(mustache.hash);
|
394
|
+
} else {
|
395
|
+
this.opcode('emptyHash');
|
396
|
+
}
|
397
|
+
|
398
|
+
return params;
|
399
|
+
},
|
400
|
+
|
401
|
+
// this will replace setupMustacheParams when we're done
|
402
|
+
setupFullMustacheParams: function(mustache, program, inverse) {
|
403
|
+
var params = mustache.params;
|
404
|
+
this.pushParams(params);
|
405
|
+
|
406
|
+
this.opcode('pushProgram', program);
|
407
|
+
this.opcode('pushProgram', inverse);
|
408
|
+
|
409
|
+
if(mustache.hash) {
|
410
|
+
this.hash(mustache.hash);
|
411
|
+
} else {
|
412
|
+
this.opcode('emptyHash');
|
413
|
+
}
|
414
|
+
|
415
|
+
return params;
|
416
|
+
}
|
417
|
+
};
|
418
|
+
|
419
|
+
var Literal = function(value) {
|
420
|
+
this.value = value;
|
421
|
+
};
|
422
|
+
|
423
|
+
JavaScriptCompiler.prototype = {
|
424
|
+
// PUBLIC API: You can override these methods in a subclass to provide
|
425
|
+
// alternative compiled forms for name lookup and buffering semantics
|
426
|
+
nameLookup: function(parent, name /* , type*/) {
|
427
|
+
if (/^[0-9]+$/.test(name)) {
|
428
|
+
return parent + "[" + name + "]";
|
429
|
+
} else if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) {
|
430
|
+
return parent + "." + name;
|
431
|
+
}
|
432
|
+
else {
|
433
|
+
return parent + "['" + name + "']";
|
434
|
+
}
|
435
|
+
},
|
436
|
+
|
437
|
+
appendToBuffer: function(string) {
|
438
|
+
if (this.environment.isSimple) {
|
439
|
+
return "return " + string + ";";
|
440
|
+
} else {
|
441
|
+
return {
|
442
|
+
appendToBuffer: true,
|
443
|
+
content: string,
|
444
|
+
toString: function() { return "buffer += " + string + ";"; }
|
445
|
+
};
|
446
|
+
}
|
447
|
+
},
|
448
|
+
|
449
|
+
initializeBuffer: function() {
|
450
|
+
return this.quotedString("");
|
451
|
+
},
|
452
|
+
|
453
|
+
namespace: "Handlebars",
|
454
|
+
// END PUBLIC API
|
455
|
+
|
456
|
+
compile: function(environment, options, context, asObject) {
|
457
|
+
this.environment = environment;
|
458
|
+
this.options = options || {};
|
459
|
+
|
460
|
+
Handlebars.log(Handlebars.logger.DEBUG, this.environment.disassemble() + "\n\n");
|
461
|
+
|
462
|
+
this.name = this.environment.name;
|
463
|
+
this.isChild = !!context;
|
464
|
+
this.context = context || {
|
465
|
+
programs: [],
|
466
|
+
environments: [],
|
467
|
+
aliases: { }
|
468
|
+
};
|
469
|
+
|
470
|
+
this.preamble();
|
471
|
+
|
472
|
+
this.stackSlot = 0;
|
473
|
+
this.stackVars = [];
|
474
|
+
this.registers = { list: [] };
|
475
|
+
this.compileStack = [];
|
476
|
+
this.inlineStack = [];
|
477
|
+
|
478
|
+
this.compileChildren(environment, options);
|
479
|
+
|
480
|
+
var opcodes = environment.opcodes, opcode;
|
481
|
+
|
482
|
+
this.i = 0;
|
483
|
+
|
484
|
+
for(l=opcodes.length; this.i<l; this.i++) {
|
485
|
+
opcode = opcodes[this.i];
|
486
|
+
|
487
|
+
if(opcode.opcode === 'DECLARE') {
|
488
|
+
this[opcode.name] = opcode.value;
|
489
|
+
} else {
|
490
|
+
this[opcode.opcode].apply(this, opcode.args);
|
491
|
+
}
|
492
|
+
}
|
493
|
+
|
494
|
+
return this.createFunctionContext(asObject);
|
495
|
+
},
|
496
|
+
|
497
|
+
nextOpcode: function() {
|
498
|
+
var opcodes = this.environment.opcodes;
|
499
|
+
return opcodes[this.i + 1];
|
500
|
+
},
|
501
|
+
|
502
|
+
eat: function() {
|
503
|
+
this.i = this.i + 1;
|
504
|
+
},
|
505
|
+
|
506
|
+
preamble: function() {
|
507
|
+
var out = [];
|
508
|
+
|
509
|
+
if (!this.isChild) {
|
510
|
+
var namespace = this.namespace;
|
511
|
+
|
512
|
+
var copies = "helpers = this.merge(helpers, " + namespace + ".helpers);";
|
513
|
+
if (this.environment.usePartial) { copies = copies + " partials = this.merge(partials, " + namespace + ".partials);"; }
|
514
|
+
if (this.options.data) { copies = copies + " data = data || {};"; }
|
515
|
+
out.push(copies);
|
516
|
+
} else {
|
517
|
+
out.push('');
|
518
|
+
}
|
519
|
+
|
520
|
+
if (!this.environment.isSimple) {
|
521
|
+
out.push(", buffer = " + this.initializeBuffer());
|
522
|
+
} else {
|
523
|
+
out.push("");
|
524
|
+
}
|
525
|
+
|
526
|
+
// track the last context pushed into place to allow skipping the
|
527
|
+
// getContext opcode when it would be a noop
|
528
|
+
this.lastContext = 0;
|
529
|
+
this.source = out;
|
530
|
+
},
|
531
|
+
|
532
|
+
createFunctionContext: function(asObject) {
|
533
|
+
var locals = this.stackVars.concat(this.registers.list);
|
534
|
+
|
535
|
+
if(locals.length > 0) {
|
536
|
+
this.source[1] = this.source[1] + ", " + locals.join(", ");
|
537
|
+
}
|
538
|
+
|
539
|
+
// Generate minimizer alias mappings
|
540
|
+
if (!this.isChild) {
|
541
|
+
for (var alias in this.context.aliases) {
|
542
|
+
if (this.context.aliases.hasOwnProperty(alias)) {
|
543
|
+
this.source[1] = this.source[1] + ', ' + alias + '=' + this.context.aliases[alias];
|
544
|
+
}
|
545
|
+
}
|
546
|
+
}
|
547
|
+
|
548
|
+
if (this.source[1]) {
|
549
|
+
this.source[1] = "var " + this.source[1].substring(2) + ";";
|
550
|
+
}
|
551
|
+
|
552
|
+
// Merge children
|
553
|
+
if (!this.isChild) {
|
554
|
+
this.source[1] += '\n' + this.context.programs.join('\n') + '\n';
|
555
|
+
}
|
556
|
+
|
557
|
+
if (!this.environment.isSimple) {
|
558
|
+
this.source.push("return buffer;");
|
559
|
+
}
|
560
|
+
|
561
|
+
var params = this.isChild ? ["depth0", "data"] : ["Handlebars", "depth0", "helpers", "partials", "data"];
|
562
|
+
|
563
|
+
for(var i=0, l=this.environment.depths.list.length; i<l; i++) {
|
564
|
+
params.push("depth" + this.environment.depths.list[i]);
|
565
|
+
}
|
566
|
+
|
567
|
+
// Perform a second pass over the output to merge content when possible
|
568
|
+
var source = this.mergeSource();
|
569
|
+
|
570
|
+
if (!this.isChild) {
|
571
|
+
var revision = Handlebars.COMPILER_REVISION,
|
572
|
+
versions = Handlebars.REVISION_CHANGES[revision];
|
573
|
+
source = "this.compilerInfo = ["+revision+",'"+versions+"'];\n"+source;
|
574
|
+
}
|
575
|
+
|
576
|
+
if (asObject) {
|
577
|
+
params.push(source);
|
578
|
+
|
579
|
+
return Function.apply(this, params);
|
580
|
+
} else {
|
581
|
+
var functionSource = 'function ' + (this.name || '') + '(' + params.join(',') + ') {\n ' + source + '}';
|
582
|
+
Handlebars.log(Handlebars.logger.DEBUG, functionSource + "\n\n");
|
583
|
+
return functionSource;
|
584
|
+
}
|
585
|
+
},
|
586
|
+
mergeSource: function() {
|
587
|
+
// WARN: We are not handling the case where buffer is still populated as the source should
|
588
|
+
// not have buffer append operations as their final action.
|
589
|
+
var source = '',
|
590
|
+
buffer;
|
591
|
+
for (var i = 0, len = this.source.length; i < len; i++) {
|
592
|
+
var line = this.source[i];
|
593
|
+
if (line.appendToBuffer) {
|
594
|
+
if (buffer) {
|
595
|
+
buffer = buffer + '\n + ' + line.content;
|
596
|
+
} else {
|
597
|
+
buffer = line.content;
|
598
|
+
}
|
599
|
+
} else {
|
600
|
+
if (buffer) {
|
601
|
+
source += 'buffer += ' + buffer + ';\n ';
|
602
|
+
buffer = undefined;
|
603
|
+
}
|
604
|
+
source += line + '\n ';
|
605
|
+
}
|
606
|
+
}
|
607
|
+
return source;
|
608
|
+
},
|
609
|
+
|
610
|
+
// [blockValue]
|
611
|
+
//
|
612
|
+
// On stack, before: hash, inverse, program, value
|
613
|
+
// On stack, after: return value of blockHelperMissing
|
614
|
+
//
|
615
|
+
// The purpose of this opcode is to take a block of the form
|
616
|
+
// `{{#foo}}...{{/foo}}`, resolve the value of `foo`, and
|
617
|
+
// replace it on the stack with the result of properly
|
618
|
+
// invoking blockHelperMissing.
|
619
|
+
blockValue: function() {
|
620
|
+
this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
|
621
|
+
|
622
|
+
var params = ["depth0"];
|
623
|
+
this.setupParams(0, params);
|
624
|
+
|
625
|
+
this.replaceStack(function(current) {
|
626
|
+
params.splice(1, 0, current);
|
627
|
+
return "blockHelperMissing.call(" + params.join(", ") + ")";
|
628
|
+
});
|
629
|
+
},
|
630
|
+
|
631
|
+
// [ambiguousBlockValue]
|
632
|
+
//
|
633
|
+
// On stack, before: hash, inverse, program, value
|
634
|
+
// Compiler value, before: lastHelper=value of last found helper, if any
|
635
|
+
// On stack, after, if no lastHelper: same as [blockValue]
|
636
|
+
// On stack, after, if lastHelper: value
|
637
|
+
ambiguousBlockValue: function() {
|
638
|
+
this.context.aliases.blockHelperMissing = 'helpers.blockHelperMissing';
|
639
|
+
|
640
|
+
var params = ["depth0"];
|
641
|
+
this.setupParams(0, params);
|
642
|
+
|
643
|
+
var current = this.topStack();
|
644
|
+
params.splice(1, 0, current);
|
645
|
+
|
646
|
+
// Use the options value generated from the invocation
|
647
|
+
params[params.length-1] = 'options';
|
648
|
+
|
649
|
+
this.source.push("if (!" + this.lastHelper + ") { " + current + " = blockHelperMissing.call(" + params.join(", ") + "); }");
|
650
|
+
},
|
651
|
+
|
652
|
+
// [appendContent]
|
653
|
+
//
|
654
|
+
// On stack, before: ...
|
655
|
+
// On stack, after: ...
|
656
|
+
//
|
657
|
+
// Appends the string value of `content` to the current buffer
|
658
|
+
appendContent: function(content) {
|
659
|
+
this.source.push(this.appendToBuffer(this.quotedString(content)));
|
660
|
+
},
|
661
|
+
|
662
|
+
// [append]
|
663
|
+
//
|
664
|
+
// On stack, before: value, ...
|
665
|
+
// On stack, after: ...
|
666
|
+
//
|
667
|
+
// Coerces `value` to a String and appends it to the current buffer.
|
668
|
+
//
|
669
|
+
// If `value` is truthy, or 0, it is coerced into a string and appended
|
670
|
+
// Otherwise, the empty string is appended
|
671
|
+
append: function() {
|
672
|
+
// Force anything that is inlined onto the stack so we don't have duplication
|
673
|
+
// when we examine local
|
674
|
+
this.flushInline();
|
675
|
+
var local = this.popStack();
|
676
|
+
this.source.push("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
|
677
|
+
if (this.environment.isSimple) {
|
678
|
+
this.source.push("else { " + this.appendToBuffer("''") + " }");
|
679
|
+
}
|
680
|
+
},
|
681
|
+
|
682
|
+
// [appendEscaped]
|
683
|
+
//
|
684
|
+
// On stack, before: value, ...
|
685
|
+
// On stack, after: ...
|
686
|
+
//
|
687
|
+
// Escape `value` and append it to the buffer
|
688
|
+
appendEscaped: function() {
|
689
|
+
this.context.aliases.escapeExpression = 'this.escapeExpression';
|
690
|
+
|
691
|
+
this.source.push(this.appendToBuffer("escapeExpression(" + this.popStack() + ")"));
|
692
|
+
},
|
693
|
+
|
694
|
+
// [getContext]
|
695
|
+
//
|
696
|
+
// On stack, before: ...
|
697
|
+
// On stack, after: ...
|
698
|
+
// Compiler value, after: lastContext=depth
|
699
|
+
//
|
700
|
+
// Set the value of the `lastContext` compiler value to the depth
|
701
|
+
getContext: function(depth) {
|
702
|
+
if(this.lastContext !== depth) {
|
703
|
+
this.lastContext = depth;
|
704
|
+
}
|
705
|
+
},
|
706
|
+
|
707
|
+
// [lookupOnContext]
|
708
|
+
//
|
709
|
+
// On stack, before: ...
|
710
|
+
// On stack, after: currentContext[name], ...
|
711
|
+
//
|
712
|
+
// Looks up the value of `name` on the current context and pushes
|
713
|
+
// it onto the stack.
|
714
|
+
lookupOnContext: function(name) {
|
715
|
+
this.push(this.nameLookup('depth' + this.lastContext, name, 'context'));
|
716
|
+
},
|
717
|
+
|
718
|
+
// [pushContext]
|
719
|
+
//
|
720
|
+
// On stack, before: ...
|
721
|
+
// On stack, after: currentContext, ...
|
722
|
+
//
|
723
|
+
// Pushes the value of the current context onto the stack.
|
724
|
+
pushContext: function() {
|
725
|
+
this.pushStackLiteral('depth' + this.lastContext);
|
726
|
+
},
|
727
|
+
|
728
|
+
// [resolvePossibleLambda]
|
729
|
+
//
|
730
|
+
// On stack, before: value, ...
|
731
|
+
// On stack, after: resolved value, ...
|
732
|
+
//
|
733
|
+
// If the `value` is a lambda, replace it on the stack by
|
734
|
+
// the return value of the lambda
|
735
|
+
resolvePossibleLambda: function() {
|
736
|
+
this.context.aliases.functionType = '"function"';
|
737
|
+
|
738
|
+
this.replaceStack(function(current) {
|
739
|
+
return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current;
|
740
|
+
});
|
741
|
+
},
|
742
|
+
|
743
|
+
// [lookup]
|
744
|
+
//
|
745
|
+
// On stack, before: value, ...
|
746
|
+
// On stack, after: value[name], ...
|
747
|
+
//
|
748
|
+
// Replace the value on the stack with the result of looking
|
749
|
+
// up `name` on `value`
|
750
|
+
lookup: function(name) {
|
751
|
+
this.replaceStack(function(current) {
|
752
|
+
return current + " == null || " + current + " === false ? " + current + " : " + this.nameLookup(current, name, 'context');
|
753
|
+
});
|
754
|
+
},
|
755
|
+
|
756
|
+
// [lookupData]
|
757
|
+
//
|
758
|
+
// On stack, before: ...
|
759
|
+
// On stack, after: data[id], ...
|
760
|
+
//
|
761
|
+
// Push the result of looking up `id` on the current data
|
762
|
+
lookupData: function(id) {
|
763
|
+
this.push('data');
|
764
|
+
},
|
765
|
+
|
766
|
+
// [pushStringParam]
|
767
|
+
//
|
768
|
+
// On stack, before: ...
|
769
|
+
// On stack, after: string, currentContext, ...
|
770
|
+
//
|
771
|
+
// This opcode is designed for use in string mode, which
|
772
|
+
// provides the string value of a parameter along with its
|
773
|
+
// depth rather than resolving it immediately.
|
774
|
+
pushStringParam: function(string, type) {
|
775
|
+
this.pushStackLiteral('depth' + this.lastContext);
|
776
|
+
|
777
|
+
this.pushString(type);
|
778
|
+
|
779
|
+
if (typeof string === 'string') {
|
780
|
+
this.pushString(string);
|
781
|
+
} else {
|
782
|
+
this.pushStackLiteral(string);
|
783
|
+
}
|
784
|
+
},
|
785
|
+
|
786
|
+
emptyHash: function() {
|
787
|
+
this.pushStackLiteral('{}');
|
788
|
+
|
789
|
+
if (this.options.stringParams) {
|
790
|
+
this.register('hashTypes', '{}');
|
791
|
+
this.register('hashContexts', '{}');
|
792
|
+
}
|
793
|
+
},
|
794
|
+
pushHash: function() {
|
795
|
+
this.hash = {values: [], types: [], contexts: []};
|
796
|
+
},
|
797
|
+
popHash: function() {
|
798
|
+
var hash = this.hash;
|
799
|
+
this.hash = undefined;
|
800
|
+
|
801
|
+
if (this.options.stringParams) {
|
802
|
+
this.register('hashContexts', '{' + hash.contexts.join(',') + '}');
|
803
|
+
this.register('hashTypes', '{' + hash.types.join(',') + '}');
|
804
|
+
}
|
805
|
+
this.push('{\n ' + hash.values.join(',\n ') + '\n }');
|
806
|
+
},
|
807
|
+
|
808
|
+
// [pushString]
|
809
|
+
//
|
810
|
+
// On stack, before: ...
|
811
|
+
// On stack, after: quotedString(string), ...
|
812
|
+
//
|
813
|
+
// Push a quoted version of `string` onto the stack
|
814
|
+
pushString: function(string) {
|
815
|
+
this.pushStackLiteral(this.quotedString(string));
|
816
|
+
},
|
817
|
+
|
818
|
+
// [push]
|
819
|
+
//
|
820
|
+
// On stack, before: ...
|
821
|
+
// On stack, after: expr, ...
|
822
|
+
//
|
823
|
+
// Push an expression onto the stack
|
824
|
+
push: function(expr) {
|
825
|
+
this.inlineStack.push(expr);
|
826
|
+
return expr;
|
827
|
+
},
|
828
|
+
|
829
|
+
// [pushLiteral]
|
830
|
+
//
|
831
|
+
// On stack, before: ...
|
832
|
+
// On stack, after: value, ...
|
833
|
+
//
|
834
|
+
// Pushes a value onto the stack. This operation prevents
|
835
|
+
// the compiler from creating a temporary variable to hold
|
836
|
+
// it.
|
837
|
+
pushLiteral: function(value) {
|
838
|
+
this.pushStackLiteral(value);
|
839
|
+
},
|
840
|
+
|
841
|
+
// [pushProgram]
|
842
|
+
//
|
843
|
+
// On stack, before: ...
|
844
|
+
// On stack, after: program(guid), ...
|
845
|
+
//
|
846
|
+
// Push a program expression onto the stack. This takes
|
847
|
+
// a compile-time guid and converts it into a runtime-accessible
|
848
|
+
// expression.
|
849
|
+
pushProgram: function(guid) {
|
850
|
+
if (guid != null) {
|
851
|
+
this.pushStackLiteral(this.programExpression(guid));
|
852
|
+
} else {
|
853
|
+
this.pushStackLiteral(null);
|
854
|
+
}
|
855
|
+
},
|
856
|
+
|
857
|
+
// [invokeHelper]
|
858
|
+
//
|
859
|
+
// On stack, before: hash, inverse, program, params..., ...
|
860
|
+
// On stack, after: result of helper invocation
|
861
|
+
//
|
862
|
+
// Pops off the helper's parameters, invokes the helper,
|
863
|
+
// and pushes the helper's return value onto the stack.
|
864
|
+
//
|
865
|
+
// If the helper is not found, `helperMissing` is called.
|
866
|
+
invokeHelper: function(paramSize, name) {
|
867
|
+
this.context.aliases.helperMissing = 'helpers.helperMissing';
|
868
|
+
|
869
|
+
var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
|
870
|
+
var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
|
871
|
+
|
872
|
+
this.push(helper.name + ' || ' + nonHelper);
|
873
|
+
this.replaceStack(function(name) {
|
874
|
+
return name + ' ? ' + name + '.call(' +
|
875
|
+
helper.callParams + ") " + ": helperMissing.call(" +
|
876
|
+
helper.helperMissingParams + ")";
|
877
|
+
});
|
878
|
+
},
|
879
|
+
|
880
|
+
// [invokeKnownHelper]
|
881
|
+
//
|
882
|
+
// On stack, before: hash, inverse, program, params..., ...
|
883
|
+
// On stack, after: result of helper invocation
|
884
|
+
//
|
885
|
+
// This operation is used when the helper is known to exist,
|
886
|
+
// so a `helperMissing` fallback is not required.
|
887
|
+
invokeKnownHelper: function(paramSize, name) {
|
888
|
+
var helper = this.setupHelper(paramSize, name);
|
889
|
+
this.push(helper.name + ".call(" + helper.callParams + ")");
|
890
|
+
},
|
891
|
+
|
892
|
+
// [invokeAmbiguous]
|
893
|
+
//
|
894
|
+
// On stack, before: hash, inverse, program, params..., ...
|
895
|
+
// On stack, after: result of disambiguation
|
896
|
+
//
|
897
|
+
// This operation is used when an expression like `{{foo}}`
|
898
|
+
// is provided, but we don't know at compile-time whether it
|
899
|
+
// is a helper or a path.
|
900
|
+
//
|
901
|
+
// This operation emits more code than the other options,
|
902
|
+
// and can be avoided by passing the `knownHelpers` and
|
903
|
+
// `knownHelpersOnly` flags at compile-time.
|
904
|
+
invokeAmbiguous: function(name, helperCall) {
|
905
|
+
this.context.aliases.functionType = '"function"';
|
906
|
+
|
907
|
+
this.pushStackLiteral('{}'); // Hash value
|
908
|
+
var helper = this.setupHelper(0, name, helperCall);
|
909
|
+
|
910
|
+
var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper');
|
911
|
+
|
912
|
+
var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
|
913
|
+
var nextStack = this.nextStack();
|
914
|
+
|
915
|
+
this.source.push('if (' + nextStack + ' = ' + helperName + ') { ' + nextStack + ' = ' + nextStack + '.call(' + helper.callParams + '); }');
|
916
|
+
this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }');
|
917
|
+
},
|
918
|
+
|
919
|
+
// [invokePartial]
|
920
|
+
//
|
921
|
+
// On stack, before: context, ...
|
922
|
+
// On stack after: result of partial invocation
|
923
|
+
//
|
924
|
+
// This operation pops off a context, invokes a partial with that context,
|
925
|
+
// and pushes the result of the invocation back.
|
926
|
+
invokePartial: function(name) {
|
927
|
+
var params = [this.nameLookup('partials', name, 'partial'), "'" + name + "'", this.popStack(), "helpers", "partials"];
|
928
|
+
|
929
|
+
if (this.options.data) {
|
930
|
+
params.push("data");
|
931
|
+
}
|
932
|
+
|
933
|
+
this.context.aliases.self = "this";
|
934
|
+
this.push("self.invokePartial(" + params.join(", ") + ")");
|
935
|
+
},
|
936
|
+
|
937
|
+
// [assignToHash]
|
938
|
+
//
|
939
|
+
// On stack, before: value, hash, ...
|
940
|
+
// On stack, after: hash, ...
|
941
|
+
//
|
942
|
+
// Pops a value and hash off the stack, assigns `hash[key] = value`
|
943
|
+
// and pushes the hash back onto the stack.
|
944
|
+
assignToHash: function(key) {
|
945
|
+
var value = this.popStack(),
|
946
|
+
context,
|
947
|
+
type;
|
948
|
+
|
949
|
+
if (this.options.stringParams) {
|
950
|
+
type = this.popStack();
|
951
|
+
context = this.popStack();
|
952
|
+
}
|
953
|
+
|
954
|
+
var hash = this.hash;
|
955
|
+
if (context) {
|
956
|
+
hash.contexts.push("'" + key + "': " + context);
|
957
|
+
}
|
958
|
+
if (type) {
|
959
|
+
hash.types.push("'" + key + "': " + type);
|
960
|
+
}
|
961
|
+
hash.values.push("'" + key + "': (" + value + ")");
|
962
|
+
},
|
963
|
+
|
964
|
+
// HELPERS
|
965
|
+
|
966
|
+
compiler: JavaScriptCompiler,
|
967
|
+
|
968
|
+
compileChildren: function(environment, options) {
|
969
|
+
var children = environment.children, child, compiler;
|
970
|
+
|
971
|
+
for(var i=0, l=children.length; i<l; i++) {
|
972
|
+
child = children[i];
|
973
|
+
compiler = new this.compiler();
|
974
|
+
|
975
|
+
var index = this.matchExistingProgram(child);
|
976
|
+
|
977
|
+
if (index == null) {
|
978
|
+
this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children
|
979
|
+
index = this.context.programs.length;
|
980
|
+
child.index = index;
|
981
|
+
child.name = 'program' + index;
|
982
|
+
this.context.programs[index] = compiler.compile(child, options, this.context);
|
983
|
+
this.context.environments[index] = child;
|
984
|
+
} else {
|
985
|
+
child.index = index;
|
986
|
+
child.name = 'program' + index;
|
987
|
+
}
|
988
|
+
}
|
989
|
+
},
|
990
|
+
matchExistingProgram: function(child) {
|
991
|
+
for (var i = 0, len = this.context.environments.length; i < len; i++) {
|
992
|
+
var environment = this.context.environments[i];
|
993
|
+
if (environment && environment.equals(child)) {
|
994
|
+
return i;
|
995
|
+
}
|
996
|
+
}
|
997
|
+
},
|
998
|
+
|
999
|
+
programExpression: function(guid) {
|
1000
|
+
this.context.aliases.self = "this";
|
1001
|
+
|
1002
|
+
if(guid == null) {
|
1003
|
+
return "self.noop";
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
var child = this.environment.children[guid],
|
1007
|
+
depths = child.depths.list, depth;
|
1008
|
+
|
1009
|
+
var programParams = [child.index, child.name, "data"];
|
1010
|
+
|
1011
|
+
for(var i=0, l = depths.length; i<l; i++) {
|
1012
|
+
depth = depths[i];
|
1013
|
+
|
1014
|
+
if(depth === 1) { programParams.push("depth0"); }
|
1015
|
+
else { programParams.push("depth" + (depth - 1)); }
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
return (depths.length === 0 ? "self.program(" : "self.programWithDepth(") + programParams.join(", ") + ")";
|
1019
|
+
},
|
1020
|
+
|
1021
|
+
register: function(name, val) {
|
1022
|
+
this.useRegister(name);
|
1023
|
+
this.source.push(name + " = " + val + ";");
|
1024
|
+
},
|
1025
|
+
|
1026
|
+
useRegister: function(name) {
|
1027
|
+
if(!this.registers[name]) {
|
1028
|
+
this.registers[name] = true;
|
1029
|
+
this.registers.list.push(name);
|
1030
|
+
}
|
1031
|
+
},
|
1032
|
+
|
1033
|
+
pushStackLiteral: function(item) {
|
1034
|
+
return this.push(new Literal(item));
|
1035
|
+
},
|
1036
|
+
|
1037
|
+
pushStack: function(item) {
|
1038
|
+
this.flushInline();
|
1039
|
+
|
1040
|
+
var stack = this.incrStack();
|
1041
|
+
if (item) {
|
1042
|
+
this.source.push(stack + " = " + item + ";");
|
1043
|
+
}
|
1044
|
+
this.compileStack.push(stack);
|
1045
|
+
return stack;
|
1046
|
+
},
|
1047
|
+
|
1048
|
+
replaceStack: function(callback) {
|
1049
|
+
var prefix = '',
|
1050
|
+
inline = this.isInline(),
|
1051
|
+
stack;
|
1052
|
+
|
1053
|
+
// If we are currently inline then we want to merge the inline statement into the
|
1054
|
+
// replacement statement via ','
|
1055
|
+
if (inline) {
|
1056
|
+
var top = this.popStack(true);
|
1057
|
+
|
1058
|
+
if (top instanceof Literal) {
|
1059
|
+
// Literals do not need to be inlined
|
1060
|
+
stack = top.value;
|
1061
|
+
} else {
|
1062
|
+
// Get or create the current stack name for use by the inline
|
1063
|
+
var name = this.stackSlot ? this.topStackName() : this.incrStack();
|
1064
|
+
|
1065
|
+
prefix = '(' + this.push(name) + ' = ' + top + '),';
|
1066
|
+
stack = this.topStack();
|
1067
|
+
}
|
1068
|
+
} else {
|
1069
|
+
stack = this.topStack();
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
var item = callback.call(this, stack);
|
1073
|
+
|
1074
|
+
if (inline) {
|
1075
|
+
if (this.inlineStack.length || this.compileStack.length) {
|
1076
|
+
this.popStack();
|
1077
|
+
}
|
1078
|
+
this.push('(' + prefix + item + ')');
|
1079
|
+
} else {
|
1080
|
+
// Prevent modification of the context depth variable. Through replaceStack
|
1081
|
+
if (!/^stack/.test(stack)) {
|
1082
|
+
stack = this.nextStack();
|
1083
|
+
}
|
1084
|
+
|
1085
|
+
this.source.push(stack + " = (" + prefix + item + ");");
|
1086
|
+
}
|
1087
|
+
return stack;
|
1088
|
+
},
|
1089
|
+
|
1090
|
+
nextStack: function() {
|
1091
|
+
return this.pushStack();
|
1092
|
+
},
|
1093
|
+
|
1094
|
+
incrStack: function() {
|
1095
|
+
this.stackSlot++;
|
1096
|
+
if(this.stackSlot > this.stackVars.length) { this.stackVars.push("stack" + this.stackSlot); }
|
1097
|
+
return this.topStackName();
|
1098
|
+
},
|
1099
|
+
topStackName: function() {
|
1100
|
+
return "stack" + this.stackSlot;
|
1101
|
+
},
|
1102
|
+
flushInline: function() {
|
1103
|
+
var inlineStack = this.inlineStack;
|
1104
|
+
if (inlineStack.length) {
|
1105
|
+
this.inlineStack = [];
|
1106
|
+
for (var i = 0, len = inlineStack.length; i < len; i++) {
|
1107
|
+
var entry = inlineStack[i];
|
1108
|
+
if (entry instanceof Literal) {
|
1109
|
+
this.compileStack.push(entry);
|
1110
|
+
} else {
|
1111
|
+
this.pushStack(entry);
|
1112
|
+
}
|
1113
|
+
}
|
1114
|
+
}
|
1115
|
+
},
|
1116
|
+
isInline: function() {
|
1117
|
+
return this.inlineStack.length;
|
1118
|
+
},
|
1119
|
+
|
1120
|
+
popStack: function(wrapped) {
|
1121
|
+
var inline = this.isInline(),
|
1122
|
+
item = (inline ? this.inlineStack : this.compileStack).pop();
|
1123
|
+
|
1124
|
+
if (!wrapped && (item instanceof Literal)) {
|
1125
|
+
return item.value;
|
1126
|
+
} else {
|
1127
|
+
if (!inline) {
|
1128
|
+
this.stackSlot--;
|
1129
|
+
}
|
1130
|
+
return item;
|
1131
|
+
}
|
1132
|
+
},
|
1133
|
+
|
1134
|
+
topStack: function(wrapped) {
|
1135
|
+
var stack = (this.isInline() ? this.inlineStack : this.compileStack),
|
1136
|
+
item = stack[stack.length - 1];
|
1137
|
+
|
1138
|
+
if (!wrapped && (item instanceof Literal)) {
|
1139
|
+
return item.value;
|
1140
|
+
} else {
|
1141
|
+
return item;
|
1142
|
+
}
|
1143
|
+
},
|
1144
|
+
|
1145
|
+
quotedString: function(str) {
|
1146
|
+
return '"' + str
|
1147
|
+
.replace(/\\/g, '\\\\')
|
1148
|
+
.replace(/"/g, '\\"')
|
1149
|
+
.replace(/\n/g, '\\n')
|
1150
|
+
.replace(/\r/g, '\\r')
|
1151
|
+
.replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4
|
1152
|
+
.replace(/\u2029/g, '\\u2029') + '"';
|
1153
|
+
},
|
1154
|
+
|
1155
|
+
setupHelper: function(paramSize, name, missingParams) {
|
1156
|
+
var params = [];
|
1157
|
+
this.setupParams(paramSize, params, missingParams);
|
1158
|
+
var foundHelper = this.nameLookup('helpers', name, 'helper');
|
1159
|
+
|
1160
|
+
return {
|
1161
|
+
params: params,
|
1162
|
+
name: foundHelper,
|
1163
|
+
callParams: ["depth0"].concat(params).join(", "),
|
1164
|
+
helperMissingParams: missingParams && ["depth0", this.quotedString(name)].concat(params).join(", ")
|
1165
|
+
};
|
1166
|
+
},
|
1167
|
+
|
1168
|
+
// the params and contexts arguments are passed in arrays
|
1169
|
+
// to fill in
|
1170
|
+
setupParams: function(paramSize, params, useRegister) {
|
1171
|
+
var options = [], contexts = [], types = [], param, inverse, program;
|
1172
|
+
|
1173
|
+
options.push("hash:" + this.popStack());
|
1174
|
+
|
1175
|
+
inverse = this.popStack();
|
1176
|
+
program = this.popStack();
|
1177
|
+
|
1178
|
+
// Avoid setting fn and inverse if neither are set. This allows
|
1179
|
+
// helpers to do a check for `if (options.fn)`
|
1180
|
+
if (program || inverse) {
|
1181
|
+
if (!program) {
|
1182
|
+
this.context.aliases.self = "this";
|
1183
|
+
program = "self.noop";
|
1184
|
+
}
|
1185
|
+
|
1186
|
+
if (!inverse) {
|
1187
|
+
this.context.aliases.self = "this";
|
1188
|
+
inverse = "self.noop";
|
1189
|
+
}
|
1190
|
+
|
1191
|
+
options.push("inverse:" + inverse);
|
1192
|
+
options.push("fn:" + program);
|
1193
|
+
}
|
1194
|
+
|
1195
|
+
for(var i=0; i<paramSize; i++) {
|
1196
|
+
param = this.popStack();
|
1197
|
+
params.push(param);
|
1198
|
+
|
1199
|
+
if(this.options.stringParams) {
|
1200
|
+
types.push(this.popStack());
|
1201
|
+
contexts.push(this.popStack());
|
1202
|
+
}
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
if (this.options.stringParams) {
|
1206
|
+
options.push("contexts:[" + contexts.join(",") + "]");
|
1207
|
+
options.push("types:[" + types.join(",") + "]");
|
1208
|
+
options.push("hashContexts:hashContexts");
|
1209
|
+
options.push("hashTypes:hashTypes");
|
1210
|
+
}
|
1211
|
+
|
1212
|
+
if(this.options.data) {
|
1213
|
+
options.push("data:data");
|
1214
|
+
}
|
1215
|
+
|
1216
|
+
options = "{" + options.join(",") + "}";
|
1217
|
+
if (useRegister) {
|
1218
|
+
this.register('options', options);
|
1219
|
+
params.push('options');
|
1220
|
+
} else {
|
1221
|
+
params.push(options);
|
1222
|
+
}
|
1223
|
+
return params.join(", ");
|
1224
|
+
}
|
1225
|
+
};
|
1226
|
+
|
1227
|
+
var reservedWords = (
|
1228
|
+
"break else new var" +
|
1229
|
+
" case finally return void" +
|
1230
|
+
" catch for switch while" +
|
1231
|
+
" continue function this with" +
|
1232
|
+
" default if throw" +
|
1233
|
+
" delete in try" +
|
1234
|
+
" do instanceof typeof" +
|
1235
|
+
" abstract enum int short" +
|
1236
|
+
" boolean export interface static" +
|
1237
|
+
" byte extends long super" +
|
1238
|
+
" char final native synchronized" +
|
1239
|
+
" class float package throws" +
|
1240
|
+
" const goto private transient" +
|
1241
|
+
" debugger implements protected volatile" +
|
1242
|
+
" double import public let yield"
|
1243
|
+
).split(" ");
|
1244
|
+
|
1245
|
+
var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
|
1246
|
+
|
1247
|
+
for(var i=0, l=reservedWords.length; i<l; i++) {
|
1248
|
+
compilerWords[reservedWords[i]] = true;
|
1249
|
+
}
|
1250
|
+
|
1251
|
+
JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
|
1252
|
+
if(!JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(name)) {
|
1253
|
+
return true;
|
1254
|
+
}
|
1255
|
+
return false;
|
1256
|
+
};
|
1257
|
+
|
1258
|
+
Handlebars.precompile = function(input, options) {
|
1259
|
+
if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
|
1260
|
+
throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
|
1261
|
+
}
|
1262
|
+
|
1263
|
+
options = options || {};
|
1264
|
+
if (!('data' in options)) {
|
1265
|
+
options.data = true;
|
1266
|
+
}
|
1267
|
+
var ast = Handlebars.parse(input);
|
1268
|
+
var environment = new Compiler().compile(ast, options);
|
1269
|
+
return new JavaScriptCompiler().compile(environment, options);
|
1270
|
+
};
|
1271
|
+
|
1272
|
+
Handlebars.compile = function(input, options) {
|
1273
|
+
if (input == null || (typeof input !== 'string' && input.constructor !== Handlebars.AST.ProgramNode)) {
|
1274
|
+
throw new Handlebars.Exception("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
options = options || {};
|
1278
|
+
if (!('data' in options)) {
|
1279
|
+
options.data = true;
|
1280
|
+
}
|
1281
|
+
var compiled;
|
1282
|
+
function compile() {
|
1283
|
+
var ast = Handlebars.parse(input);
|
1284
|
+
var environment = new Compiler().compile(ast, options);
|
1285
|
+
var templateSpec = new JavaScriptCompiler().compile(environment, options, undefined, true);
|
1286
|
+
return Handlebars.template(templateSpec);
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
// Template is only compiled on first use and cached after that point.
|
1290
|
+
return function(context, options) {
|
1291
|
+
if (!compiled) {
|
1292
|
+
compiled = compile();
|
1293
|
+
}
|
1294
|
+
return compiled.call(this, context, options);
|
1295
|
+
};
|
1296
|
+
};
|
1297
|
+
|
1298
|
+
|
1299
|
+
// END(BROWSER)
|
1300
|
+
|
1301
|
+
return Handlebars;
|
1302
|
+
|
1303
|
+
};
|
1304
|
+
|
1305
|
+
|