├── docs ├── .meteor │ ├── .gitignore │ ├── release │ └── packages ├── public │ ├── robots.txt │ ├── favicon.ico │ └── forkme_right_red_aa0000.png └── client │ ├── packages │ ├── backbone.html │ ├── amplify.html │ ├── bootstrap.html │ ├── showdown.html │ ├── d3.html │ ├── less.html │ ├── jquery.html │ ├── audit-argument-checks.html │ ├── stylus.html │ ├── underscore.html │ ├── force-ssl.html │ ├── coffeescript.html │ └── random.html │ └── packages.html ├── examples ├── parties │ ├── .meteor │ │ ├── release │ │ ├── .gitignore │ │ └── packages │ ├── public │ │ └── soma.png │ ├── server │ │ └── server.js │ └── client │ │ └── parties.css ├── todos │ ├── .meteor │ │ ├── .gitignore │ │ ├── release │ │ └── packages │ ├── public │ │ ├── close_16.png │ │ └── destroy.png │ └── server │ │ └── publish.js ├── wordplay │ ├── .meteor │ │ ├── release │ │ ├── .gitignore │ │ └── packages │ ├── public │ │ └── circle-ball-dark-antialiased.gif │ └── TODO ├── leaderboard │ ├── .meteor │ │ ├── release │ │ ├── .gitignore │ │ └── packages │ ├── leaderboard.html │ ├── leaderboard.css │ └── leaderboard.js ├── other │ ├── benchmark │ │ └── .meteor │ │ │ └── release │ ├── login-demo │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ └── login-demo.css │ ├── quiescence │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ └── quiescence.html │ ├── controllers-demo │ │ └── .meteor │ │ │ └── release │ └── template-demo │ │ ├── .meteor │ │ ├── .gitignore │ │ ├── release │ │ └── packages │ │ ├── model.js │ │ └── client │ │ └── template-demo.css ├── unfinished │ ├── azrael │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ ├── client │ │ │ ├── azrael.css │ │ │ └── azrael.html │ │ └── model.js │ ├── benchmark │ │ ├── .meteor │ │ │ ├── .gitignore │ │ │ ├── release │ │ │ └── packages │ │ ├── benchmark.css │ │ ├── scenarios │ │ │ ├── nodata.json │ │ │ ├── bigdata-static.json │ │ │ ├── bigdata-updates.json │ │ │ ├── default.json │ │ │ └── README.md │ │ └── benchmark.html │ ├── coffeeless │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ ├── model.coffee │ │ ├── public │ │ │ └── 4201645142_ec2e3bb3f8_b.jpg │ │ └── client │ │ │ ├── coffeeless.less │ │ │ ├── coffeeless.coffee │ │ │ └── coffeeless.html │ ├── controls │ │ ├── .meteor │ │ │ ├── .gitignore │ │ │ ├── release │ │ │ └── packages │ │ ├── controls.css │ │ ├── controls.html │ │ └── client │ │ │ └── controls.js │ ├── jsparse-docs │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ └── jsparse-docs.css │ ├── parse-inspector │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ └── parse-inspector.html │ ├── todos-backbone │ │ ├── .meteor │ │ │ ├── .gitignore │ │ │ ├── release │ │ │ └── packages │ │ ├── public │ │ │ └── destroy.png │ │ └── common.js │ ├── todos-underscore │ │ ├── .meteor │ │ │ ├── release │ │ │ ├── .gitignore │ │ │ └── packages │ │ ├── public │ │ │ ├── destroy.png │ │ │ └── close_16.png │ │ ├── common.js │ │ ├── reset.css │ │ └── server │ │ │ └── bootstrap.js │ ├── accounts-ui-viewer │ │ └── .meteor │ │ │ ├── .gitignore │ │ │ ├── release │ │ │ └── packages │ ├── leaderboard-remote │ │ ├── .meteor │ │ │ ├── .gitignore │ │ │ ├── release │ │ │ └── packages │ │ ├── public │ │ │ └── planes.png │ │ └── client │ │ │ ├── leaderboard-remote.html │ │ │ ├── leaderboard-remote.css │ │ │ └── leaderboard-remote.js │ └── python-ddp-client │ │ ├── README │ │ └── test_input └── .gitignore ├── packages ├── .gitignore ├── email │ ├── .npm │ │ ├── .gitignore │ │ ├── README │ │ └── npm-shrinkwrap.json │ └── package.js ├── less │ ├── .npm │ │ ├── .gitignore │ │ ├── npm-shrinkwrap.json │ │ └── README │ ├── less_tests_constants.lessimport │ ├── less_tests.less │ └── less_tests.js ├── stylus │ ├── .npm │ │ ├── .gitignore │ │ ├── npm-shrinkwrap.json │ │ └── README │ ├── stylus_tests.styl │ ├── stylus_tests.js │ └── package.js ├── livedata │ ├── .npm │ │ ├── .gitignore │ │ ├── npm-shrinkwrap.json │ │ └── README │ ├── server_convenience.js │ ├── client_convenience.js │ └── crossbar_tests.js ├── coffeescript │ ├── .npm │ │ ├── .gitignore │ │ ├── npm-shrinkwrap.json │ │ └── README │ ├── coffeescript_strict_tests.coffee │ ├── coffeescript_tests.coffee │ ├── litcoffeescript_tests.litcoffee │ ├── coffeescript_tests.js │ └── package.js ├── mongo-livedata │ ├── .npm │ │ ├── .gitignore │ │ ├── npm-shrinkwrap.json │ │ └── README │ ├── collection_tests.js │ ├── local_collection_driver.js │ └── remote_collection_driver.js ├── accounts-oauth-helper │ ├── oauth_common.js │ └── package.js ├── insecure │ ├── insecure.js │ └── package.js ├── accounts-oauth1-helper │ ├── oauth1_common.js │ └── package.js ├── accounts-oauth2-helper │ ├── oauth2_common.js │ ├── package.js │ └── oauth2_server.js ├── accounts-password │ ├── password_common.js │ ├── package.js │ └── email_tests_setup.js ├── autopublish │ ├── autopublish.js │ └── package.js ├── spiderable │ ├── spiderable.html │ └── package.js ├── accounts-github │ ├── github_common.js │ ├── github_configure.js │ ├── github_configure.html │ ├── package.js │ ├── github_login_button.css │ └── github_client.js ├── accounts-google │ ├── google_common.js │ ├── google_configure.js │ ├── package.js │ ├── google_configure.html │ ├── google_login_button.css │ └── google_client.js ├── accounts-meetup │ ├── meetup_common.js │ ├── meetup_configure.js │ ├── package.js │ ├── meetup_configure.html │ └── meetup_client.js ├── accounts-weibo │ ├── weibo_common.js │ ├── weibo_configure.js │ ├── package.js │ ├── weibo_configure.html │ ├── weibo_client.js │ └── weibo_login_button.css ├── force-ssl │ ├── force_ssl_common.js │ └── package.js ├── accounts-facebook │ ├── facebook_common.js │ ├── facebook_configure.js │ ├── facebook_login_button.css │ ├── package.js │ ├── facebook_configure.html │ └── facebook_client.js ├── audit-argument-checks │ ├── audit_argument_checks.js │ └── package.js ├── code-prettify │ ├── lang-go.js │ ├── lang-lua.js │ ├── lang-ml.js │ ├── lang-sql.js │ ├── lang-tex.js │ ├── lang-vb.js │ ├── lang-vhdl.js │ ├── lang-wiki.js │ ├── lang-apollo.js │ ├── lang-scala.js │ ├── lang-proto.js │ ├── lang-yaml.js │ ├── lang-hs.js │ ├── package.js │ ├── prettify.css │ ├── lang-lisp.js │ ├── lang-css.js │ ├── lang-n.js │ └── lang-clj.js ├── meteor │ ├── url_server.js │ ├── client_environment_test.js │ ├── server_environment_test.js │ ├── client_environment.js │ ├── server_environment.js │ ├── errors.js │ ├── dynamics_browser.js │ └── url_common.js ├── startup │ ├── startup_server.js │ ├── package.js │ └── startup_client.js ├── bootstrap │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ └── package.js ├── past │ ├── client_past_test.js │ ├── server_past_test.js │ ├── package.js │ └── past.js ├── tinytest │ ├── model.js │ └── package.js ├── jquery │ └── package.js ├── d3 │ └── package.js ├── showdown │ ├── template-integration.js │ └── package.js ├── amplify │ └── package.js ├── htmljs │ ├── htmljs_test.js │ └── package.js ├── jquery-waypoints │ └── package.js ├── underscore │ └── package.js ├── preserve-inputs │ ├── package.js │ └── preserve-inputs.js ├── random │ └── package.js ├── ordered-dict │ └── package.js ├── reload │ └── package.js ├── accounts-urls │ ├── package.js │ └── url_server.js ├── accounts-ui │ └── package.js ├── logging │ ├── logging_test.js │ └── package.js ├── routepolicy │ └── package.js ├── backbone │ └── package.js ├── jquery-layout │ └── package.js ├── madewith │ ├── package.js │ ├── madewith.html │ ├── madewith.css │ └── madewith.js ├── appcache │ └── package.js ├── jquery-history │ └── package.js ├── accounts-twitter │ ├── twitter_common.js │ ├── twitter_configure.js │ ├── twitter_configure.html │ ├── package.js │ ├── twitter_login_button.css │ ├── twitter_server.js │ └── twitter_client.js ├── reactive-dict │ └── package.js ├── test-in-console │ ├── package.js │ ├── run.sh │ ├── reporter.js │ └── runner.js ├── absolute-url │ └── package.js ├── session │ ├── session.js │ └── package.js ├── json │ └── package.js ├── test-helpers │ ├── current_style.js │ ├── seeded_random.js │ ├── package.js │ ├── stub_stream.js │ ├── event_simulation.js │ ├── wrappedfrag.js │ └── reactivevar.js ├── localstorage │ ├── localstorage_tests.js │ └── package.js ├── meyerweb-reset │ ├── package.js │ └── reset.css ├── check │ └── package.js ├── deps │ └── package.js ├── srp │ └── package.js ├── liverange │ └── package.js ├── ejson │ └── package.js ├── test-in-browser │ └── package.js ├── http │ └── package.js ├── universal-events │ └── package.js ├── jsparse │ └── package.js ├── spark │ ├── test_form_responder.js │ ├── package.js │ ├── convenience.js │ └── utils.js ├── domutils │ ├── package.js │ └── domutils_tests.js ├── minimongo │ └── package.js ├── accounts-ui-unstyled │ ├── package.js │ ├── accounts_ui_tests.js │ └── login_buttons_single.html ├── handlebars │ └── package.js └── accounts-base │ └── package.js ├── scripts ├── admin │ ├── upgrade-to-engine │ │ ├── debian │ │ │ ├── docs │ │ │ ├── compat │ │ │ ├── source │ │ │ │ └── format │ │ │ ├── meteor.install │ │ │ ├── changelog │ │ │ ├── rules │ │ │ ├── control │ │ │ └── copyright │ │ └── meteor.spec │ ├── publish-release │ │ └── .meteor │ │ │ ├── .gitignore │ │ │ └── packages │ ├── banner.txt │ ├── deploy-examples.sh │ ├── find-new-npm-versions.sh │ ├── spark-standalone.sh │ ├── build-tools-tarballs.sh │ ├── publish-release.sh │ ├── notices.json │ └── build-release.sh ├── bundler-test.sh ├── tools-springboard-test.sh ├── node.sh └── run-tools-tests.sh ├── tools ├── skel │ ├── .meteor │ │ ├── .gitignore │ │ └── packages │ ├── ~name~.css │ ├── ~name~.html │ └── ~name~.js ├── test-runner-app │ └── .meteor │ │ ├── .gitignore │ │ └── packages ├── tests │ ├── empty-app │ │ └── .meteor │ │ │ ├── .gitignore │ │ │ └── packages │ ├── app-with-package │ │ └── .meteor │ │ │ ├── .gitignore │ │ │ └── packages │ └── test_bundler.js ├── logging.js ├── app.html.in ├── cleanup.js └── fiber-helpers.js ├── .arcconfig ├── .gitmodules ├── .gitignore └── README.md /docs/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /docs/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.3.1 2 | -------------------------------------------------------------------------------- /examples/parties/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.3 2 | -------------------------------------------------------------------------------- /examples/todos/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/todos/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.3 2 | -------------------------------------------------------------------------------- /examples/wordplay/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.3 2 | -------------------------------------------------------------------------------- /packages/.gitignore: -------------------------------------------------------------------------------- 1 | .meteor 2 | */.meteor -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/docs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/skel/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/leaderboard/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.3 2 | -------------------------------------------------------------------------------- /examples/parties/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/wordplay/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /packages/email/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/less/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/stylus/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/leaderboard/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/other/benchmark/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/other/login-demo/.meteor/release: -------------------------------------------------------------------------------- 1 | none 2 | -------------------------------------------------------------------------------- /examples/other/quiescence/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /packages/livedata/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /tools/test-runner-app/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /tools/tests/empty-app/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /tools/tests/empty-app/.meteor/packages: -------------------------------------------------------------------------------- 1 | # no packages -------------------------------------------------------------------------------- /docs/public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /examples/other/controllers-demo/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/other/login-demo/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/other/quiescence/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/other/template-demo/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/other/template-demo/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/controls/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/controls/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/jsparse-docs/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /packages/coffeescript/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/mongo-livedata/.npm/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /scripts/admin/publish-release/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /tools/skel/~name~.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /tools/tests/app-with-package/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /tools/tests/app-with-package/.meteor/packages: -------------------------------------------------------------------------------- 1 | test-package -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/jsparse-docs/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/parse-inspector/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/todos-backbone/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/todos-backbone/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/accounts-ui-viewer/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/accounts-ui-viewer/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.1 2 | -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/.meteor/release: -------------------------------------------------------------------------------- 1 | 0.6.0 2 | -------------------------------------------------------------------------------- /examples/unfinished/parse-inspector/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /packages/accounts-oauth-helper/oauth_common.js: -------------------------------------------------------------------------------- 1 | Accounts.oauth = {}; -------------------------------------------------------------------------------- /packages/insecure/insecure.js: -------------------------------------------------------------------------------- 1 | Meteor.Collection.insecure = true; 2 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /examples/unfinished/python-ddp-client/README: -------------------------------------------------------------------------------- 1 | sudo easy_install ws4py 2 | -------------------------------------------------------------------------------- /packages/accounts-oauth1-helper/oauth1_common.js: -------------------------------------------------------------------------------- 1 | Accounts.oauth1 = {}; -------------------------------------------------------------------------------- /packages/accounts-oauth2-helper/oauth2_common.js: -------------------------------------------------------------------------------- 1 | Accounts.oauth2 = {}; -------------------------------------------------------------------------------- /packages/accounts-password/password_common.js: -------------------------------------------------------------------------------- 1 | Accounts.password = {}; 2 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/meteor.install: -------------------------------------------------------------------------------- 1 | usr/lib/meteor 2 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/benchmark.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /examples/unfinished/controls/controls.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /packages/autopublish/autopublish.js: -------------------------------------------------------------------------------- 1 | Meteor.default_server.autopublish(); 2 | -------------------------------------------------------------------------------- /examples/other/template-demo/model.js: -------------------------------------------------------------------------------- 1 | Circles = new Meteor.Collection("circles"); 2 | -------------------------------------------------------------------------------- /packages/spiderable/spiderable.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /scripts/admin/banner.txt: -------------------------------------------------------------------------------- 1 | => Meteor 0.6.3.1: Small fix to 'client/compatibility' from 0.6.3 2 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/docs/public/favicon.ico -------------------------------------------------------------------------------- /packages/accounts-github/github_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.github) { 2 | Accounts.github = {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/accounts-google/google_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.google) { 2 | Accounts.google = {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/accounts-meetup/meetup_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.meetup) { 2 | Accounts.meetup = {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/accounts-weibo/weibo_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.weibo) { 2 | Accounts.weibo = {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/force-ssl/force_ssl_common.js: -------------------------------------------------------------------------------- 1 | _.extend(Meteor.absoluteUrl.defaultOptions, {secure: true}); 2 | -------------------------------------------------------------------------------- /tools/logging.js: -------------------------------------------------------------------------------- 1 | exports.die = function (msg) { 2 | console.error(msg); 3 | process.exit(1); 4 | }; 5 | -------------------------------------------------------------------------------- /packages/accounts-facebook/facebook_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.facebook) { 2 | Accounts.facebook = {}; 3 | } 4 | -------------------------------------------------------------------------------- /packages/audit-argument-checks/audit_argument_checks.js: -------------------------------------------------------------------------------- 1 | Meteor._LivedataServer._auditArgumentChecks = true; 2 | -------------------------------------------------------------------------------- /examples/parties/public/soma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/parties/public/soma.png -------------------------------------------------------------------------------- /packages/coffeescript/coffeescript_strict_tests.coffee: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | @__COFFEESCRIPT_TEST_GLOBAL2 = 456 4 | -------------------------------------------------------------------------------- /examples/todos/public/close_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/todos/public/close_16.png -------------------------------------------------------------------------------- /examples/todos/public/destroy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/todos/public/destroy.png -------------------------------------------------------------------------------- /packages/code-prettify/lang-go.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-go.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-lua.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-lua.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-ml.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-ml.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-sql.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-sql.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-tex.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-tex.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-vb.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-vb.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-vhdl.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-vhdl.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-wiki.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-wiki.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-apollo.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-apollo.js -------------------------------------------------------------------------------- /packages/code-prettify/lang-scala.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/code-prettify/lang-scala.js -------------------------------------------------------------------------------- /packages/meteor/url_server.js: -------------------------------------------------------------------------------- 1 | if (process.env.ROOT_URL) 2 | __meteor_runtime_config__.ROOT_URL = process.env.ROOT_URL; 3 | -------------------------------------------------------------------------------- /docs/public/forkme_right_red_aa0000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/docs/public/forkme_right_red_aa0000.png -------------------------------------------------------------------------------- /packages/less/less_tests_constants.lessimport: -------------------------------------------------------------------------------- 1 | // This should be @import'able into other .less files 2 | @external-dotty: dotted; 3 | -------------------------------------------------------------------------------- /packages/startup/startup_server.js: -------------------------------------------------------------------------------- 1 | Meteor.startup = function (callback) { 2 | __meteor_bootstrap__.startup_hooks.push(callback); 3 | }; 4 | -------------------------------------------------------------------------------- /.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "project_id" : "Meteor framework", 3 | "conduit_uri" : "https://phabricator.meteor.com/", 4 | "immutable_history" : true 5 | } -------------------------------------------------------------------------------- /packages/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /tools/test-runner-app/.meteor/packages: -------------------------------------------------------------------------------- 1 | # This file intentionally left blank. (A driver package will be added by "meteor 2 | # test-packages".) 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "meteor-awssum"] 2 | path = scripts/admin/publish-release/packages/awssum 3 | url = https://github.com/avital/meteor-awssum -------------------------------------------------------------------------------- /packages/coffeescript/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "coffee-script": { 4 | "version": "1.6.2" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/unfinished/todos-backbone/public/destroy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/unfinished/todos-backbone/public/destroy.png -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/public/destroy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/unfinished/todos-underscore/public/destroy.png -------------------------------------------------------------------------------- /packages/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/packages/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/public/planes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/unfinished/leaderboard-remote/public/planes.png -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/public/close_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/unfinished/todos-underscore/public/close_16.png -------------------------------------------------------------------------------- /examples/wordplay/public/circle-ball-dark-antialiased.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/wordplay/public/circle-ball-dark-antialiased.gif -------------------------------------------------------------------------------- /packages/past/client_past_test.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("past - client", function (test) { 2 | test.isTrue(Meteor.is_client); 3 | test.isFalse(Meteor.is_server); 4 | }); 5 | -------------------------------------------------------------------------------- /packages/past/server_past_test.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("past - server", function (test) { 2 | test.isFalse(Meteor.is_client); 3 | test.isTrue(Meteor.is_server); 4 | }); 5 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/scenarios/nodata.json: -------------------------------------------------------------------------------- 1 | { 2 | "params": { 3 | "numCollections": 1, 4 | "numBuckets": 1, 5 | "initialDocuments": 0 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/tinytest/model.js: -------------------------------------------------------------------------------- 1 | Meteor._ServerTestResultsSubscription = 'tinytest_results_subscription'; 2 | Meteor._ServerTestResultsCollection = 'tinytest_results_collection'; 3 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/model.coffee: -------------------------------------------------------------------------------- 1 | root = exports ? this # export Presses globally. 2 | root.Presses = new Meteor.Collection 'presses' 3 | 4 | Meteor.publish 'presses' 5 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/public/4201645142_ec2e3bb3f8_b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enumerable/meteor/HEAD/examples/unfinished/coffeeless/public/4201645142_ec2e3bb3f8_b.jpg -------------------------------------------------------------------------------- /packages/stylus/stylus_tests.styl: -------------------------------------------------------------------------------- 1 | 2 | #stylus-tests 3 | zoom: 1 4 | 5 | dashy = dashed 6 | 7 | .stylus-dashy-left-border 8 | border-left: 1px dashy black 9 | 10 | -------------------------------------------------------------------------------- /packages/meteor/client_environment_test.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("environment - client basics", function (test) { 2 | test.isTrue(Meteor.isClient); 3 | test.isFalse(Meteor.isServer); 4 | }); 5 | -------------------------------------------------------------------------------- /packages/meteor/server_environment_test.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("environment - server basics", function (test) { 2 | test.isFalse(Meteor.isClient); 3 | test.isTrue(Meteor.isServer); 4 | }); 5 | -------------------------------------------------------------------------------- /packages/coffeescript/coffeescript_tests.coffee: -------------------------------------------------------------------------------- 1 | Meteor.__COFFEESCRIPT_PRESENT = true 2 | 3 | @__COFFEESCRIPT_TEST_GLOBAL = 123 4 | 5 | Tinytest.add "coffeescript - compile", (test) -> test.isTrue true 6 | -------------------------------------------------------------------------------- /packages/jquery/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Manipulate the DOM using CSS selectors" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.add_files('jquery.js', 'client'); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/d3/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Library for manipulating documents based on data." 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.add_files('d3.v3.js', 'client'); 7 | }); 8 | -------------------------------------------------------------------------------- /packages/showdown/template-integration.js: -------------------------------------------------------------------------------- 1 | Handlebars.registerHelper('markdown', function (options) { 2 | var converter = new Showdown.converter(); 3 | return converter.makeHtml(options.fn(this)); 4 | }); 5 | -------------------------------------------------------------------------------- /packages/amplify/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "API for Persistant Storage, PubSub and Request" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.add_files('amplify.js', 'client'); 7 | }); 8 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/changelog: -------------------------------------------------------------------------------- 1 | meteor (0.6.0-1) unstable; urgency=low 2 | 3 | * Automated debian build. 4 | 5 | -- Meteor Deb Packager Tue, 21 Feb 2012 04:21:07 +0000 6 | -------------------------------------------------------------------------------- /packages/htmljs/htmljs_test.js: -------------------------------------------------------------------------------- 1 | 2 | Tinytest.add("htmljs", function (test) { 3 | 4 | // Make sure "style" works, which has to be special-cased for IE. 5 | test.equal(DIV({style:"display:none"}).style.display, "none"); 6 | }); -------------------------------------------------------------------------------- /examples/other/template-demo/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/client/coffeeless.less: -------------------------------------------------------------------------------- 1 | @red: #842210; 2 | 3 | h1 { 4 | color: @red; 5 | } 6 | 7 | img { 8 | display: block; 9 | position: absolute; 10 | top: 0px; 11 | right: 0px; 12 | } 13 | -------------------------------------------------------------------------------- /examples/unfinished/controls/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.meteor 3 | *~ 4 | /dev_bundle 5 | /dev_bundle*.tar.gz 6 | /dist 7 | \#*\# 8 | .\#* 9 | .idea 10 | *.iml 11 | *.sublime-project 12 | *.sublime-workspace 13 | TAGS 14 | *.log 15 | *.out 16 | npm-debug.log 17 | -------------------------------------------------------------------------------- /examples/unfinished/jsparse-docs/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | -------------------------------------------------------------------------------- /examples/unfinished/todos-backbone/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | jquery 7 | backbone -------------------------------------------------------------------------------- /packages/insecure/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Allow all database writes by default" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use(['mongo-livedata']); 7 | api.add_files(['insecure.js'], 'server'); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | less 7 | coffeescript 8 | -------------------------------------------------------------------------------- /tools/skel/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | insecure 8 | preserve-inputs 9 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/scenarios/bigdata-static.json: -------------------------------------------------------------------------------- 1 | { 2 | "params": { 3 | "numCollections": 1, 4 | "numBuckets": 1, 5 | "initialDocuments": 1024, 6 | "documentSize": 2048, 7 | "documentNumFields": 64 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /examples/wordplay/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | insecure 7 | jquery 8 | preserve-inputs 9 | -------------------------------------------------------------------------------- /examples/other/login-demo/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | preserve-inputs 7 | accounts-google 8 | -------------------------------------------------------------------------------- /examples/other/quiescence/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | insecure 7 | preserve-inputs 8 | random 9 | -------------------------------------------------------------------------------- /packages/jquery-waypoints/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Execute a function when the user scrolls past an element" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('jquery'); 7 | api.add_files('waypoints.js', 'client'); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | underscore 7 | jquery 8 | jquery-layout 9 | -------------------------------------------------------------------------------- /packages/less/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "less": { 4 | "version": "1.3.3", 5 | "dependencies": { 6 | "ycssmin": { 7 | "version": "1.0.1" 8 | } 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/autopublish/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Automatically publish the entire database to all clients" 3 | }); 4 | 5 | Package.on_use(function (api, where) { 6 | api.use('livedata', 'server'); 7 | api.add_files("autopublish.js", "server"); 8 | }); -------------------------------------------------------------------------------- /tools/skel/~name~.html: -------------------------------------------------------------------------------- 1 | 2 | ~name~ 3 | 4 | 5 | 6 | {{> hello}} 7 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/client/coffeeless.coffee: -------------------------------------------------------------------------------- 1 | Meteor.subscribe 'presses' 2 | 3 | Template.button_demo.events = 4 | 'click input': -> 5 | console.log "press" 6 | Presses.insert {} 7 | 8 | Template.button_demo.press_count = -> Presses.find({}).length 9 | -------------------------------------------------------------------------------- /examples/unfinished/parse-inspector/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | preserve-inputs 8 | jsparse 9 | -------------------------------------------------------------------------------- /examples/unfinished/todos-backbone/common.js: -------------------------------------------------------------------------------- 1 | Todos = new Meteor.Collection("todos"); 2 | //Todos.schema({text: String, done: Boolean, order: Number}); 3 | 4 | if (Meteor.isServer) { 5 | Meteor.publish('todos', function () { 6 | return Todos.find(); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | jquery 7 | jquery-layout 8 | jquery-history 9 | -------------------------------------------------------------------------------- /packages/less/less_tests.less: -------------------------------------------------------------------------------- 1 | @import "less_tests_constants.lessimport"; 2 | 3 | #less-tests { zoom: 1; /* prop this rule open */ } 4 | 5 | @dashy: dashed; 6 | 7 | .less-dashy-left-border { 8 | border-left: @dashy; 9 | border-right: @external-dotty; 10 | } 11 | -------------------------------------------------------------------------------- /packages/mongo-livedata/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mongodb": { 4 | "version": "1.2.13", 5 | "dependencies": { 6 | "bson": { 7 | "version": "0.1.8" 8 | } 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/underscore/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Collection of small helper functions: _.map, _.each, ..." 3 | }); 4 | 5 | Package.on_use(function (api, where) { 6 | where = where || ['client', 'server']; 7 | api.add_files('underscore.js', where); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/leaderboard/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | insecure 8 | preserve-inputs 9 | random 10 | -------------------------------------------------------------------------------- /packages/audit-argument-checks/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Try to detect inadequate input sanitization" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use(['livedata'], ['server']); 7 | api.add_files(['audit_argument_checks.js'], 'server'); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/preserve-inputs/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Automatically preserve all form fields with a unique id" 3 | }); 4 | 5 | Package.on_use(function (api, where) { 6 | api.use(['underscore', 'spark']); 7 | api.add_files("preserve-inputs.js", "client"); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/random/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Random number generator and utilities", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api, where) { 7 | where = where || ['client', 'server']; 8 | api.add_files('random.js', where); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/startup/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Provides Meteor.startup", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.add_files('startup_client.js', 'client'); 8 | api.add_files('startup_server.js', 'server'); 9 | }); 10 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | insecure 7 | preserve-inputs 8 | bootstrap 9 | random 10 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/scenarios/bigdata-updates.json: -------------------------------------------------------------------------------- 1 | { 2 | "params": { 3 | "numCollections": 1, 4 | "numBuckets": 1, 5 | "initialDocuments": 1024, 6 | "updatesPerSecond": 0.2, 7 | "documentSize": 1024, 8 | "documentNumFields": 32 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /scripts/admin/publish-release/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | insecure 8 | preserve-inputs 9 | awssum 10 | -------------------------------------------------------------------------------- /examples/todos/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | underscore 7 | backbone 8 | spiderable 9 | jquery 10 | preserve-inputs 11 | insecure 12 | -------------------------------------------------------------------------------- /packages/ordered-dict/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Ordered traversable dictionary with a mutable ordering", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('underscore'); 8 | api.add_files('ordered_dict.js', ['client', 'server']); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/reload/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Reload the page while preserving application state.", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['underscore', 'logging', 'json'], 'client'); 8 | api.add_files('reload.js', 'client'); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/accounts-urls/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Generate and consume reset password and verify account URLs", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.add_files('url_client.js', 'client'); 8 | api.add_files('url_server.js', 'server'); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/preserve-inputs/preserve-inputs.js: -------------------------------------------------------------------------------- 1 | var inputTags = 'input textarea button select option'.split(' '); 2 | 3 | var selector = _.map(inputTags, function (t) { 4 | return t.replace(/^.*$/, '$&[id], $&[name]'); 5 | }).join(', '); 6 | 7 | 8 | Spark._globalPreserves[selector] = Spark._labelFromIdOrName; 9 | -------------------------------------------------------------------------------- /docs/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | jquery 7 | underscore 8 | showdown 9 | code-prettify 10 | jquery-waypoints 11 | less 12 | spiderable 13 | appcache 14 | -------------------------------------------------------------------------------- /packages/accounts-ui/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Simple templates to add login widgets to an app." 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('accounts-ui-unstyled', 'client'); 7 | api.use('less', 'client'); 8 | 9 | api.add_files(['login_buttons.less'], 'client'); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/logging/logging_test.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("logging", function (test) { 2 | 3 | // Just run a log statement and make sure it doesn't explode. 4 | Meteor._suppress_log(3); 5 | Meteor._debug(); 6 | Meteor._debug("test one arg"); 7 | Meteor._debug("this", "is", "a", "test"); 8 | test.ok(); 9 | 10 | }); 11 | -------------------------------------------------------------------------------- /packages/mongo-livedata/collection_tests.js: -------------------------------------------------------------------------------- 1 | Tinytest.add( 2 | 'collection - call Meteor.Collection without new', 3 | function (test) { 4 | test.throws( 5 | function () { 6 | Meteor.Collection(null); 7 | }, 8 | /use "new" to construct a Meteor\.Collection/ 9 | ); 10 | } 11 | ); 12 | -------------------------------------------------------------------------------- /packages/spiderable/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Makes the application crawlable to web spiders." 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use(['templating'], 'client'); 7 | 8 | api.add_files('spiderable.html', 'client'); 9 | api.add_files('spiderable.js', 'server'); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-proto.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]); 2 | -------------------------------------------------------------------------------- /packages/routepolicy/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "route policy declarations", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.add_files('routepolicy.js', 'server'); 8 | }); 9 | 10 | Package.on_test(function (api) { 11 | api.add_files(['routepolicy_tests.js'], 'server'); 12 | }); 13 | -------------------------------------------------------------------------------- /examples/wordplay/TODO: -------------------------------------------------------------------------------- 1 | TODOS 2 | strip spaces on input box 3 | focus input on game start 4 | styling 5 | eliminate extra divs 6 | 7 | POSSIBLE EXTENSIONS 8 | publish remaining words at end of game 9 | UI that works on touch devices sans keyboard 10 | spinny while word is getting scored 11 | support clicking on board instead of text box 12 | 13 | -------------------------------------------------------------------------------- /packages/meteor/client_environment.js: -------------------------------------------------------------------------------- 1 | Meteor = { 2 | isClient: true, 3 | isServer: false 4 | }; 5 | 6 | if (typeof __meteor_runtime_config__ !== 'undefined' && 7 | __meteor_runtime_config__ && 8 | __meteor_runtime_config__.PUBLIC_SETTINGS) { 9 | Meteor.settings = { public: __meteor_runtime_config__.PUBLIC_SETTINGS }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/coffeescript/litcoffeescript_tests.litcoffee: -------------------------------------------------------------------------------- 1 | This file is just the same as `coffeescript_tests.coffee`, first we set a 2 | property, which we check for in `coffeescript_tests.js`, and then a trivial 3 | testcase. 4 | 5 | Meteor.__LITCOFFEESCRIPT_PRESENT = true 6 | Tinytest.add "literate coffeescript - compile", (test) -> test.isTrue true 7 | -------------------------------------------------------------------------------- /scripts/bundler-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # stop on any non-zero return value from test_bundler.js, and print "FAILED" 4 | set -e 5 | trap 'echo FAILED' EXIT 6 | 7 | METEOR_DIR=$(pwd)/.. 8 | 9 | # run tests 10 | ./node.sh $METEOR_DIR/tools/tests/test_bundler.js 11 | 12 | # cleanup trap, and print "SUCCESS" 13 | trap - EXIT 14 | echo PASSED 15 | -------------------------------------------------------------------------------- /packages/accounts-meetup/meetup_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForMeetup.siteUrl = function () { 2 | return Meteor.absoluteUrl(); 3 | }; 4 | 5 | Template.configureLoginServiceDialogForMeetup.fields = function () { 6 | return [ 7 | {property: 'clientId', label: 'Key'}, 8 | {property: 'secret', label: 'Secret'} 9 | ]; 10 | }; -------------------------------------------------------------------------------- /packages/backbone/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "A minimalist client-side MVC framework" 3 | }); 4 | 5 | Package.on_use(function (api, where) { 6 | // XXX Backbone requires either jquery or zepto 7 | api.use(["jquery", "json"]); 8 | 9 | where = where || ['client', 'server']; 10 | api.add_files("backbone.js", where); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/jquery-layout/package.js: -------------------------------------------------------------------------------- 1 | // XXX should probably nudge people toward the CSS Flexible Box Model 2 | // flexie, rather than this 3 | 4 | Package.describe({ 5 | summary: "Easily create arbitrary multicolumn layouts" 6 | }); 7 | 8 | Package.on_use(function (api) { 9 | api.use('jquery'); 10 | api.add_files('jquery.layout.js', 'client'); 11 | }); 12 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/scenarios/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "params": { 3 | "numCollections": 1, 4 | "numBuckets": 3, 5 | "initialDocuments": 1, 6 | "maxAgeSeconds": 60, 7 | "insertsPerSecond": 1, 8 | "updatesPerSecond": 1, 9 | "removesPerSecond": 0.1, 10 | "documentSize": 1024, 11 | "documentNumFields": 8 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/accounts-facebook/facebook_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForFacebook.siteUrl = function () { 2 | return Meteor.absoluteUrl(); 3 | }; 4 | 5 | Template.configureLoginServiceDialogForFacebook.fields = function () { 6 | return [ 7 | {property: 'appId', label: 'App ID'}, 8 | {property: 'secret', label: 'App Secret'} 9 | ]; 10 | }; -------------------------------------------------------------------------------- /examples/parties/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | preserve-inputs 7 | accounts-ui 8 | accounts-password 9 | d3 10 | bootstrap 11 | email 12 | accounts-facebook 13 | accounts-twitter 14 | audit-argument-checks 15 | -------------------------------------------------------------------------------- /examples/parties/server/server.js: -------------------------------------------------------------------------------- 1 | // All Tomorrow's Parties -- server 2 | 3 | Meteor.publish("directory", function () { 4 | return Meteor.users.find({}, {fields: {emails: 1, profile: 1}}); 5 | }); 6 | 7 | Meteor.publish("parties", function () { 8 | return Parties.find( 9 | {$or: [{"public": true}, {invited: this.userId}, {owner: this.userId}]}); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/accounts-github/github_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForGithub.siteUrl = function () { 2 | return Meteor.absoluteUrl(); 3 | }; 4 | 5 | Template.configureLoginServiceDialogForGithub.fields = function () { 6 | return [ 7 | {property: 'clientId', label: 'Client ID'}, 8 | {property: 'secret', label: 'Client Secret'} 9 | ]; 10 | }; -------------------------------------------------------------------------------- /packages/madewith/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Made With Meteor badge" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use(['livedata', 'underscore', 'spark', 'templating'], 'client'); 7 | 8 | api.add_files([ 9 | 'madewith.css', 10 | 'madewith_badge.css', 11 | 'madewith.html', 12 | 'madewith.js'], 'client'); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/accounts-google/google_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForGoogle.siteUrl = function () { 2 | return Meteor.absoluteUrl(); 3 | }; 4 | 5 | Template.configureLoginServiceDialogForGoogle.fields = function () { 6 | return [ 7 | {property: 'clientId', label: 'Client ID'}, 8 | {property: 'secret', label: 'Client secret'} 9 | ]; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/appcache/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "enable the application cache in the browser" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('reload', 'client'); 7 | api.use('routepolicy', 'server'); 8 | api.use('startup', 'client'); 9 | api.add_files('appcache-client.js', 'client'); 10 | api.add_files('appcache-server.js', 'server'); 11 | }); 12 | -------------------------------------------------------------------------------- /scripts/admin/deploy-examples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd `dirname $0` 6 | cd ../examples 7 | 8 | 9 | read -p "Prefix? " PREFIX; 10 | 11 | for EXAMPLE in * ; do 12 | if [ -d "$EXAMPLE/.meteor" ] ; then 13 | cd $EXAMPLE; 14 | echo "meteor deploy $@ $PREFIX-$EXAMPLE;" 15 | meteor deploy $@ $PREFIX-$EXAMPLE; 16 | cd ..; 17 | fi 18 | done 19 | -------------------------------------------------------------------------------- /packages/jquery-history/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "pushState module from the jQuery project" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('json', 'client'); 7 | api.use('jquery', 'client'); 8 | api.add_files(['history.adapter.jquery.js', 9 | 'history.html4.js', 10 | 'history.js'], 11 | 'client'); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/logging/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Logging facility.", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api, where) { 7 | where = where || ['client', 'server']; 8 | api.add_files('logging.js', where); 9 | }); 10 | 11 | Package.on_test(function (api) { 12 | api.use('logging', 'client'); 13 | api.add_files('logging_test.js', 'client'); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/madewith/madewith.html: -------------------------------------------------------------------------------- 1 | 2 | {{> madewith}} 3 | 4 | 5 | 13 | -------------------------------------------------------------------------------- /packages/accounts-twitter/twitter_common.js: -------------------------------------------------------------------------------- 1 | if (!Accounts.twitter) { 2 | Accounts.twitter = {}; 3 | } 4 | 5 | Accounts.twitter._urls = { 6 | requestToken: "https://api.twitter.com/oauth/request_token", 7 | authorize: "https://api.twitter.com/oauth/authorize", 8 | accessToken: "https://api.twitter.com/oauth/access_token", 9 | authenticate: "https://api.twitter.com/oauth/authenticate" 10 | }; 11 | -------------------------------------------------------------------------------- /packages/reactive-dict/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Reactive dictionary", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api, where) { 7 | where = where || ['client', 'server']; 8 | 9 | api.use(['underscore', 'deps'], where); 10 | api.add_files('reactive-dict.js', where); 11 | }); 12 | 13 | Package.on_test(function (api) { 14 | api.use('tinytest'); 15 | }); 16 | -------------------------------------------------------------------------------- /examples/unfinished/accounts-ui-viewer/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # 3 | # 'meteor add' and 'meteor remove' will edit this file for you, 4 | # but you can also edit it by hand. 5 | 6 | autopublish 7 | insecure 8 | preserve-inputs 9 | accounts-ui 10 | less 11 | accounts-google 12 | accounts-github 13 | accounts-password 14 | underscore 15 | accounts-facebook 16 | -------------------------------------------------------------------------------- /packages/livedata/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "sockjs": { 4 | "version": "0.3.4", 5 | "dependencies": { 6 | "node-uuid": { 7 | "version": "1.3.3" 8 | }, 9 | "faye-websocket": { 10 | "version": "0.4.0" 11 | } 12 | } 13 | }, 14 | "websocket": { 15 | "version": "1.0.7" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/test-in-console/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Run tests noninteractively, with results going to the console.", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | 8 | api.use('tinytest'); 9 | api.use('http'); 10 | 11 | api.add_files([ 12 | 'driver.js' 13 | ], "client"); 14 | api.add_files([ 15 | 'reporter.js' 16 | ], "server"); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/stylus/stylus_tests.js: -------------------------------------------------------------------------------- 1 | 2 | Tinytest.add("stylus - presence", function(test) { 3 | 4 | var d = OnscreenDiv(Meteor.render(function() { 5 | return '

'; })); 6 | d.node().style.display = 'block'; 7 | 8 | var p = d.node().firstChild; 9 | var leftBorder = getStyleProperty(p, 'border-left-style'); 10 | test.equal(leftBorder, "dashed"); 11 | 12 | d.kill(); 13 | 14 | }); 15 | -------------------------------------------------------------------------------- /docs/client/packages/backbone.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /packages/accounts-weibo/weibo_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForWeibo.siteUrl = function () { 2 | // Weibo doesn't recognize localhost as a domain 3 | return Meteor.absoluteUrl({replaceLocalhost: true}); 4 | }; 5 | 6 | Template.configureLoginServiceDialogForWeibo.fields = function () { 7 | return [ 8 | {property: 'clientId', label: 'App Key'}, 9 | {property: 'secret', label: 'App Secret'} 10 | ]; 11 | }; -------------------------------------------------------------------------------- /tools/app.html.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{#each stylesheets}} 5 | {{/each}} 6 | 7 | 10 | 11 | {{#each scripts}} 12 | {{/each}} 13 | 14 | {{{head_extra}}} 15 | 16 | 17 | {{{body_extra}}} 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/absolute-url/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "DEPRECATED: Generate absolute URLs pointing to the application", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | console.log('DEPRECATED. The `absolute-url` package has been folded into ' 8 | + 'the `meteor` package and should not be used directly. Run ' 9 | + '`meteor remove absolute-url` to resolve this.'); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-yaml.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]); 3 | -------------------------------------------------------------------------------- /packages/htmljs/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Easy macros for generating DOM elements in Javascript" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | // Note: html.js will optionally use jquery if it's available 7 | api.add_files('html.js', 'client'); 8 | }); 9 | 10 | Package.on_test(function (api) { 11 | api.use('htmljs', 'client'); 12 | api.use('tinytest'); 13 | api.add_files('htmljs_test.js', 'client'); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/session/session.js: -------------------------------------------------------------------------------- 1 | var migratedKeys = {}; 2 | if (Meteor._reload) { 3 | var migrationData = Meteor._reload.migrationData('session'); 4 | if (migrationData && migrationData.keys) { 5 | migratedKeys = migrationData.keys; 6 | } 7 | } 8 | Session = new ReactiveDict(migratedKeys); 9 | 10 | if (Meteor._reload) { 11 | Meteor._reload.onMigrate('session', function () { 12 | return [true, {keys: Session.keys}]; 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /packages/json/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Provides JSON.stringify and JSON.parse for older browsers", 3 | internal: true 4 | }); 5 | 6 | // We need to figure out how to serve this file only to browsers that 7 | // don't have JSON.stringify (eg, IE7 and earlier -- or is that IE8?) 8 | 9 | Package.on_use(function (api, where) { 10 | where = where || ['client', 'server']; 11 | 12 | api.add_files('json2.js', where); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/test-helpers/current_style.js: -------------------------------------------------------------------------------- 1 | 2 | // Cross-browser implementation of getting the computed style of an element. 3 | 4 | getStyleProperty = function(n, prop) { 5 | if (n.currentStyle) { 6 | // camelCase it for IE 7 | return n.currentStyle[prop.replace( 8 | /-([a-z])/g, 9 | function(x,y) { return y.toUpperCase(); })]; 10 | } else { 11 | return window.getComputedStyle(n, null).getPropertyValue(prop); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/benchmark.html: -------------------------------------------------------------------------------- 1 | 2 | benchmark 3 | 4 | 5 | 6 | {{> status}} 7 | 8 | {{> params}} 9 | 10 | 11 | 15 | 16 | 23 | 24 | -------------------------------------------------------------------------------- /packages/accounts-oauth-helper/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Common code for OAuth-based login services", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('accounts-base', ['client', 'server']); 8 | api.use('routepolicy', 'server'); 9 | 10 | api.add_files('oauth_common.js', ['client', 'server']); 11 | api.add_files('oauth_client.js', 'client'); 12 | api.add_files('oauth_server.js', 'server'); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/accounts-twitter/twitter_configure.js: -------------------------------------------------------------------------------- 1 | Template.configureLoginServiceDialogForTwitter.siteUrl = function () { 2 | // Twitter doesn't recognize localhost as a domain name 3 | return Meteor.absoluteUrl({replaceLocalhost: true}); 4 | }; 5 | 6 | Template.configureLoginServiceDialogForTwitter.fields = function () { 7 | return [ 8 | {property: 'consumerKey', label: 'Consumer key'}, 9 | {property: 'secret', label: 'Consumer secret'} 10 | ]; 11 | }; -------------------------------------------------------------------------------- /packages/past/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Backwards compatibility.", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('deps'); 8 | api.add_files('past.js', ['client', 'server']); 9 | }); 10 | 11 | Package.on_test(function (api) { 12 | api.use('past'); 13 | api.use('tinytest'); 14 | 15 | api.add_files('client_past_test.js', 'client'); 16 | api.add_files('server_past_test.js', 'server'); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/stylus/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "nib": { 4 | "version": "0.8.2" 5 | }, 6 | "stylus": { 7 | "version": "0.30.1", 8 | "dependencies": { 9 | "cssom": { 10 | "version": "0.2.5" 11 | }, 12 | "mkdirp": { 13 | "version": "0.3.5" 14 | }, 15 | "debug": { 16 | "version": "0.7.2" 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/accounts-facebook/facebook_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-facebook { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAq0lEQVQ4jWP8//8/AyWAhYGBgcEmauYZBgYGYxL1nj2yLN2ECcohVTNcDwsxKlXlhRm6yzwZRAS5GRgYGBhsombC5ZhwaUIGyJrRAVEuwGYzSS7AB/C64MiydKx8ZJfgNeDN+68MDAwIL8D4RLsgIHsJis0wPjKgOAyoE4hcnGwMGkpiBBUbacvA2TfuvaKiC759/3X23NUnOPMDtgTEwMBwloGBgYGR0uwMAGOPLJS9mkQHAAAAAElFTkSuQmCC); 3 | } 4 | -------------------------------------------------------------------------------- /packages/localstorage/localstorage_tests.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("localStorage", function (test) { 2 | // Doesn't actually test preservation across reloads since that is hard. 3 | // userData should do that for us so it's unlikely this wouldn't work. 4 | Meteor._localStorage.setItem("key", "value"); 5 | test.equal(Meteor._localStorage.getItem("key"), "value"); 6 | Meteor._localStorage.removeItem("key"); 7 | test.equal(Meteor._localStorage.getItem("key"), null); 8 | }); 9 | -------------------------------------------------------------------------------- /examples/unfinished/python-ddp-client/test_input: -------------------------------------------------------------------------------- 1 | sub 2 | sub undefinedSub 3 | sub undefinedSub someArg 4 | sub undefinedSub {} 5 | sub allApps 6 | sub myApp "foo.bar" 7 | sub myApp ["foo.meteor.com"] 8 | 9 | call 10 | call undefinedMethod 11 | call undefinedMethod yzyz 12 | call undefinedMethod {} 13 | call vote 14 | call vote [] 15 | call vote ["foo.meteor.com"] 16 | call vote ["madewith.meteor.com"] 17 | call vote {} 18 | 19 | help 20 | help sub 21 | help call 22 | 23 | -------------------------------------------------------------------------------- /packages/meyerweb-reset/package.js: -------------------------------------------------------------------------------- 1 | // This package is a hack to get reset.css loaded before other css 2 | // files. I've marked it internal because I'm not sure if we want to 3 | // encourage this pattern. Maybe another solution would be better. 4 | Package.describe({ 5 | summary: "reset.css v2.0 from http://meyerweb.com/eric/tools/css/reset/", 6 | internal: true 7 | }); 8 | 9 | Package.on_use(function (api) { 10 | api.add_files("reset.css", "client"); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/email/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/less/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/less/less_tests.js: -------------------------------------------------------------------------------- 1 | 2 | Tinytest.add("less - presence", function(test) { 3 | 4 | var d = OnscreenDiv(Meteor.render(function() { 5 | return '

'; })); 6 | d.node().style.display = 'block'; 7 | 8 | var p = d.node().firstChild; 9 | test.equal(getStyleProperty(p, 'border-left-style'), "dashed"); 10 | 11 | // test @import 12 | test.equal(getStyleProperty(p, 'border-right-style'), "dotted"); 13 | 14 | d.kill(); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/stylus/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/client/azrael.css: -------------------------------------------------------------------------------- 1 | #room-list .room.selected { 2 | color: white; 3 | background-color: black; 4 | } 5 | 6 | .room .name { 7 | display: inline; 8 | } 9 | 10 | .room .delete { 11 | float: right; 12 | display: none; 13 | } 14 | 15 | .room:hover .delete { 16 | display: block; 17 | } 18 | 19 | .add-room { 20 | margin-top: 20px; 21 | font-style: italic; 22 | } 23 | 24 | .add-room:hover { 25 | text-decoration: underline; 26 | } -------------------------------------------------------------------------------- /packages/livedata/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/coffeescript/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /packages/mongo-livedata/.npm/README: -------------------------------------------------------------------------------- 1 | This directory and the files immediately inside it are automatically generated 2 | when you change this package's NPM dependencies. Commit the files in this 3 | directory (npm-shrinkwrap.json, .gitignore, and this README) to source control 4 | so that others run the same versions of sub-dependencies. 5 | 6 | You should NOT check in the node_modules directory that Meteor automatically 7 | creates; if you are using git, the .gitignore file tells git to ignore it. 8 | -------------------------------------------------------------------------------- /examples/other/login-demo/login-demo.css: -------------------------------------------------------------------------------- 1 | 2 | * { padding: 0; margin: 0; } 3 | 4 | #main { 5 | margin: 50px; 6 | text-align: center; 7 | font-size: 24px; 8 | } 9 | 10 | .msgDiv { 11 | margin: 30px; 12 | } 13 | 14 | a { 15 | padding: 5px; 16 | background: #ddd; 17 | } 18 | 19 | #readme { 20 | margin: 20px; 21 | border: 1px solid #ccc; 22 | width: 500px; 23 | } 24 | 25 | p { 26 | margin: 16px; 27 | } 28 | 29 | ul { 30 | margin: 16px; 31 | padding-left: 30px; 32 | } 33 | -------------------------------------------------------------------------------- /docs/client/packages/amplify.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /packages/accounts-twitter/twitter_configure.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/check/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Check whether a value matches a pattern", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['underscore', 'ejson'], ['client', 'server']); 8 | 9 | api.add_files('match.js', ['client', 'server']); 10 | }); 11 | 12 | Package.on_test(function (api) { 13 | api.use(['check', 'tinytest', 'underscore', 'ejson'], ['client', 'server']); 14 | 15 | api.add_files('match_test.js', ['client', 'server']); 16 | }); 17 | -------------------------------------------------------------------------------- /examples/.gitignore: -------------------------------------------------------------------------------- 1 | # Each individual example should include 'local' in foo/.meteor/.gitignore. 2 | # However, we also include this top-level .gitignore so that the following 3 | # situation: 4 | # $ git checkout some-branch-with-a-new-example 5 | # $ (cd examples/unfinished/new-example; meteor) 6 | # $ git checkout devel 7 | # doesn't leave you with tons of files in 8 | # examples/unfinished/new-example/.meteor/local showing up in your 'git status'. 9 | 10 | */.meteor/local 11 | */*/.meteor/local 12 | -------------------------------------------------------------------------------- /packages/deps/package.js: -------------------------------------------------------------------------------- 1 | // XXX rename package? 2 | 3 | Package.describe({ 4 | summary: "Dependency mananger to allow reactive callbacks", 5 | internal: true 6 | }); 7 | 8 | Package.on_use(function (api, where) { 9 | where = where || ['client', 'server']; 10 | 11 | api.use('underscore', where); 12 | api.add_files(['deps.js'], where); 13 | }); 14 | 15 | Package.on_test(function (api) { 16 | api.use('tinytest'); 17 | api.use('deps'); 18 | api.add_files('deps_tests.js', 'client'); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/srp/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Library for Secure Remote Password (SRP) exchanges", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['random', 'check'], ['client', 'server']); 8 | api.add_files(['biginteger.js', 'sha256.js', 'srp.js'], 9 | ['client', 'server']); 10 | }); 11 | 12 | Package.on_test(function (api) { 13 | api.use('srp', ['client', 'server']); 14 | api.add_files(['srp_tests.js'], ['client', 'server']); 15 | }); 16 | -------------------------------------------------------------------------------- /docs/client/packages/bootstrap.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/liverange/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Mark, track, and update an arbitrary region in the DOM", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.add_files('liverange.js', 'client'); 8 | }); 9 | 10 | Package.on_test(function (api) { 11 | api.use(['tinytest']); 12 | api.use(['liverange', 'test-helpers', 'domutils'], 'client'); 13 | 14 | api.add_files([ 15 | 'liverange_test_helpers.js', 16 | 'liverange_tests.js' 17 | ], 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/localstorage/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Simulates local storage on IE 6,7 using userData", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('jquery', 'client'); // XXX only used for browser detection. remove. 8 | 9 | api.add_files('localstorage.js', 'client'); 10 | }); 11 | 12 | Package.on_test(function (api) { 13 | api.use('localstorage', 'client'); 14 | api.use('tinytest'); 15 | 16 | api.add_files('localstorage_tests.js', 'client'); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/meteor/server_environment.js: -------------------------------------------------------------------------------- 1 | Meteor = { 2 | isClient: false, 3 | isServer: true 4 | }; 5 | 6 | Meteor.settings = {}; 7 | if (process.env.METEOR_SETTINGS) { 8 | try { 9 | Meteor.settings = JSON.parse(process.env.METEOR_SETTINGS); 10 | } catch (e) { 11 | throw new Error("Settings are not valid JSON"); 12 | } 13 | } 14 | // Push a subset of settings to the client. 15 | if (Meteor.settings && Meteor.settings.public) { 16 | __meteor_runtime_config__.PUBLIC_SETTINGS = Meteor.settings.public; 17 | } 18 | -------------------------------------------------------------------------------- /tools/skel/~name~.js: -------------------------------------------------------------------------------- 1 | if (Meteor.isClient) { 2 | Template.hello.greeting = function () { 3 | return "Welcome to ~name~."; 4 | }; 5 | 6 | Template.hello.events({ 7 | 'click input' : function () { 8 | // template data, if any, is available in 'this' 9 | if (typeof console !== 'undefined') 10 | console.log("You pressed the button"); 11 | } 12 | }); 13 | } 14 | 15 | if (Meteor.isServer) { 16 | Meteor.startup(function () { 17 | // code to run on server at startup 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /packages/accounts-urls/url_server.js: -------------------------------------------------------------------------------- 1 | if (typeof Accounts === 'undefined') 2 | Accounts = {}; 3 | 4 | if (!Accounts.urls) 5 | Accounts.urls = {}; 6 | 7 | Accounts.urls.resetPassword = function (token) { 8 | return Meteor.absoluteUrl('#/reset-password/' + token); 9 | }; 10 | 11 | Accounts.urls.verifyEmail = function (token) { 12 | return Meteor.absoluteUrl('#/verify-email/' + token); 13 | }; 14 | 15 | Accounts.urls.enrollAccount = function (token) { 16 | return Meteor.absoluteUrl('#/enroll-account/' + token); 17 | }; 18 | -------------------------------------------------------------------------------- /scripts/tools-springboard-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e -x 4 | 5 | if [ -z "$METEOR_TOOLS_TREE_DIR" ]; then 6 | echo "\$METEOR_TOOLS_TREE_DIR must be set" 7 | exit 1 8 | fi 9 | 10 | METEOR="$METEOR_TOOLS_TREE_DIR/bin/meteor" 11 | 12 | # This release was built from the 13 | # 'release/release-used-to-test-springboarding' tag in GitHub. All it 14 | # does is print this string and exit. 15 | $METEOR --release release-used-to-test-springboarding | grep "THIS IS A FAKE RELEASE ONLY USED TO TEST ENGINE SPRINGBOARDING" 16 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/common.js: -------------------------------------------------------------------------------- 1 | Lists = new Meteor.Collection("lists"); 2 | 3 | Todos = new Meteor.Collection("todos"); 4 | 5 | /* Schema support coming soon! 6 | 7 | Lists.schema({text: String}); 8 | 9 | Todos.schema({text: String, 10 | done: Boolean, 11 | tags: [String]}); 12 | */ 13 | 14 | if (Meteor.isServer) { 15 | Meteor.publish('lists', function () { 16 | return Lists.find(); 17 | }); 18 | 19 | Meteor.publish('todos', function () { 20 | return Todos.find(); 21 | }); 22 | } -------------------------------------------------------------------------------- /packages/ejson/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Extended and Extensable JSON library", 3 | internal: false 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('json'); 8 | api.add_files('ejson.js', ['client', 'server']); 9 | api.add_files('base64.js', ['client', 'server']); 10 | }); 11 | 12 | Package.on_test(function (api) { 13 | api.use('ejson', ['client', 'server']); 14 | 15 | api.add_files('base64_test.js', ['client', 'server']); 16 | api.add_files('ejson_test.js', ['client', 'server']); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/test-in-console/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd `dirname $0` 4 | cd ../.. 5 | export METEOR_HOME=`pwd` 6 | 7 | export PATH=$METEOR_HOME:$PATH 8 | # synchronously get the dev bundle and NPM modules if they're not there. 9 | ./meteor --get-ready || exit 1 10 | 11 | export URL='http://localhost:4096/' 12 | 13 | meteor test-packages --driver-package test-in-console -p 4096 & 14 | METEOR_PID=$! 15 | 16 | sleep 2 17 | 18 | phantomjs $METEOR_HOME/packages/test-in-console/runner.js 19 | STATUS=$? 20 | 21 | kill $METEOR_PID 22 | exit $STATUS 23 | -------------------------------------------------------------------------------- /packages/coffeescript/coffeescript_tests.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("coffeescript - presence", function(test) { 2 | test.isTrue(Meteor.__COFFEESCRIPT_PRESENT); 3 | }); 4 | Tinytest.add("literate coffeescript - presence", function(test) { 5 | test.isTrue(Meteor.__LITCOFFEESCRIPT_PRESENT); 6 | }); 7 | Tinytest.add("coffeescript - set global variable", function(test) { 8 | test.equal(__COFFEESCRIPT_TEST_GLOBAL, 123); 9 | }); 10 | Tinytest.add("coffeescript - set global variable with 'use strict'", function(test) { 11 | test.equal(__COFFEESCRIPT_TEST_GLOBAL2, 456); 12 | }); 13 | -------------------------------------------------------------------------------- /docs/client/packages/showdown.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /packages/email/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Send email messages" 3 | }); 4 | 5 | // Pinned at older version. 0.1.16+ uses mimelib, not mimelib-noiconv 6 | // which is much bigger. We need a better solution. 7 | Npm.depends({mailcomposer: "0.1.15", simplesmtp: "0.1.25", "stream-buffers": "0.2.3"}); 8 | 9 | Package.on_use(function (api) { 10 | api.add_files('email.js', 'server'); 11 | }); 12 | 13 | Package.on_test(function (api) { 14 | api.use('email', 'server'); 15 | api.use('tinytest'); 16 | api.add_files('email_tests.js', 'server'); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/accounts-oauth2-helper/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Common code for OAuth2-based login services", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('accounts-oauth-helper', 'client'); 8 | api.use('accounts-base', ['client', 'server']); 9 | 10 | api.add_files('oauth2_common.js', ['client', 'server']); 11 | api.add_files('oauth2_server.js', 'server'); 12 | }); 13 | 14 | Package.on_test(function (api) { 15 | api.use('accounts-oauth2-helper', 'server'); 16 | api.add_files("oauth2_tests.js", 'server'); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-hs.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/, 2 | null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]); 3 | -------------------------------------------------------------------------------- /packages/email/.npm/npm-shrinkwrap.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "mailcomposer": { 4 | "version": "0.1.15", 5 | "dependencies": { 6 | "mimelib-noiconv": { 7 | "version": "0.1.9" 8 | } 9 | } 10 | }, 11 | "simplesmtp": { 12 | "version": "0.1.25", 13 | "dependencies": { 14 | "rai": { 15 | "version": "0.1.7" 16 | }, 17 | "xoauth2": { 18 | "version": "0.1.8" 19 | } 20 | } 21 | }, 22 | "stream-buffers": { 23 | "version": "0.2.3" 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/test-in-browser/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Run tests interactively in the browser", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | 8 | // XXX this should go away, and there should be a clean interface 9 | // that tinytest and the driver both implement? 10 | api.use('tinytest'); 11 | api.use('bootstrap'); 12 | 13 | api.use('session'); 14 | 15 | api.use(['spark', 'livedata', 'templating'], 'client'); 16 | 17 | api.add_files([ 18 | 'driver.css', 19 | 'driver.html', 20 | 'driver.js' 21 | ], "client"); 22 | }); 23 | -------------------------------------------------------------------------------- /scripts/admin/find-new-npm-versions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | BASEDIR=`dirname $0` 3 | cat $BASEDIR/generate-dev-bundle.sh | grep "npm install" | sed "s/npm install //" | sed "s/@.*//" | while read PACKAGE 4 | do 5 | CURRENT_VERSION=`cat $BASEDIR/generate-dev-bundle.sh | grep "npm install $PACKAGE" | sed "s/npm install //" | sed "s/.*@//"` 6 | LATEST_VERSION=`$BASEDIR/../dev_bundle/bin/npm info $PACKAGE version 2> /dev/null` 7 | if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ] 8 | then 9 | echo "$PACKAGE -- current version: $CURRENT_VERSION, latest version: $LATEST_VERSION" 10 | fi 11 | done 12 | -------------------------------------------------------------------------------- /packages/mongo-livedata/local_collection_driver.js: -------------------------------------------------------------------------------- 1 | // XXX namespacing 2 | Meteor._LocalCollectionDriver = function () { 3 | var self = this; 4 | self.collections = {}; 5 | }; 6 | 7 | _.extend(Meteor._LocalCollectionDriver.prototype, { 8 | open: function (name) { 9 | var self = this; 10 | if (!name) 11 | return new LocalCollection; 12 | if (!(name in self.collections)) 13 | self.collections[name] = new LocalCollection; 14 | return self.collections[name]; 15 | } 16 | }); 17 | 18 | // singleton 19 | Meteor._LocalCollectionDriver = new Meteor._LocalCollectionDriver; 20 | -------------------------------------------------------------------------------- /packages/accounts-github/github_configure.html: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Meteor 非官方中文文档项目 2 | 3 | Meteor 是个极其简单的、用来搭建现代 Web 应用的环境。 4 | 5 | 在 Meteor 的帮助下,你的应用将: 6 | 7 | * 用纯 Javascript 写成 8 | * 在网络上只传输必要数据,而非 HTML 9 | * 随意搭配你喜爱的其他开源库 10 | 11 | 官方文档可于此处访问:[https://docs.meteor.com/](https://docs.meteor.com/) 12 | 13 | 非官方中文文档可于此处访问:[https://d0cs.meteor.com/](https://d0cs.meteor.com/) 14 | 15 | ## 贡献者 16 | 17 | [@jat001](https://github.com/jat001) and others: [https://github.com/enumerable/meteor/issues/2](https://github.com/enumerable/meteor/issues/2) 18 | 19 | ## 更多内容 20 | 21 | 本项目只负责文档的翻译,更多内容请前往 Meteor 的官方仓库查看:[https://github.com/meteor/meteor](https://github.com/meteor/meteor)。 22 | -------------------------------------------------------------------------------- /packages/accounts-oauth1-helper/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Common code for OAuth1-based login services", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use('accounts-oauth-helper', 'client'); 8 | api.use('accounts-base', ['client', 'server']); 9 | 10 | api.add_files('oauth1_binding.js', 'server'); 11 | api.add_files('oauth1_common.js', ['client', 'server']); 12 | api.add_files('oauth1_server.js', 'server'); 13 | }); 14 | 15 | Package.on_test(function (api) { 16 | api.use('accounts-oauth1-helper', 'server'); 17 | api.add_files("oauth1_tests.js", 'server'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/http/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Make HTTP calls to remote servers" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.add_files('httpcall_common.js', ['client', 'server']); 7 | api.add_files('httpcall_client.js', 'client'); 8 | api.add_files('httpcall_server.js', 'server'); 9 | }); 10 | 11 | Package.on_test(function (api) { 12 | api.use('jquery', 'client'); 13 | api.use('http', ['client', 'server']); 14 | api.use('test-helpers', ['client', 'server']); 15 | 16 | api.add_files('test_responder.js', 'server'); 17 | api.add_files('httpcall_tests.js', ['client', 'server']); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/test-in-console/reporter.js: -------------------------------------------------------------------------------- 1 | var url = null; 2 | if (Meteor.settings && 3 | Meteor.settings.public && 4 | Meteor.settings.public.runId && 5 | Meteor.settings.public.reportTo) { 6 | url = Meteor.settings.public.reportTo + 7 | "/report/" + 8 | Meteor.settings.public.runId; 9 | } 10 | 11 | Meteor.methods({ 12 | report: function (reports) { 13 | // XXX Could do a more precise validation here; reports are complex! 14 | check(reports, [Object]); 15 | if (url) { 16 | Meteor.http.post(url, { 17 | data: reports 18 | }); 19 | } 20 | return null; 21 | } 22 | }); 23 | -------------------------------------------------------------------------------- /packages/universal-events/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Listen to events globally, and normalize them", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['underscore'], 'client'); 8 | 9 | api.add_files(['listener.js', 10 | 'events-w3c.js', 11 | 'events-ie.js'], 'client'); 12 | }); 13 | 14 | Package.on_test(function (api) { 15 | api.use('tinytest'); 16 | api.use(['universal-events', 'test-helpers'], 'client'); 17 | api.use('domutils'); 18 | api.use('spark'); 19 | 20 | api.add_files([ 21 | 'event_tests.js' 22 | ], 'client'); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/jsparse/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Full-featured JavaScript parser", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.add_files(['lexer.js', 'parserlib.js', 'stringify.js', 'parser.js'], 8 | ['client', 'server']); 9 | }); 10 | 11 | Package.on_test(function (api) { 12 | api.use('tinytest'); 13 | api.use('jsparse', 'client'); 14 | 15 | api.add_files('parser_tests.js', 16 | // Test just on client for faster running; should run 17 | // identically on server. 18 | 'client'); 19 | //['client', 'server']); 20 | }); 21 | -------------------------------------------------------------------------------- /docs/client/packages/d3.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /examples/todos/server/publish.js: -------------------------------------------------------------------------------- 1 | // Lists -- {name: String} 2 | Lists = new Meteor.Collection("lists"); 3 | 4 | // Publish complete set of lists to all clients. 5 | Meteor.publish('lists', function () { 6 | return Lists.find(); 7 | }); 8 | 9 | 10 | // Todos -- {text: String, 11 | // done: Boolean, 12 | // tags: [String, ...], 13 | // list_id: String, 14 | // timestamp: Number} 15 | Todos = new Meteor.Collection("todos"); 16 | 17 | // Publish all items for requested list_id. 18 | Meteor.publish('todos', function (list_id) { 19 | check(list_id, String); 20 | return Todos.find({list_id: list_id}); 21 | }); 22 | 23 | -------------------------------------------------------------------------------- /packages/accounts-weibo/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Sina Weibo accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth2-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['weibo_login_button.css', 'weibo_configure.html', 'weibo_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('weibo_common.js', ['client', 'server']); 16 | api.add_files('weibo_server.js', 'server'); 17 | api.add_files('weibo_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/session/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Session variable", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['underscore', 'reactive-dict'], 'client'); 8 | 9 | // XXX what I really want to do is ensure that if 'reload' is going to 10 | // be loaded, it should be loaded before 'session'. Session can work 11 | // with or without reload. 12 | api.use('reload', 'client'); 13 | 14 | api.add_files('session.js', 'client'); 15 | }); 16 | 17 | Package.on_test(function (api) { 18 | api.use('tinytest'); 19 | api.use('session', 'client'); 20 | api.add_files('session_tests.js', 'client'); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/accounts-github/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Github accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth2-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['github_login_button.css', 'github_configure.html', 'github_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('github_common.js', ['client', 'server']); 16 | api.add_files('github_server.js', 'server'); 17 | api.add_files('github_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/accounts-google/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Google accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth2-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['google_login_button.css', 'google_configure.html', 'google_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('google_common.js', ['client', 'server']); 16 | api.add_files('google_server.js', 'server'); 17 | api.add_files('google_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/accounts-meetup/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Meetup accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth2-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['meetup_login_button.css', 'meetup_configure.html', 'meetup_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('meetup_common.js', ['client', 'server']); 16 | api.add_files('meetup_server.js', 'server'); 17 | api.add_files('meetup_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/spark/test_form_responder.js: -------------------------------------------------------------------------------- 1 | var TEST_RESPONDER_ROUTE = "/spark_test_responder"; 2 | 3 | var respond = function(req, res) { 4 | 5 | res.statusCode = 200; 6 | res.setHeader("Content-Type", "text/html"); 7 | if (req.url === '/blank') 8 | res.end(); 9 | else 10 | res.end(''); 14 | }; 15 | 16 | var run_responder = function() { 17 | 18 | var app = __meteor_bootstrap__.app; 19 | app.stack.unshift({ route: TEST_RESPONDER_ROUTE, handle: respond }); 20 | }; 21 | 22 | run_responder(); 23 | -------------------------------------------------------------------------------- /packages/accounts-twitter/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Twitter accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth1-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['twitter_login_button.css', 'twitter_configure.html', 'twitter_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('twitter_common.js', ['client', 'server']); 16 | api.add_files('twitter_server.js', 'server'); 17 | api.add_files('twitter_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/accounts-facebook/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Login service for Facebook accounts" 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('accounts-oauth2-helper', ['client', 'server']); 8 | api.use('http', ['client', 'server']); 9 | api.use('templating', 'client'); 10 | 11 | api.add_files( 12 | ['facebook_login_button.css', 'facebook_configure.html', 'facebook_configure.js'], 13 | 'client'); 14 | 15 | api.add_files('facebook_common.js', ['client', 'server']); 16 | api.add_files('facebook_server.js', 'server'); 17 | api.add_files('facebook_client.js', 'client'); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/code-prettify/package.js: -------------------------------------------------------------------------------- 1 | // Source: http://code.google.com/p/google-code-prettify 2 | 3 | // XXX this sucks. I would much rather do this processing at 4 | // bundle-time on the server, not in the client. (though I'd like to 5 | // support both..) 6 | 7 | var path = Npm.require('path'); 8 | 9 | Package.describe({ 10 | summary: "Syntax highlighting of code, from Google" 11 | }); 12 | 13 | // XXX this code dumps symbols into the global namespace (directly 14 | // onto 'window'.) we need to fix that. 15 | Package.on_use(function (api) { 16 | api.add_files([ 17 | 'prettify.js', 18 | 'prettify.css', 19 | path.join('styles', 'sunburst.css')], "client"); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/code-prettify/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} -------------------------------------------------------------------------------- /docs/client/packages/less.html: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/model.js: -------------------------------------------------------------------------------- 1 | // XXX it is actually very dangerous to store times as Number. use 2 | // Date type once it's implemented in minimongo 3 | Rooms = new Meteor.Collection("rooms"); 4 | //Rooms.schema({name: String, created: Number}); 5 | 6 | Chat = new Meteor.Collection("chat"); 7 | /* 8 | Chat.schema({room: String, message: String, 9 | username: String, created: Number}); 10 | */ 11 | 12 | if (Meteor.isServer) { 13 | Meteor.publish('rooms', function () { 14 | return Rooms.find(); 15 | }); 16 | 17 | // XXX should limit to just a certain amount of recent chat .. 18 | Meteor.publish('room-detail', function (room) { 19 | return Chat.find({room: room}); 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /packages/spark/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Toolkit for live-updating HTML interfaces", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | api.use(['underscore', 'random', 'domutils', 'liverange', 'universal-events', 8 | 'ordered-dict'], 9 | 'client'); 10 | 11 | api.add_files(['spark.js', 'patch.js', 'convenience.js', 12 | 'utils.js'], 'client'); 13 | }); 14 | 15 | Package.on_test(function (api) { 16 | api.use('tinytest'); 17 | api.use(['spark', 'test-helpers'], 'client'); 18 | 19 | api.add_files('test_form_responder.js', 'server'); 20 | 21 | api.add_files([ 22 | 'spark_tests.js', 23 | 'patch_tests.js' 24 | ], 'client'); 25 | }); 26 | -------------------------------------------------------------------------------- /packages/test-in-console/runner.js: -------------------------------------------------------------------------------- 1 | var page = require('webpage').create(); 2 | var system = require('system'); 3 | var platform = system.args[1] || "local"; 4 | console.log("Running Meteor tests in PhantomJS..."); 5 | page.onConsoleMessage = function (message) { 6 | console.log(message); 7 | }; 8 | page.open(system.env.URL + platform); 9 | setInterval(function () { 10 | var done = page.evaluate(function () { 11 | return typeof DONE !== 'undefined' && DONE; 12 | }); 13 | if (done) { 14 | var failures = page.evaluate(function () { 15 | if (typeof FAILURES === 'undefined') { 16 | return 1; 17 | } 18 | return FAILURES; 19 | }); 20 | phantom.exit(failures ? 1 : 0); 21 | } 22 | }, 500); 23 | -------------------------------------------------------------------------------- /packages/domutils/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Utility functions for DOM manipulation", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | // XXX 8 | // Doesn't actually require jQuery (but uses it if available). 9 | // 10 | // For now we are going to keep shipping jQuery with all apps 11 | // so as not to break existing apps, but any time now we will 12 | // cut this dependency. 13 | api.use('jquery', 'client'); 14 | 15 | api.add_files('domutils.js', 'client'); 16 | }); 17 | 18 | Package.on_test(function (api) { 19 | api.use(['tinytest']); 20 | api.use(['domutils', 'test-helpers'], 'client'); 21 | 22 | api.add_files([ 23 | 'domutils_tests.js' 24 | ], 'client'); 25 | }); 26 | -------------------------------------------------------------------------------- /packages/mongo-livedata/remote_collection_driver.js: -------------------------------------------------------------------------------- 1 | // XXX namespacing 2 | Meteor._RemoteCollectionDriver = function (mongo_url) { 3 | var self = this; 4 | self.mongo = new Meteor._Mongo(mongo_url); 5 | }; 6 | 7 | _.extend(Meteor._RemoteCollectionDriver.prototype, { 8 | open: function (name) { 9 | var self = this; 10 | var ret = {}; 11 | _.each( 12 | ['find', 'findOne', 'insert', 'update', 'remove', '_ensureIndex', 13 | '_dropIndex'], 14 | function (m) { 15 | ret[m] = _.bind(self.mongo[m], self.mongo, name); 16 | }); 17 | return ret; 18 | } 19 | }); 20 | 21 | // singleton 22 | // XXX kind of hacky 23 | Meteor._RemoteCollectionDriver = new Meteor._RemoteCollectionDriver(process.env.MONGO_URL); 24 | -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/client/leaderboard-remote.html: -------------------------------------------------------------------------------- 1 | 2 | Remote collection demo 3 | 4 | 5 | 6 |
7 | 8 | 9 | {{> main}} 10 | 11 |
12 | 13 | 14 | 33 | -------------------------------------------------------------------------------- /packages/accounts-facebook/facebook_configure.html: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /packages/spark/convenience.js: -------------------------------------------------------------------------------- 1 | Meteor.render = function (htmlFunc) { 2 | return Spark.render(function () { 3 | return Spark.isolate( 4 | typeof htmlFunc === 'function' ? htmlFunc : function() { 5 | // non-function argument becomes a constant (non-reactive) string 6 | return String(htmlFunc); 7 | }); 8 | }); 9 | }; 10 | 11 | Meteor.renderList = function (cursor, itemFunc, elseFunc) { 12 | return Spark.render(function () { 13 | return Spark.list(cursor, function (item) { 14 | return Spark.labelBranch(item._id || null, function () { 15 | return Spark.isolate(_.bind(itemFunc, null, item)); 16 | }); 17 | }, function () { 18 | return elseFunc ? Spark.isolate(elseFunc) : ''; 19 | }); 20 | }); 21 | }; 22 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-lisp.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a], 3 | ["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]); 4 | -------------------------------------------------------------------------------- /scripts/admin/spark-standalone.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ## Creates a self-contained spark.js and writes it stdout. 4 | 5 | set -e 6 | 7 | PACKAGES_DIR=`dirname $0`/../../packages 8 | 9 | echo 'Meteor = {};' 10 | cat $PACKAGES_DIR/underscore/underscore.js 11 | cat $PACKAGES_DIR/logging/logging.js 12 | cat $PACKAGES_DIR/random/random.js 13 | cat $PACKAGES_DIR/deps/deps.js 14 | cat $PACKAGES_DIR/deps/deps-utils.js 15 | cat $PACKAGES_DIR/liverange/liverange.js 16 | cat $PACKAGES_DIR/universal-events/listener.js 17 | cat $PACKAGES_DIR/universal-events/events-ie.js 18 | cat $PACKAGES_DIR/universal-events/events-w3c.js 19 | cat $PACKAGES_DIR/domutils/domutils.js 20 | cat $PACKAGES_DIR/ordered-dict/ordered_dict.js 21 | cat $PACKAGES_DIR/spark/spark.js 22 | cat $PACKAGES_DIR/spark/patch.js 23 | -------------------------------------------------------------------------------- /packages/force-ssl/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Require this application to use secure transport (HTTPS)" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('underscore', 'server'); 7 | // make sure we come after livedata, so we load after the sockjs 8 | // server has been instantiated. 9 | api.use('livedata', 'server'); 10 | 11 | api.add_files('force_ssl_common.js', ['client', 'server']); 12 | api.add_files('force_ssl_server.js', 'server'); 13 | 14 | // Another thing we could do is add a force_ssl_client.js file that 15 | // makes sure document.location.protocol is 'https'. If it detected 16 | // the code was loaded from a non-localhost non-https site, it would 17 | // stop the app from working and pop up an error box or something. 18 | }); 19 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/reset.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, applet, object, iframe, 2 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 3 | a, abbr, acronym, address, big, cite, code, 4 | del, dfn, em, font, img, ins, kbd, q, s, samp, 5 | small, strike, strong, sub, sup, tt, var, 6 | dl, dt, dd, ol, ul, li, 7 | fieldset, form, label, legend, 8 | table, caption, tbody, tfoot, thead, tr, th, td { 9 | margin: 0; 10 | padding: 0; 11 | border: 0; 12 | outline: 0; 13 | font-weight: inherit; 14 | font-style: inherit; 15 | font-size: 100%; 16 | font-family: inherit; 17 | vertical-align: baseline; 18 | } 19 | body { 20 | line-height: 1; 21 | color: black; 22 | background: white; 23 | } 24 | ol, ul { 25 | list-style: none; 26 | } 27 | a img { 28 | border: none; 29 | } 30 | 31 | -------------------------------------------------------------------------------- /packages/accounts-meetup/meetup_configure.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /packages/tinytest/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Tiny testing framework", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api) { 7 | // "past" is always included before app code (see init_from_app_dir) but not 8 | // before packages when testing. This makes sure that tests see 9 | // backward-compatibility hooks, at least if they use tinytest. 10 | api.use('past'); 11 | 12 | api.use('underscore', ['client', 'server']); 13 | 14 | api.add_files('tinytest.js', ['client', 'server']); 15 | 16 | api.use('mongo-livedata', ['client', 'server']); 17 | api.add_files('model.js', ['client', 'server']); 18 | 19 | api.add_files('tinytest_client.js', 'client'); 20 | api.use('startup', 'server'); 21 | api.add_files('tinytest_server.js', 'server'); 22 | }); 23 | -------------------------------------------------------------------------------- /docs/client/packages/jquery.html: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /docs/client/packages/audit-argument-checks.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /packages/minimongo/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Meteor's client-side datastore: a port of MongoDB to Javascript", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api, where) { 7 | where = where || ['client', 'server']; 8 | 9 | // It would be sort of nice if minimongo didn't depend on 10 | // underscore, so we could ship it separately. 11 | api.use(['underscore', 'json', 'ejson', 'ordered-dict', 'random'], where); 12 | api.add_files([ 13 | 'minimongo.js', 14 | 'selector.js', 15 | 'modify.js', 16 | 'diff.js', 17 | 'objectid.js' 18 | ], where); 19 | }); 20 | 21 | Package.on_test(function (api) { 22 | api.use('minimongo', 'client'); 23 | api.use('test-helpers', 'client'); 24 | api.use('tinytest'); 25 | api.add_files('minimongo_tests.js', 'client'); 26 | }); 27 | -------------------------------------------------------------------------------- /tools/cleanup.js: -------------------------------------------------------------------------------- 1 | /// A simple interface to register function to be called when the process 2 | /// exits. 3 | 4 | var _ = require('underscore'); 5 | 6 | var cleanup = exports; 7 | _.extend(exports, { 8 | _exitHandlers: [], 9 | 10 | // register a function that will be called on SIGINT (e.g. Cmd-C on 11 | // mac) 12 | onExit: function(func) { 13 | this._exitHandlers.push(func); 14 | } 15 | }); 16 | 17 | var runHandlers = function () { 18 | var handlers = cleanup._exitHandlers; 19 | cleanup._exitHandlers = []; 20 | _.each(handlers, function (f) { 21 | f(); 22 | }); 23 | }; 24 | 25 | process.on('exit', runHandlers); 26 | _.each(['SIGINT', 'SIGHUP', 'SIGTERM'], function (sig) { 27 | process.once(sig, function () { 28 | runHandlers(); 29 | process.kill(process.pid, sig); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/accounts-ui-unstyled/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Unstyled version of login widgets" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use(['accounts-urls', 'accounts-base', 'underscore', 'templating'], 'client'); 7 | 8 | api.add_files([ 9 | 'accounts_ui.js', 10 | 11 | 'login_buttons.html', 12 | 'login_buttons_single.html', 13 | 'login_buttons_dropdown.html', 14 | 'login_buttons_dialogs.html', 15 | 16 | 'login_buttons_session.js', 17 | 18 | 'login_buttons.js', 19 | 'login_buttons_single.js', 20 | 'login_buttons_dropdown.js', 21 | 'login_buttons_dialogs.js'], 'client'); 22 | }); 23 | 24 | Package.on_test(function (api) { 25 | api.use('accounts-ui-unstyled'); 26 | api.use('tinytest'); 27 | api.add_files('accounts_ui_tests.js', 'client'); 28 | }); 29 | -------------------------------------------------------------------------------- /packages/accounts-twitter/twitter_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-twitter { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAByklEQVQ4jaVTz0sbQRh92V10l006GaKJCtEtmqMYU0Qpwqb4B6zgXdT0WEr7B0ih4MGLP05CUWMvHkQwglhvGhsvKmJOBhTUQjWU2slilKarrAfdZROTQ8m7fPMx33szb75vXKZpohpwVbEBCNaCMUYopXppAWOMxDNsOPf3H1WIeDoSURYYYwQAKKW6y7KgLe2vam11KyMRZcEpEP6SOkwbUgc4ATAKUF8YW2fXhZejvaHPsc7gvH2DnCfQGEtdxrd/5NRJteUDpVTf+5kLp2WlA6JsCyZv9ChplPKdTfJZkYWhEF3bvnV3fb36NZSY3dP6Q/5V4hFvIAaKPckE8W5pLBIQdwHAthBdPtpJuhpeAwDu74DrP4/R1/Ts4cwBWg/gN+DowoSqTBPezAMAeAHw+suSw4Q7schFApF6af19a+2yLVIB7xR+0Zk75yCveu82FMnMViKHCXcSa3PPVBJAX5BszL2SP2kNwvdy5M1e+S2AogME4HFYPibPpxKZC03nRAp/M+Dx2UWDzTXfpttrx72ikCoVtrrAAwgdXBk9iazxxtpskfhs1O86aHXXpAEcA7ivJGDBDcDnyAsA2FMsi1KB/0bVv/EBBBSY9mZ7PAsAAAAASUVORK5CYII=); 3 | } 4 | -------------------------------------------------------------------------------- /docs/client/packages/stylus.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /packages/bootstrap/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Front-end framework from Twitter" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('jquery'); 7 | 8 | var path = Npm.require('path'); 9 | api.add_files(path.join('css', 'bootstrap.css'), 'client'); 10 | api.add_files(path.join('css', 'bootstrap-responsive.css'), 'client'); 11 | api.add_files(path.join('js', 'bootstrap.js'), 'client'); 12 | api.add_files(path.join('img', 'glyphicons-halflings.png'), 'client'); 13 | api.add_files(path.join('img', 'glyphicons-halflings-white.png'), 'client'); 14 | 15 | // XXX this makes the paths to the icon sets absolute. it needs 16 | // to be included _after_ the standard bootstrap css so 17 | // that its styles take precedence. 18 | api.add_files(path.join('css', 'bootstrap-override.css'), 'client'); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/showdown/package.js: -------------------------------------------------------------------------------- 1 | // Source: https://github.com/coreyti/showdown 2 | 3 | // XXX rename to 'markdown' and credit showdown some other way? 4 | 5 | Package.describe({ 6 | summary: "Markdown-to-HTML processor" 7 | }); 8 | 9 | var _ = Npm.require('underscore'); 10 | 11 | Package.on_use(function (api, where) { 12 | where = where || ["client", "server"]; 13 | where = where instanceof Array ? where : [where]; 14 | 15 | api.add_files("showdown.js", where); 16 | 17 | // XXX what we really want to do is, load template-integration after 18 | // handlebars, iff handlebars was included in the project. 19 | if (where === "client" || 20 | (where instanceof Array && _.indexOf(where, "client") !== -1)) { 21 | api.use("handlebars", "client"); 22 | api.add_files("template-integration.js", "client"); 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /examples/leaderboard/leaderboard.html: -------------------------------------------------------------------------------- 1 | 2 | Leaderboard 3 | 4 | 5 | 6 |
7 | {{> leaderboard}} 8 |
9 | 10 | 11 | 29 | 30 | 36 | 37 | -------------------------------------------------------------------------------- /examples/unfinished/controls/controls.html: -------------------------------------------------------------------------------- 1 | 2 | controls 3 | 4 | 5 | 6 | {{> radios}} 7 | {{> checkboxes}} 8 | {{> spew}} 9 | 10 | 11 | 20 | 21 | 28 | 29 | 36 | -------------------------------------------------------------------------------- /packages/accounts-password/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Password support for accounts." 3 | }); 4 | 5 | Package.on_use(function(api) { 6 | api.use('accounts-base', ['client', 'server']); 7 | api.use('srp', ['client', 'server']); 8 | api.use('email', ['server']); 9 | 10 | api.add_files('email_templates.js', 'server'); 11 | api.add_files('password_server.js', 'server'); 12 | api.add_files('password_client.js', 'client'); 13 | api.add_files('password_common.js', ['server', 'client']); 14 | }); 15 | 16 | Package.on_test(function(api) { 17 | api.use(['accounts-password', 'tinytest', 'test-helpers', 'deps']); 18 | api.add_files('password_tests_setup.js', 'server'); 19 | api.add_files('password_tests.js', ['client', 'server']); 20 | api.add_files('email_tests_setup.js', 'server'); 21 | api.add_files('email_tests.js', 'client'); 22 | }); 23 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /packages/accounts-oauth2-helper/oauth2_server.js: -------------------------------------------------------------------------------- 1 | // connect middleware 2 | Accounts.oauth2._handleRequest = function (service, query, res) { 3 | // check if user authorized access 4 | if (!query.error) { 5 | // Prepare the login results before returning. This way the 6 | // subsequent call to the `login` method will be immediate. 7 | 8 | // Run service-specific handler. 9 | var oauthResult = service.handleOauthRequest(query); 10 | 11 | // Get or create user doc and login token for reconnect. 12 | Accounts.oauth._loginResultForState[query.state] = 13 | Accounts.updateOrCreateUserFromExternalService( 14 | service.serviceName, oauthResult.serviceData, oauthResult.options); 15 | } 16 | 17 | // Either close the window, redirect, or render nothing 18 | // if all else fails 19 | Accounts.oauth._renderOauthResults(res, query); 20 | }; 21 | -------------------------------------------------------------------------------- /packages/accounts-weibo/weibo_configure.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /docs/client/packages/underscore.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /scripts/node.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ORIGDIR=$(pwd) 4 | cd $(dirname $0) 5 | cd .. 6 | TOPDIR=$(pwd) 7 | 8 | # download dev bundle if we don't have it already 9 | if [ ! -d dev_bundle ] ; then 10 | ./meteor --get-ready 11 | fi 12 | 13 | cd "$ORIGDIR" 14 | export NODE_PATH="$TOPDIR/dev_bundle/lib/node_modules" 15 | 16 | if [ "$EMACS" == t ]; then 17 | # Emacs shell doesn't need readline and interprets the ANSI characters as 18 | # garbage. 19 | export NODE_NO_READLINE=1 20 | fi 21 | 22 | "$TOPDIR/dev_bundle/bin/node" "$@" 23 | EXITSTATUS=$? 24 | 25 | # Node sets stdin to non-blocking, which causes Emacs shell to die after it 26 | # exits. Work around this by setting stdin to blocking again. 27 | if [ "$EMACS" == t ]; then 28 | perl -MFcntl=F_GETFL,F_SETFL,O_NONBLOCK -e \ 29 | 'fcntl(STDIN, F_SETFL, ~O_NONBLOCK & fcntl(STDIN, F_GETFL, 0))' 30 | fi 31 | 32 | exit $EXITSTATUS 33 | -------------------------------------------------------------------------------- /examples/unfinished/coffeeless/client/coffeeless.html: -------------------------------------------------------------------------------- 1 | 2 | coffeeless 3 | 4 | 5 | 6 |

coffeeless

7 | 8 | Welcome to Meteor! Here is a button for you to press. 9 | 10 | {{> button_demo }} 11 | 12 | 19 | 20 | 21 | 22 | 23 | 24 | 37 | -------------------------------------------------------------------------------- /examples/unfinished/leaderboard-remote/client/leaderboard-remote.css: -------------------------------------------------------------------------------- 1 | body { 2 | width: 400px; 3 | margin: 100px auto 0 auto; 4 | background-color: white; 5 | font-family: 'Helvetica Neue', Helvetica, Arial, san-serif; 6 | line-height: 1.3; 7 | } 8 | 9 | #meteor { 10 | position: absolute; 11 | left: 0px; 12 | bottom: 0px; 13 | opacity: .25; 14 | z-index: -1; 15 | } 16 | 17 | h1 { 18 | color: red; 19 | font-size: 3em; 20 | font-weight: 200; 21 | border-style: solid none none none; 22 | border-color: red; 23 | border-width: 4px; 24 | } 25 | 26 | .button_demo { 27 | margin-top: 2em; 28 | width: 100%; 29 | } 30 | 31 | .button_demo input { 32 | display: block; 33 | margin: 0 auto .5em auto; 34 | width: 125px; 35 | } 36 | 37 | .button_demo div { 38 | text-align: center; 39 | color: #777; 40 | font-weight: bold; 41 | } 42 | -------------------------------------------------------------------------------- /docs/client/packages/force-ssl.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /packages/accounts-ui-unstyled/accounts_ui_tests.js: -------------------------------------------------------------------------------- 1 | // XXX Most of the testing of accounts-ui is done manually, across 2 | // multiple browsers using examples/unfinished/accounts-ui-helper. We 3 | // should *definitely* automate this, but Tinytest is generally not 4 | // the right abstraction to use for this. 5 | 6 | 7 | // XXX it'd be cool to also test that the right thing happens if options 8 | // *are* validated, but Accouns.ui._options is global state which makes this hard 9 | // (impossible?) 10 | Tinytest.add('accounts-ui - config validates keys', function (test) { 11 | test.throws(function () { 12 | Accounts.ui.config({foo: "bar"}); 13 | }); 14 | 15 | test.throws(function () { 16 | Accounts.ui.config({passwordSignupFields: "not a valid option"}); 17 | }); 18 | 19 | test.throws(function () { 20 | Accounts.ui.config({requestPermissions: {facebook: "not an array"}}); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | # export DH_VERBOSE=1 11 | 12 | # NOTE: $TARBALL comes from exported env in build script: 13 | # meteor/scripts/admin/upgrade-to-engine/build-fake-release.sh 14 | override_dh_prep: 15 | if [ ! -f "$(TARBALL)" ] ; then echo "Can't find TARBALL: $(TARBALL)" ; exit 1 ; fi 16 | mkdir -p debian/tmp/usr/lib 17 | tar -C debian/tmp/usr/lib -xzf $(TARBALL) 18 | echo -n 'deb' > debian/tmp/usr/lib/meteor/.package_stamp 19 | 20 | %: 21 | dh $@ 22 | -------------------------------------------------------------------------------- /packages/accounts-github/github_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-github { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9wJGBYxHYxl31wAAAHpSURBVDjLpZI/aFNRFMZ/973bJqGRPopV4qNq/+SpTYnWRhCKilShg9BGcHOM+GfQoZuLk4iLgw4qZNBaHLuIdBNHl7Ta1qdNFI3SihnaNG1MpH3vuiQYQnwZvHCG893zffc751z4z6PX5T5gA1DAKnAaOAQEgAfAVeCpl+CeCrlRuEC6maO4h0A1wl4tPAHMqNUthvrDdHYY7A3t4rDVjeO6rBU2FaABM1WCrBNoi48Mi+nH9yj+KtPibAKwJXfQ5vcRG7soUnYmWEuQgAEIYBv4cGpoILI0Z4tyYYPegS6UguyijZQ6J45GSNmZHzUcJYD2ii2Ajv7efZ8WZ6ZwXFj79hXpayW4O0SL1Nl/8jzZlZ9dQLFS70pgvZKIyGD0yvu5eRmMnrk1PjI81ir1qBACTdPevXj95mVuNX8XKDQc/+T334bZZ104cvzYw2s3J3qAL5WXSsDbf61NNMBu+wOBs+VSyQ84Nfhg028ZGx3/qyy0lC7lgi7lghBitoon03lvB8l0/k7Wnk+8mny0cyXzEcfZxgwfZPTyRMHsOzAFXE9YhtNQIJnOx4FpJXT1eSkn2g0frqMoFrfoCXcqlCOAGwnLuO/l4JymcWl5uRxzXUKghBAiZ5r+WaV4lrCM555zqO+x2d0ftGmpiA/0k70AAAAASUVORK5CYII=); 3 | } 4 | -------------------------------------------------------------------------------- /examples/unfinished/todos-underscore/server/bootstrap.js: -------------------------------------------------------------------------------- 1 | // if the database is empty on server start, create some sample data. 2 | Meteor.startup(function () { 3 | if (Lists.find().length === 0) { 4 | var list1 = Lists.insert({name: 'Things to do'}); 5 | Todos.insert({list_id: list1._id, 6 | text: 'Write Meteor app', tags: ['fun']}); 7 | Todos.insert({list_id: list1._id, 8 | text: 'Drink beer', tags: ['fun', 'yum']}); 9 | 10 | var list2 = Lists.insert({name: 'Places to see'}); 11 | Todos.insert({list_id: list2._id, text: 'San Francisco', 12 | tags: ['yum']}); 13 | Todos.insert({list_id: list2._id, text: 'Paris', 14 | tags: ['fun']}); 15 | Todos.insert({list_id: list2._id, text: 'Tokyo'}); 16 | 17 | var list3 = Lists.insert({name: 'People to meet'}); 18 | Todos.insert({list_id: list3._id, 19 | text: 'All the cool kids'}); 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /docs/client/packages.html: -------------------------------------------------------------------------------- 1 | 38 | -------------------------------------------------------------------------------- /packages/handlebars/package.js: -------------------------------------------------------------------------------- 1 | // XXX this is hella confusing. this package really only has the 2 | // handlebars *runtime*, for precompiled templates. so really it is an 3 | // internal package that should get shipped down to the client iff you 4 | // have a precompiled handlebars template in your project. 5 | 6 | Package.describe({ 7 | summary: "Simple semantic templating language" 8 | }); 9 | 10 | Package._require('parse.js'); // needed at bundle time 11 | 12 | Package.on_use(function (api) { 13 | // XXX should only be sent if we have handlebars templates in the app.. 14 | api.add_files('evaluate.js', 'client'); 15 | api.add_files('parse.js', 'server'); // needed on server for tests 16 | 17 | api.use('underscore', 'client'); 18 | }); 19 | 20 | // XXX lots more to do here .. registering this a templating engine, 21 | // making it the default default, providing the compiler code, 22 | // depending on the node package (or packaging the compiler 23 | // ourselves..) 24 | -------------------------------------------------------------------------------- /docs/client/packages/coffeescript.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /examples/other/template-demo/client/template-demo.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Helvetica Neue', Helvetica, Arial, san-serif; 3 | width: 600px; 4 | margin: auto; 5 | padding: 25px 50px; 6 | border: 5px dashed #ccc; 7 | border-style: none dashed; 8 | } 9 | 10 | h2 { 11 | margin-top: 50px; 12 | text-decoration: underline; 13 | } 14 | 15 | .clearboth { 16 | clear: both; 17 | } 18 | 19 | @-webkit-keyframes spinForward { 20 | from {-webkit-transform: rotate(0deg);} 21 | to {-webkit-transform: rotate(360deg);} 22 | } 23 | 24 | @-webkit-keyframes spinBackward { 25 | from {-webkit-transform: rotate(360deg);} 26 | to {-webkit-transform: rotate(0deg);} 27 | } 28 | 29 | .spinner { 30 | width: 100px; 31 | border: 2px solid black; 32 | font-weight: bold; 33 | text-align: center; 34 | background: white; 35 | } 36 | 37 | .circles { 38 | float: left; 39 | padding-right: 20px; 40 | } 41 | 42 | .circles svg { 43 | border: 2px solid #333; 44 | } -------------------------------------------------------------------------------- /examples/unfinished/parse-inspector/parse-inspector.html: -------------------------------------------------------------------------------- 1 | 2 | jsparser 3 | 4 | 5 | 6 | {{> page}} 7 | 8 | 9 | 35 | -------------------------------------------------------------------------------- /packages/madewith/madewith.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | a.madewith_badge { 3 | text-decoration: none; 4 | z-index: 10000; 5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 6 | display: block; 7 | position: absolute; 8 | top: 0; 9 | right: 0; 10 | width: 280px; 11 | height: 32px; 12 | background-repeat: no-repeat; 13 | background-position: left top; 14 | font-weight: bold; 15 | } 16 | 17 | .madewith_upvote { 18 | position: absolute; 19 | top: 2px; 20 | bottom: 2px; 21 | left: 205px; 22 | width: 26px; 23 | cursor: pointer; 24 | background-repeat: no-repeat; 25 | background-position: 100px 100px; /* hidden */ 26 | } 27 | 28 | .madewith_upvote:hover { 29 | background-position: 5px 3px; 30 | } 31 | 32 | .madewith_vote_count { 33 | position: absolute; 34 | top: 2px; 35 | bottom: 2px; 36 | right: 2px; 37 | width: 52px; 38 | text-align: center; 39 | overflow: visible; 40 | color: #fff; 41 | line-height: 28px; 42 | font-size: 18px; 43 | } -------------------------------------------------------------------------------- /scripts/admin/build-tools-tarballs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -u 5 | 6 | # cd to top level dir 7 | cd `dirname $0` 8 | cd ../.. 9 | TOPDIR=$(pwd) 10 | 11 | TOOLS_TMPDIR=$(mktemp -d -t meteor-build-release-XXXXXXXX) 12 | trap 'rm -rf "$TOOLS_TMPDIR" >/dev/null 2>&1' 0 13 | 14 | # build the tools in a temporary directory. after its built we know 15 | # its version so rename the directory. 16 | export TARGET_DIR="$TOOLS_TMPDIR/new" 17 | $TOPDIR/scripts/admin/build-tools-tree.sh 18 | TOOLS_VERSION=$(cat $TARGET_DIR/.tools_version.txt) 19 | mv "$TARGET_DIR" "$TOOLS_TMPDIR/$TOOLS_VERSION" 20 | 21 | # tar it up 22 | OUTDIR="$TOPDIR/dist/tools" 23 | mkdir -p "$OUTDIR" 24 | 25 | TOOLS_TARBALL="$OUTDIR/meteor-tools-${TOOLS_VERSION}-${PLATFORM}.tar.gz" 26 | echo "Tarring tools to: $TOOLS_TARBALL" 27 | $TAR -C "$TOOLS_TMPDIR" --exclude .meteor/local -czf "$TOOLS_TARBALL" "$TOOLS_VERSION" 28 | 29 | # A hacky (?) way to pass $TOOLS_VERSION back into build-release.sh 30 | echo $TOOLS_VERSION > $TOPDIR/.tools_version 31 | -------------------------------------------------------------------------------- /examples/unfinished/benchmark/scenarios/README.md: -------------------------------------------------------------------------------- 1 | Parameters for simulation: 2 | 3 | Each document is randomly placed in a collection, with a random 4 | 'bucket' field. Clients sub to 1 bucket in each collection. 5 | 6 | - numCollections 7 | how many collections to spread the documents over 8 | - numBuckets 9 | number of buckets per collection. 10 | 11 | - initialDocuments: Inital documents added by the server. Probably 12 | not usefully combined with maxAgeSeconds 13 | 14 | - maxAgeSeconds: How long to leave documents in the database. This, 15 | combined with all the various rates, determines the steady state 16 | database size. In seconds. falsy to disable. 17 | 18 | Per-client action rates: 19 | - insertsPerSecond 20 | - updatesPerSecond 21 | - removesPerSecond 22 | 23 | - documentSize: bytes of randomness per document. 24 | // XXX make this a random distribution? 25 | - documentNumFields: how many fields of randomness per document. 26 | 27 | XXX also max documents? (count and remove N) 28 | -------------------------------------------------------------------------------- /packages/accounts-github/github_client.js: -------------------------------------------------------------------------------- 1 | Meteor.loginWithGithub = function (options, callback) { 2 | // support both (options, callback) and (callback). 3 | if (!callback && typeof options === 'function') { 4 | callback = options; 5 | options = {}; 6 | } 7 | 8 | var config = Accounts.loginServiceConfiguration.findOne({service: 'github'}); 9 | if (!config) { 10 | callback && callback(new Accounts.ConfigError("Service not configured")); 11 | return; 12 | } 13 | var state = Random.id(); 14 | 15 | var scope = (options && options.requestPermissions) || []; 16 | var flatScope = _.map(scope, encodeURIComponent).join('+'); 17 | 18 | var loginUrl = 19 | 'https://github.com/login/oauth/authorize' + 20 | '?client_id=' + config.clientId + 21 | '&scope=' + flatScope + 22 | '&redirect_uri=' + Meteor.absoluteUrl('_oauth/github?close') + 23 | '&state=' + state; 24 | 25 | Accounts.oauth.initiateLogin(state, loginUrl, callback, {width: 900, height: 450}); 26 | }; 27 | -------------------------------------------------------------------------------- /packages/accounts-weibo/weibo_client.js: -------------------------------------------------------------------------------- 1 | // XXX support options.requestPermissions as we do for Facebook, Google, Github 2 | Meteor.loginWithWeibo = function (options, callback) { 3 | // support both (options, callback) and (callback). 4 | if (!callback && typeof options === 'function') { 5 | callback = options; 6 | options = {}; 7 | } 8 | 9 | var config = Accounts.loginServiceConfiguration.findOne({service: 'weibo'}); 10 | if (!config) { 11 | callback && callback(new Accounts.ConfigError("Service not configured")); 12 | return; 13 | } 14 | 15 | var state = Random.id(); 16 | // XXX need to support configuring access_type and scope 17 | var loginUrl = 18 | 'https://api.weibo.com/oauth2/authorize' + 19 | '?response_type=code' + 20 | '&client_id=' + config.clientId + 21 | '&redirect_uri=' + Meteor.absoluteUrl('_oauth/weibo?close', {replaceLocalhost: true}) + 22 | '&state=' + state; 23 | 24 | Accounts.oauth.initiateLogin(state, loginUrl, callback); 25 | }; 26 | -------------------------------------------------------------------------------- /packages/accounts-google/google_configure.html: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/meteor.spec: -------------------------------------------------------------------------------- 1 | # 2 | # Meteor RPM spec file 3 | # 4 | 5 | Summary: Meteor platform and JavaScript application server 6 | Vendor: Meteor 7 | Name: meteor 8 | Version: 0.6.0 9 | Release: 1 10 | License: MIT 11 | Group: Networking/WWW 12 | Packager: Meteor Packaging Team 13 | URL: http://meteor.com/ 14 | BuildRoot: %{_tmppath}/%{name}-%{version}-root 15 | 16 | %description 17 | A platform and app server for building websites in JavaScript. 18 | 19 | %prep 20 | 21 | %build 22 | 23 | %install 24 | [ "%{buildroot}" != '/' ] && rm -rf %{buildroot} 25 | if [ ! -f "%{TARBALL}" ] ; then 26 | echo "Can't find TARBALL: %{TARBALL}" 27 | exit 1 28 | fi 29 | install -d %{buildroot}%{_libdir} 30 | # XXX XXX 31 | tar -x -C %{buildroot}%{_libdir} -f %{TARBALL} 32 | install -d %{buildroot}%{_bindir} 33 | echo -n 'rpm' > %{buildroot}%{_libdir}/meteor/.package_stamp 34 | 35 | %clean 36 | [ "%{buildroot}" != '/' ] && rm -rf %{buildroot} 37 | 38 | %files 39 | %defattr(-,root,root) 40 | %{_libdir}/meteor 41 | -------------------------------------------------------------------------------- /packages/accounts-base/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "A user account system" 3 | }); 4 | 5 | Package.on_use(function (api) { 6 | api.use('underscore', 'server'); 7 | api.use('localstorage', 'client'); 8 | api.use('accounts-urls', 'client'); 9 | 10 | // need this because of the Meteor.users collection but in the future 11 | // we'd probably want to abstract this away 12 | api.use('mongo-livedata', ['client', 'server']); 13 | 14 | api.add_files('accounts_common.js', ['client', 'server']); 15 | api.add_files('accounts_server.js', 'server'); 16 | 17 | // accounts_client must be before localstorage_token, because 18 | // localstorage_token attempts to call functions in accounts_client (eg 19 | // Accounts.callLoginMethod) on startup. 20 | api.add_files('accounts_client.js', 'client'); 21 | api.add_files('localstorage_token.js', 'client'); 22 | }); 23 | 24 | Package.on_test(function (api) { 25 | api.use('accounts-base'); 26 | api.use('tinytest'); 27 | api.add_files('accounts_tests.js', 'server'); 28 | }); 29 | -------------------------------------------------------------------------------- /packages/livedata/server_convenience.js: -------------------------------------------------------------------------------- 1 | if (process.env.DDP_DEFAULT_CONNECTION_URL) { 2 | __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL = 3 | process.env.DDP_DEFAULT_CONNECTION_URL; 4 | } 5 | 6 | 7 | _.extend(Meteor, { 8 | default_server: new Meteor._LivedataServer, 9 | 10 | refresh: function (notification) { 11 | var fence = Meteor._CurrentWriteFence.get(); 12 | if (fence) { 13 | // Block the write fence until all of the invalidations have 14 | // landed. 15 | var proxy_write = fence.beginWrite(); 16 | } 17 | Meteor._InvalidationCrossbar.fire(notification, function () { 18 | if (proxy_write) 19 | proxy_write.committed(); 20 | }); 21 | } 22 | }); 23 | 24 | // Proxy the public methods of Meteor.default_server so they can 25 | // be called directly on Meteor. 26 | _.each(['publish', 'methods', 'call', 'apply'], 27 | function (name) { 28 | Meteor[name] = _.bind(Meteor.default_server[name], 29 | Meteor.default_server); 30 | }); 31 | -------------------------------------------------------------------------------- /packages/stylus/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: 'Expressive, dynamic, robust CSS.' 3 | }); 4 | 5 | Npm.depends({stylus: "0.30.1", nib: "0.8.2"}); 6 | 7 | Package.register_extension( 8 | 'styl', function(bundle, source_path, serve_path, where) { 9 | var stylus = Npm.require('stylus'); 10 | var nib = Npm.require('nib'); 11 | var fs = Npm.require('fs'); 12 | 13 | serve_path = serve_path + '.css'; 14 | 15 | var contents = fs.readFileSync(source_path); 16 | 17 | stylus(contents.toString('utf8')) 18 | .use(nib()) 19 | .set('filename', source_path) 20 | .render(function(err, css) { 21 | if (err) { 22 | bundle.error('Stylus compiler error: ' + err.message); 23 | return; 24 | } 25 | bundle.add_resource({ 26 | type: 'css', 27 | path: serve_path, 28 | data: new Buffer(css), 29 | where: where 30 | }); 31 | }); 32 | } 33 | ); 34 | 35 | Package.on_test(function (api) { 36 | api.add_files(['stylus_tests.styl', 'stylus_tests.js'], 'client'); 37 | }); 38 | -------------------------------------------------------------------------------- /packages/test-helpers/seeded_random.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | /*global*/ SeededRandom = function(seed) { // seed may be a string or any type 4 | if (! (this instanceof SeededRandom)) 5 | return new SeededRandom(seed); 6 | 7 | seed = seed || "seed"; 8 | this.gen = new Random._Alea(seed); // from random.js 9 | }; 10 | SeededRandom.prototype.next = function() { 11 | return this.gen(); 12 | }; 13 | SeededRandom.prototype.nextBoolean = function() { 14 | return this.next() >= 0.5; 15 | }; 16 | SeededRandom.prototype.nextIntBetween = function(min, max) { 17 | // inclusive of min and max 18 | return Math.floor(this.next() * (max-min+1)) + min; 19 | }; 20 | SeededRandom.prototype.nextIdentifier = function(optLen) { 21 | var letters = []; 22 | var len = (typeof optLen === "number" ? optLen : 12); 23 | for(var i=0; i 2 | {{#better_markdown}} 3 | ## `random` 4 | 5 | The `random` package provides several functions for generating random 6 | numbers. It uses a Meteor-provided random number generator that does not depend 7 | on the browser's facilities. 8 | 9 |
10 | {{#dtdd "Random.id()"}} 11 | Returns a unique identifier, such as `"Jjwjg6gouWLXhMGKW"`, that is likely to 12 | be unique in the whole world. 13 | {{/dtdd}} 14 | 15 | {{#dtdd "Random.fraction()"}} 16 | Returns a number between 0 and 1, like `Math.random`. 17 | {{/dtdd}} 18 | 19 | {{#dtdd "Random.choice(arrayOrString)"}} 20 | Returns a random element of the given array or string. 21 | {{/dtdd}} 22 | 23 | {{#dtdd "Random.hexString(n)"}} 24 | Returns a random string of `n` hexadecimal digits. 25 | {{/dtdd}} 26 |
27 | 28 | {{#note}} 29 | In the current implementation, random values do not come from a 30 | cryptographically strong pseudorandom number generator. Future releases will 31 | improve this, particularly on the server. 32 | {{/note}} 33 | {{/better_markdown}} 34 | 35 | -------------------------------------------------------------------------------- /examples/other/quiescence/quiescence.html: -------------------------------------------------------------------------------- 1 | 2 | quiescence 3 | 4 | 5 | 6 | {{> clock}} 7 | {{> updated}} 8 | {{> stream}} 9 | 10 | 11 | 15 | 16 | 22 | 23 | 36 | -------------------------------------------------------------------------------- /packages/livedata/client_convenience.js: -------------------------------------------------------------------------------- 1 | _.extend(Meteor, { 2 | default_connection: null, 3 | refresh: function (notification) { 4 | } 5 | }); 6 | 7 | if (Meteor.isClient) { 8 | // By default, try to connect back to the same endpoint as the page 9 | // was served from. 10 | var ddpUrl = '/'; 11 | if (typeof __meteor_runtime_config__ !== "undefined") { 12 | if (__meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL) 13 | ddpUrl = __meteor_runtime_config__.DDP_DEFAULT_CONNECTION_URL; 14 | } 15 | Meteor.default_connection = 16 | Meteor.connect(ddpUrl, true /* restart_on_update */); 17 | 18 | // Proxy the public methods of Meteor.default_connection so they can 19 | // be called directly on Meteor. 20 | _.each(['subscribe', 'methods', 'call', 'apply', 'status', 'reconnect'], 21 | function (name) { 22 | Meteor[name] = _.bind(Meteor.default_connection[name], 23 | Meteor.default_connection); 24 | }); 25 | } else { 26 | /* Never set up a default connection on the server. Don't even map 27 | subscribe/call/etc onto Meteor. */ 28 | } 29 | -------------------------------------------------------------------------------- /examples/unfinished/jsparse-docs/jsparse-docs.css: -------------------------------------------------------------------------------- 1 | 2 | p, .topnotes .nodespec { margin: 0.8em; } 3 | .topnotes { 4 | background: #ffd; 5 | margin-bottom: 2em; 6 | margin-left: 1em; 7 | margin-right: 1em; 8 | border: 2px solid #ccc; 9 | } 10 | 11 | .str { font-weight: bold; } 12 | .token { font-family: monospace; font-size: 110%; font-weight: bold; } 13 | .token, .tokentype { background: #ddd; padding: 2px 5px; } 14 | .tokentype { font-size: 85%; } 15 | .ref { font-style: italic; } 16 | .punc { font-size: 140%; } 17 | .comma { color: #fff; } 18 | .or { padding-left: 3px; padding-right: 3px; } 19 | 20 | .nodespec { 21 | font-size: 16px; 22 | margin: 1em 0; 23 | line-height: 20px; 24 | } 25 | 26 | .indent { 27 | margin-left: 2em; 28 | } 29 | 30 | .explan { 31 | margin-left: 20em; 32 | margin-right: 2em; 33 | border: 1px solid #ccc; 34 | } 35 | 36 | #page { max-width: 50em; margin: 0 auto; } 37 | 38 | .spacer { text-align: center; font-size:50%; font-weight: bold; border-top: 1px solid #999; 39 | margin-left: 6em; margin-right: 6em; 40 | } 41 | 42 | code { font-weight: bold; } 43 | -------------------------------------------------------------------------------- /packages/accounts-facebook/facebook_client.js: -------------------------------------------------------------------------------- 1 | Meteor.loginWithFacebook = function (options, callback) { 2 | // support both (options, callback) and (callback). 3 | if (!callback && typeof options === 'function') { 4 | callback = options; 5 | options = {}; 6 | } 7 | 8 | var config = Accounts.loginServiceConfiguration.findOne({service: 'facebook'}); 9 | if (!config) { 10 | callback && callback(new Accounts.ConfigError("Service not configured")); 11 | return; 12 | } 13 | 14 | var state = Random.id(); 15 | var mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent); 16 | var display = mobile ? 'touch' : 'popup'; 17 | 18 | var scope = "email"; 19 | if (options && options.requestPermissions) 20 | scope = options.requestPermissions.join(','); 21 | 22 | var loginUrl = 23 | 'https://www.facebook.com/dialog/oauth?client_id=' + config.appId + 24 | '&redirect_uri=' + Meteor.absoluteUrl('_oauth/facebook?close') + 25 | '&display=' + display + '&scope=' + scope + '&state=' + state; 26 | 27 | Accounts.oauth.initiateLogin(state, loginUrl, callback); 28 | }; 29 | -------------------------------------------------------------------------------- /packages/livedata/crossbar_tests.js: -------------------------------------------------------------------------------- 1 | // White box tests of invalidation crossbar matching function. 2 | // Note: the current crossbar match function is designed specifically 3 | // to ensure that a modification that targets a specific ID does not 4 | // notify a query that is watching a different specific ID. (And to 5 | // keep separate collections separate.) Other than that, there's no 6 | // deep meaning to the matching function, and it could be changed later 7 | // as long as it preserves that property. 8 | Tinytest.add('livedata - crossbar', function (test) { 9 | test.isTrue(Meteor._InvalidationCrossbar._matches( 10 | {collection: "C"}, {collection: "C"})); 11 | test.isTrue(Meteor._InvalidationCrossbar._matches( 12 | {collection: "C", id: "X"}, {collection: "C"})); 13 | test.isTrue(Meteor._InvalidationCrossbar._matches( 14 | {collection: "C"}, {collection: "C", id: "X"})); 15 | test.isTrue(Meteor._InvalidationCrossbar._matches( 16 | {collection: "C", id: "X"}, {collection: "C"})); 17 | 18 | test.isFalse(Meteor._InvalidationCrossbar._matches( 19 | {collection: "C", id: "X"}, {collection: "C", id: "Y"})); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/accounts-weibo/weibo_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-weibo { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAKySURBVDhPY2AgEpR5sjf/nS/6//UkoX+XJltuCvVxkcOp9cyZM1w/r13TuXvmDD9MkYIwg7qrNrubnzFb6J5intPHqrnvCnIwyKIYsmrVKuaFYWEFW2Sk79zX0f6/REHhKFABC0zRsky+rXMSeZdKCTLIHqgUvLAknW8L3IAQDw/RFlbWnQ801P+DNN8D4n0qyk94GRiEjTg5Lbz4+YOCdbhjVmTxbZwex7PUW58t8O1Ukf9gA2IDAoRPWFudfayt9f+mpsb/6yrK/28qKf4/ISf7YZu83K07QMNe6On9nyWusMtVm813azH/UWctZo/vc8TABjB3CApufAzSqKjw/7apyf+nMdH/XxUX/X+RnfX/qY/3/5tqqv/vq6v936KsfB2onltaiEHGx5AteFep4EmGUEHB1Adamv9v6er8fztp0v//79////nr1/+3X778B4N///5/O3jw/0N39//nlBQ/louLd4MMAWImcPhsU1G6DfLvt717wepnz537X0FB4T8fL+//AH///2/evgWL/7l///9dE+P/b4AWTZSWXg/UzAj2/w2gs59mZYEV7d+//z8rE9N/JUXF/w62tiD//a+urIS4BAgeA712Cxg2F40M36alpXGBDTgmI/3hdUU5WEFjff3/wvx8MNvcxARsQE1VFUQ30Et37Oz+P1RV+b/J0nIjUATigmgBvtzH5mb//9++/f/mkyf/A4KC/nv7+oI1W1hb/3/1+fP//9+//39ekP//CVDzTlnZxxtnz1ZBSUDeDAyZh7W13nybOeP/7W1b/09rbf2/FhgWHy9c+P912bL/D11d/l+WEP8/SUR4Ox8DA6pmmEkpHh4ya0JCim4lJGx7kZp8821CwrN7Hh4Pr7m6nDoSET61PjDQichsA3T7//+s/16/5gXSkIAa1AAAh8dhOVd5xHAAAAAASUVORK5CYII=); 3 | } 4 | -------------------------------------------------------------------------------- /packages/test-helpers/package.js: -------------------------------------------------------------------------------- 1 | Package.describe({ 2 | summary: "Utility functions for tests", 3 | internal: true 4 | }); 5 | 6 | Package.on_use(function (api, where) { 7 | where = where || ["client", "server"]; 8 | 9 | api.use('ejson'); 10 | 11 | // XXX These files have various dependencies on other packages 12 | // that aren't specified here. :( 13 | // This package should probably get split into several packages, 14 | // each with correct dependencies. 15 | 16 | api.add_files('try_all_permutations.js', where); 17 | api.add_files('async_multi.js', where); 18 | api.add_files('event_simulation.js', where); 19 | api.add_files('seeded_random.js', where); 20 | api.add_files('canonicalize_html.js', where); 21 | api.add_files('stub_stream.js', where); 22 | api.add_files('onscreendiv.js', where); 23 | api.add_files('wrappedfrag.js', where); 24 | api.add_files('current_style.js', where); 25 | api.add_files('reactivevar.js', where); 26 | api.add_files('callback_logger.js', where); 27 | }); 28 | 29 | Package.on_test(function (api) { 30 | api.use('tinytest'); 31 | api.use('test-helpers'); 32 | api.add_files('try_all_permutations_test.js', 'client'); 33 | }); 34 | -------------------------------------------------------------------------------- /packages/test-helpers/stub_stream.js: -------------------------------------------------------------------------------- 1 | Meteor._StubStream = function () { 2 | var self = this; 3 | 4 | self.sent = []; 5 | self.callbacks = {}; 6 | }; 7 | 8 | 9 | _.extend(Meteor._StubStream.prototype, { 10 | // Methods from Stream 11 | on: function (name, callback) { 12 | var self = this; 13 | 14 | if (!self.callbacks[name]) 15 | self.callbacks[name] = [callback]; 16 | else 17 | self.callbacks[name].push(callback); 18 | }, 19 | 20 | send: function (data) { 21 | var self = this; 22 | self.sent.push(data); 23 | }, 24 | 25 | status: function () { 26 | return {status: "connected", fake: true}; 27 | }, 28 | 29 | reconnect: function () { 30 | // no-op 31 | }, 32 | 33 | 34 | // Methods for tests 35 | receive: function (data) { 36 | var self = this; 37 | 38 | if (typeof data === 'object') { 39 | data = EJSON.stringify(data); 40 | } 41 | 42 | _.each(self.callbacks['message'], function (cb) { 43 | cb(data); 44 | }); 45 | }, 46 | 47 | reset: function () { 48 | var self = this; 49 | _.each(self.callbacks['reset'], function (cb) { 50 | cb(); 51 | }); 52 | } 53 | 54 | 55 | }); 56 | -------------------------------------------------------------------------------- /packages/accounts-ui-unstyled/login_buttons_single.html: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 29 | 30 | -------------------------------------------------------------------------------- /examples/unfinished/controls/client/controls.js: -------------------------------------------------------------------------------- 1 | var SPEW = function(str) { 2 | SPEW.lines.push(str); 3 | // use counter to signal invalidation 4 | Session.set("SPEW_V", (Session.get("SPEW_V") || 0)+1); 5 | }; 6 | SPEW.lines = []; 7 | 8 | Template.radios.events = { 9 | 'change input': function(event) { 10 | //SPEW("change "+event.target.value); 11 | if (event.target.checked) { 12 | Session.set("current_band", event.target.value); 13 | } 14 | } 15 | }; 16 | 17 | Template.radios.current_band = function() { 18 | return Session.get("current_band"); 19 | }; 20 | 21 | Template.radios.band_checked = function(b) { 22 | return Session.equals("current_band", b) ? 23 | 'checked="checked"' : ''; 24 | }; 25 | 26 | Template.checkboxes.events = { 27 | 'change input': function(event) { 28 | Session.set("dst", event.target.checked); 29 | } 30 | }; 31 | 32 | Template.checkboxes.dst_checked = function() { 33 | return Session.get("dst") ? 'checked="checked"' : ''; 34 | }; 35 | 36 | Template.checkboxes.dst = function() { 37 | return Session.get("dst") ? 'Yes' : 'No'; 38 | }; 39 | 40 | Template.spew.lines = function() { 41 | Session.get("SPEW_V"); 42 | return SPEW.lines; 43 | }; 44 | -------------------------------------------------------------------------------- /packages/test-helpers/event_simulation.js: -------------------------------------------------------------------------------- 1 | simulateEvent = function (node, event, args) { 2 | node = (node instanceof $ ? node[0] : node); 3 | 4 | if (document.createEvent) { 5 | var e = document.createEvent("Event"); 6 | e.initEvent(event, true, true); 7 | _.extend(e, args); 8 | node.dispatchEvent(e); 9 | } else { 10 | var e = document.createEventObject(); 11 | _.extend(e, args); 12 | node.fireEvent("on" + event, e); 13 | } 14 | }; 15 | 16 | focusElement = function(elem) { 17 | // This sequence is for benefit of IE 8 and 9; 18 | // test there before changing. 19 | window.focus(); 20 | elem.focus(); 21 | elem.focus(); 22 | 23 | // focus() should set document.activeElement 24 | if (document.activeElement !== elem) 25 | throw new Error("focus() didn't set activeElement"); 26 | }; 27 | 28 | blurElement = function(elem) { 29 | elem.blur(); 30 | if (document.activeElement === elem) 31 | throw new Error("blur() didn't affect activeElement"); 32 | }; 33 | 34 | clickElement = function(elem) { 35 | if (elem.click) 36 | elem.click(); // supported by form controls cross-browser; most native way 37 | else 38 | simulateEvent(elem, 'click'); 39 | }; 40 | -------------------------------------------------------------------------------- /packages/domutils/domutils_tests.js: -------------------------------------------------------------------------------- 1 | Tinytest.add("domutils - setElementValue", function (test) { 2 | var div = OnscreenDiv(); 3 | div.node().appendChild(DomUtils.htmlToFragment( 4 | (""))); 6 | 7 | var select = DomUtils.find(div.node(), 'select'); 8 | test.equal(DomUtils.getElementValue(select), "Quux"); 9 | _.each(["Foo", "Bar", "Quux"], function (value) { 10 | DomUtils.setElementValue(select, value); 11 | test.equal(DomUtils.getElementValue(select), value); 12 | }); 13 | 14 | div.kill(); 15 | }); 16 | 17 | Tinytest.add("domutils - form id expando", function (test) { 18 | // See https://github.com/meteor/meteor/issues/604 19 | 20 | var div = OnscreenDiv(); 21 | div.node().appendChild(DomUtils.htmlToFragment( 22 | ('
'))); 23 | var theInput = DomUtils.find(div.node(), 'input'); 24 | var theForm = theInput.parentNode; 25 | var theDiv = theForm.parentNode; 26 | 27 | // test that this call doesn't throw an exception 28 | test.equal(DomUtils.matchesSelector(theForm, theDiv, 'form'), true); 29 | 30 | div.kill(); 31 | }); 32 | -------------------------------------------------------------------------------- /packages/accounts-google/google_login_button.css: -------------------------------------------------------------------------------- 1 | #login-buttons-image-google { 2 | background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAADCklEQVQ4jSXSy2ucVRjA4d97zvdNJpPJbTJJE9rYaCINShZtRCFIA1bbLryBUlyoLQjqVl12W7UbN4qb1gtuYhFRRBCDBITaesFbbI3RFBLSptEY05l0ZjLfnMvrov/Bs3gAcF71x6VVHTk+o8nDH+hrH89rUK9Z9Yaen57S3wVtGaMBNGC0IegWKIDxTtVaOHVugZVmH3HX3Zz+4l+W1xvkOjuZfPsspY4CNkZELEgEIJKwYlBjEwjec/mfCMVuorVs76R8+P0KYMmP30U2dT8eIZqAR2ipRcWjEYxGSCRhV08e04oYMoxYLi97EI9YCJ0FHBYbIVGDlUBLwRlLIuYW6chEmQt/rJO09RJjhjEJEYvJYGNhkbUhw43OXtIWDFRq9G87nAaSK6sVRm8r8fzRMWbOX2Xx7ypd7ZET03sQhDOz73DqSJOrd+7HSo4QIu0Nx/4rOzx+cRXZ9+z7+uqJ+3hiepxK3fHZT2tMjXYzOtzL6dmznPzhLexgN0QlxAAYxAlqUqRmkf5j59RlNQ6MFHhgcpCTTx8EUb5e+plD7x4jjg1ANCAgrRQAdR7xKXjBlGyLYi7PxaUmb8z8xcpGHVXLHaXdjI0egKyJiQYTEhSPREVIEUBNC+Mqm+xpz3j0njLPHB2nsh1QgeG+IS48dYbD5YNoo0ZUAbVEuTUoKuBSZOarX/WhyQn6eg2+usDWf0s0tq8zNPYk+WI/Lnge++hlvlyfQ3NdECzGRWKwEEA0qNY251n69kV6+Y0kbaCZoebG2X3oU7pKoyxuXOPe945zs9DCeosGIXoBDyaLdf6ce4Hbk+/Y299ksKtAuaeNsiyw8c1LKIZ95b0MdgxA5giixACpTxEPSau6QdFfI5/2cLPmEW+JAQrtJUJzDXF1dkwHzVodJMX4HFEcQQMaFdPeM0Jb/4PUtzzaLKAhRyJFwo6lbegRNFfk819muV5dR4JBQoQdQ2xFiDmSNDHiaptamR9Gq5cQ18AledrGDpOfeI5Lq8u88smbhMRisoSAgAYghdfn5H/JkHuRZ1owLAAAAABJRU5ErkJggg==); 3 | } 4 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/control: -------------------------------------------------------------------------------- 1 | Source: meteor 2 | Section: web 3 | Priority: extra 4 | Maintainer: Meteor Deb Packager 5 | Build-Depends: debhelper (>= 8.0.0) 6 | Standards-Version: 3.9.2 7 | Homepage: http://meteor.com 8 | Vcs-Git: git://github.com/meteor/meteor.git 9 | 10 | Package: meteor 11 | Architecture: any 12 | Depends: ${shlibs:Depends}, ${misc:Depends} 13 | Description: A platform for building HTML5 websites in JavaScript. 14 | Database Everywhere: Use the same database APIs on the client that you already use on the server. Thanks to latency compensation, client-side reads and writes can be served from a cache - no waiting on the network. 15 | . 16 | Realtime is the Default: When one user writes to the database, if any other users are looking at that same data, their screens can update automatically. It's like Etherpad for structured data. 17 | . 18 | Smart Packages: Meteor's Packages are actually little programs that can inject code into the client or the server, or even hook into the bundler to preprocess your source. 19 | . 20 | Instant Deployment: Type meteor deploy and your app is live on the internet. It's so easy to share works in progress, or to let others fork your app and collaborate. 21 | -------------------------------------------------------------------------------- /packages/accounts-meetup/meetup_client.js: -------------------------------------------------------------------------------- 1 | Meteor.loginWithMeetup = function (options, callback) { 2 | // support both (options, callback) and (callback). 3 | if (!callback && typeof options === 'function') { 4 | callback = options; 5 | options = {}; 6 | } 7 | 8 | var config = Accounts.loginServiceConfiguration.findOne({service: 'meetup'}); 9 | if (!config) { 10 | callback && callback(new Accounts.ConfigError("Service not configured")); 11 | return; 12 | } 13 | var state = Random.id(); 14 | 15 | var scope = (options && options.requestPermissions) || []; 16 | var flatScope = _.map(scope, encodeURIComponent).join('+'); 17 | 18 | var loginUrl = 19 | 'https://secure.meetup.com/oauth2/authorize' + 20 | '?client_id=' + config.clientId + 21 | '&response_type=code' + 22 | '&scope=' + flatScope + 23 | '&redirect_uri=' + Meteor.absoluteUrl('_oauth/meetup?close') + 24 | '&state=' + state; 25 | 26 | // meetup box gets taller when permissions requested. 27 | var height = 620; 28 | if (_.without(scope, 'basic').length) 29 | height += 130; 30 | 31 | Accounts.oauth.initiateLogin(state, loginUrl, callback, 32 | {width: 900, height: height}); 33 | }; 34 | -------------------------------------------------------------------------------- /scripts/admin/publish-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -u 4 | cd `dirname $0` 5 | DIR="$(pwd)" 6 | METEOR_DIR="$(pwd)/../.." 7 | 8 | if [ $# -gt 2 ]; then 9 | echo "usage: publish-release.sh [GIT-REV [RELEASE-NAME]]" 10 | exit 1 11 | fi 12 | 13 | if [ $# -lt 1 ]; then 14 | GIT_SHA="$(git rev-parse HEAD)" 15 | else 16 | GIT_SHA="$(git rev-parse "$1")" 17 | fi 18 | 19 | if [ $# -lt 2 ]; then 20 | RELEASE_NAME="$GIT_SHA" 21 | else 22 | RELEASE_NAME="$2" 23 | fi 24 | 25 | # prepare settings file with git sha of last commit 26 | PUBLISH_TMPDIR=$(mktemp -d -t meteor-publish-release-XXXXXXXX) 27 | cat > "$PUBLISH_TMPDIR/settings.json" < (array of contents) 8 | 9 | Email.send = function (options) { 10 | var to = options.to; 11 | if (to.indexOf('intercept') === -1) { 12 | oldEmailSend(options); 13 | } else { 14 | if (!interceptedEmails[to]) 15 | interceptedEmails[to] = []; 16 | 17 | interceptedEmails[to].push(options.text); 18 | } 19 | }; 20 | 21 | Meteor.methods({ 22 | getInterceptedEmails: function (email) { 23 | check(email, String); 24 | return interceptedEmails[email]; 25 | }, 26 | 27 | addEmailForTestAndVerify: function (email) { 28 | check(email, String); 29 | Meteor.users.update( 30 | {_id: this.userId}, 31 | {$push: {emails: {address: email, verified: false}}}); 32 | Accounts.sendVerificationEmail(this.userId, email); 33 | }, 34 | 35 | createUserOnServer: function (email) { 36 | check(email, String); 37 | var userId = Accounts.createUser({email: email}); 38 | Accounts.sendEnrollmentEmail(userId); 39 | return Meteor.users.findOne(userId); 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /packages/meteor/dynamics_browser.js: -------------------------------------------------------------------------------- 1 | // Simple implementation of dynamic scoping, for use in browsers 2 | 3 | var nextSlot = 0; 4 | var currentValues = []; 5 | 6 | Meteor.EnvironmentVariable = function () { 7 | this.slot = nextSlot++; 8 | }; 9 | 10 | _.extend(Meteor.EnvironmentVariable.prototype, { 11 | get: function () { 12 | return currentValues[this.slot]; 13 | }, 14 | 15 | withValue: function (value, func) { 16 | var saved = currentValues[this.slot]; 17 | try { 18 | currentValues[this.slot] = value; 19 | var ret = func(); 20 | } finally { 21 | currentValues[this.slot] = saved; 22 | } 23 | return ret; 24 | } 25 | }); 26 | 27 | Meteor.bindEnvironment = function (func, onException, _this) { 28 | // needed in order to be able to create closures inside func and 29 | // have the closed variables not change back to their original 30 | // values 31 | var boundValues = _.clone(currentValues); 32 | 33 | if (!onException) 34 | throw new Error("onException must be supplied"); 35 | 36 | return function (/* arguments */) { 37 | var savedValues = currentValues; 38 | try { 39 | currentValues = boundValues; 40 | var ret = func.apply(_this, _.toArray(arguments)); 41 | } catch (e) { 42 | onException(e); 43 | } finally { 44 | currentValues = savedValues; 45 | } 46 | return ret; 47 | }; 48 | }; 49 | -------------------------------------------------------------------------------- /scripts/admin/notices.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "release": "0.6.0", 4 | "notices": [ 5 | "Variables declared with `var` at the outermost level of a JavaScript", 6 | "source file are now private to that file. Remove the `var` to share", 7 | "a value between files." 8 | ] 9 | }, 10 | { 11 | "release": "0.6.1" 12 | }, 13 | { 14 | "release": "0.6.2", 15 | "packageNotices": { 16 | "d3": ["The d3 package has been upgraded to 3.1.4. See ", 17 | "https://github.com/mbostock/d3/wiki/Upgrading-to-3.0"] 18 | } 19 | }, 20 | { 21 | "release": "0.6.2.1" 22 | }, 23 | { 24 | "release": "0.6.3", 25 | "packageNotices": { 26 | "coffeescript": ["CoffeeScript has been updated to 1.6.2 from 1.5.0. See", 27 | "http://coffeescript.org/#changelog"], 28 | "localstorage-polyfill": [ 29 | "The localstorage-polyfill package has been replaced by the localstorage", 30 | "package, which creates an object at Meteor._localStorage instead of", 31 | "pretending to be window.localStorage."], 32 | "http": [ 33 | "When using the `http` package synchronously on the server, errors", 34 | "are now thrown rather than passed in `result.error`."] 35 | } 36 | }, 37 | { 38 | "release": "0.6.3.1" 39 | }, 40 | { 41 | "release": "NEXT" 42 | } 43 | ] 44 | -------------------------------------------------------------------------------- /tools/tests/test_bundler.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// global helpers that are useful for test_bundler_*.js 3 | /// 4 | /*global*/ path = require('path'); 5 | /*global*/ fs = require('fs'); 6 | /*global*/ files = require(path.join(__dirname, '..', 'files.js')); 7 | /*global*/ bundler = require(path.join(__dirname, '..', 'bundler.js')); 8 | /*global*/ _ = require('underscore'); 9 | /*global*/ assert = require('assert'); 10 | /*global*/ Fiber = require('fibers'); 11 | /*global*/ Future = require('fibers/future'); 12 | 13 | var tmpBaseDir = files.mkdtemp('test_bundler'); 14 | var tmpCounter = 1; 15 | var lastTmpDir; 16 | /*global*/ tmpDir = function () { 17 | lastTmpDir = path.join(tmpBaseDir, "" + (tmpCounter++) /* path.join likes string, not numbers */); 18 | files.mkdir_p(lastTmpDir); 19 | return lastTmpDir; 20 | }; 21 | 22 | Fiber(function () { 23 | try { 24 | // print calls to `npm` 25 | require(path.join(__dirname, '..', 'meteor_npm.js'))._printNpmCalls = true; 26 | 27 | /// RUN TESTS 28 | require(path.join(__dirname, 'test_bundler_options.js')); 29 | require(path.join(__dirname, 'test_bundler_npm.js')); 30 | } catch (err) { 31 | // print stack track and exit with error code if an assertion fails 32 | console.log(err.stack); 33 | console.log(); 34 | console.log('Bundle can be found at ' + lastTmpDir); 35 | process.exit(1); 36 | }; 37 | }).run(); 38 | 39 | 40 | -------------------------------------------------------------------------------- /packages/test-helpers/wrappedfrag.js: -------------------------------------------------------------------------------- 1 | // A WrappedFrag provides utility methods pertaining to a given 2 | // DocumentFragment that are helpful in tests. For example, 3 | // WrappedFrag(frag).html() constructs a sort of cross-browser 4 | // innerHTML for the fragment. 5 | 6 | // Constructor, with optional 'new': 7 | // var f = [new] WrappedFrag([frag]) 8 | WrappedFrag = function(frag) { 9 | if (! (this instanceof WrappedFrag)) 10 | return new WrappedFrag(frag); 11 | 12 | this.frag = frag; 13 | }; 14 | 15 | WrappedFrag.prototype.rawHtml = function() { 16 | return DomUtils.fragmentToHtml(this.frag); 17 | }; 18 | 19 | WrappedFrag.prototype.html = function() { 20 | return canonicalizeHtml(this.rawHtml()); 21 | }; 22 | 23 | WrappedFrag.prototype.hold = function() { 24 | // increments frag's GC protection reference count 25 | this.frag["_protect"] = (this.frag["_protect"] || 0) + 1; 26 | return this; 27 | }; 28 | 29 | WrappedFrag.prototype.release = function() { 30 | var frag = this.frag; 31 | // decrement frag's GC protection reference count 32 | // Clean up on flush, if hits 0. Wait to decrement 33 | // so no one else cleans it up first. 34 | Deps.afterFlush(function () { 35 | if (! --frag["_protect"]) { 36 | Spark.finalize(frag); 37 | } 38 | }); 39 | return this; 40 | }; 41 | 42 | WrappedFrag.prototype.node = function() { 43 | return this.frag; 44 | }; 45 | -------------------------------------------------------------------------------- /packages/code-prettify/lang-n.js: -------------------------------------------------------------------------------- 1 | var a=null; 2 | PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/, 3 | a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/, 4 | a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]); 5 | -------------------------------------------------------------------------------- /scripts/admin/upgrade-to-engine/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5 2 | Upstream-Name: meteor 3 | Source: http://meteor.com 4 | 5 | Files: * 6 | Copyright: 2012 Meteor Deb Packager 7 | License: MIT 8 | 9 | License: MIT 10 | Copyright (C) 2011--2012 Meteor Development Group 11 | . 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | . 20 | The above copyright notice and this permission notice shall be included 21 | in all copies or substantial portions of the Software. 22 | . 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 26 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 27 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 28 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 29 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | -------------------------------------------------------------------------------- /examples/unfinished/azrael/client/azrael.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | {{> center_pane }} 5 |
6 |
East
7 |
8 | {{> room_list}} 9 | {{> add_room}} 10 |
11 |
Azrael
12 | 13 | 14 | 15 | 22 | 23 | 28 | 29 | 39 | 40 | 56 | 57 | 62 | -------------------------------------------------------------------------------- /scripts/admin/build-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -u 5 | 6 | # cd to top level dir 7 | cd `dirname $0` 8 | cd ../.. 9 | TOPDIR=$(pwd) 10 | 11 | OUTDIR="$TOPDIR/dist" 12 | rm -rf "$OUTDIR" 13 | mkdir -p "$OUTDIR" 14 | 15 | UNAME=$(uname) 16 | ARCH=$(uname -m) 17 | export PLATFORM="${UNAME}_${ARCH}" 18 | 19 | # Node, in its infinite wisdom, creates some hard links in some of its binary 20 | # output (eg, kexec.node). These hard links are across directories. Some 21 | # filesystems (eg, AFS) don't support hard links across directories, so make 22 | # sure that on Linux, our tarballs don't have hard links. (Why only on Linux? 23 | # Because neither /usr/bin/tar nor /usr/bin/gnutar on Mac appear to have this 24 | # flag or an equivalent. And we don't care too much about AFS support on Mac 25 | # anyway.) 26 | if [ "$UNAME" = "Linux" ]; then 27 | TAR="tar --hard-dereference" 28 | else 29 | TAR=tar 30 | fi 31 | export TAR 32 | 33 | 34 | scripts/admin/build-tools-tarballs.sh 35 | TOOLS_VERSION=$(cat "$TOPDIR/.tools_version") 36 | scripts/admin/build-package-tarballs.sh 37 | MANIFEST_PACKAGE_CHUNK=$(cat "$TOPDIR/.package_manifest_chunk") 38 | 39 | # don't keep these around since they get outdated 40 | rm "$TOPDIR/.tools_version" 41 | rm "$TOPDIR/.package_manifest_chunk" 42 | 43 | cat > "$OUTDIR/release.json" <