├── Site Mechanics.md ├── WebKit Browsers.md ├── OSI Model Network Layer.md ├── OSI Model Physical Layer.md ├── OSI Model Data-Link Layer.md ├── OSI Model Transport Layer.md ├── OSI Model Application Layer.md ├── OSI Model Presentation Layer.md ├── _book ├── .gitignore └── gitbook │ ├── images │ └── favicon.ico │ ├── fonts │ ├── helvetica │ │ ├── normal.eot │ │ ├── normal.ttf │ │ ├── normal.woff │ │ ├── ultralight.eot │ │ ├── ultralight.ttf │ │ ├── ultralight.woff │ │ └── normal.svg │ └── fontawesome │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ ├── jsrepl │ ├── sandbox.html │ ├── langs │ │ └── javascript │ │ │ └── jsrepl_js.js │ ├── engines │ │ └── javascript-default.js │ ├── sandbox.js │ └── jsrepl.js │ └── print.css ├── Meteor Style Guide.md ├── .gitattributes ├── Reserved Words.md ├── README.md ├── Quickstart.md ├── Video IO.md ├── Punctuation.md ├── SUMMARY.md ├── File IO.md ├── Terminology.md ├── Writing Acceptance Tests.md ├── Installation.md ├── Syntax.md ├── Packages.md ├── File Structure.md ├── Refactoring with Test Driven Development.md ├── Namespacing.md ├── .gitignore ├── Development Tools.md ├── Site Configuration.md ├── Test Driven Development.md ├── Event Cycle.md ├── General Advice.md ├── App Structure.md ├── Console Logging.md ├── Dependencies.md ├── Cookbook Conventions.md ├── The Refactoring Process.md ├── OSI Model Data Layer.md └── WebStorm IDE.md /Site Mechanics.md: -------------------------------------------------------------------------------- 1 | # Site Mechanics 2 | -------------------------------------------------------------------------------- /WebKit Browsers.md: -------------------------------------------------------------------------------- 1 | # WebKit Browsers 2 | -------------------------------------------------------------------------------- /OSI Model Network Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Network Layer 2 | -------------------------------------------------------------------------------- /OSI Model Physical Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Physical Layer 2 | -------------------------------------------------------------------------------- /OSI Model Data-Link Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Data-Link Layer 2 | -------------------------------------------------------------------------------- /OSI Model Transport Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Transport Layer 2 | -------------------------------------------------------------------------------- /OSI Model Application Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Application Layer 2 | -------------------------------------------------------------------------------- /OSI Model Presentation Layer.md: -------------------------------------------------------------------------------- 1 | # OSI Model Presentation Layer 2 | -------------------------------------------------------------------------------- /_book/.gitignore: -------------------------------------------------------------------------------- 1 | ################ 2 | ##Brackets Gitbook Editing 3 | ################ 4 | *.html 5 | *.json 6 | -------------------------------------------------------------------------------- /Meteor Style Guide.md: -------------------------------------------------------------------------------- 1 | # Meteor Style Guide 2 | 3 | See: https://github.com/meteor/meteor/wiki/Meteor-Style-Guide 4 | -------------------------------------------------------------------------------- /_book/gitbook/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/images/favicon.ico -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/normal.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/normal.eot -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/normal.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/normal.ttf -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/normal.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/ultralight.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/ultralight.eot -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/ultralight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/ultralight.ttf -------------------------------------------------------------------------------- /_book/gitbook/fonts/helvetica/ultralight.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/helvetica/ultralight.woff -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mcrayne/MeteorCookbookGitbook/HEAD/_book/gitbook/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /_book/gitbook/jsrepl/sandbox.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jsREPL Sandbox 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /_book/gitbook/jsrepl/langs/javascript/jsrepl_js.js: -------------------------------------------------------------------------------- 1 | (function(){self.JSREPLEngine=function(){function a(d,b,c,a,e,f){this.result=c;this.error=a;this.sandbox=e;this.inspect=this.sandbox.console.inspect;this.functionClass=this.sandbox.Function;this.sandbox.__eval=this.sandbox.eval;f()}a.prototype.Eval=function(d){var b;try{return b=this.sandbox.__eval(d),this.result(b===void 0?"":this.inspect(b))}catch(a){return this.error(a)}};a.prototype.RawEval=function(a){var b;try{return b=this.sandbox.__eval(a),this.result(b)}catch(c){return this.error(c)}};a.prototype.GetNextLineIndent= 2 | function(a){try{return new this.functionClass(a),false}catch(b){return/[\[\{\(]$/.test(a)?1:0}};return a}()}).call(this); 3 | -------------------------------------------------------------------------------- /Reserved Words.md: -------------------------------------------------------------------------------- 1 | ## Reserved Keywords 2 | 3 | 4 | Be careful about using the following reserved keywords. Meteor integrates a number of packages and libraries which extend the Javascript reserved keyword list. Between Mongo and the Spark templates, people have reported having problems when using the following keywords in their applications. 5 | 6 | ```` 7 | name 8 | length 9 | assets 10 | template 11 | match 12 | stats 13 | content 14 | ```` 15 | 16 | And some relevant links for people who would like to know more: 17 | 18 | Template.foo.name 19 | https://github.com/meteor/meteor/issues/703 20 | 21 | collection.insert({ owner: Meteor.userId(), length:3 }); 22 | https://github.com/meteor/meteor/issues/594#issuecomment-15441895 23 | 24 | content 25 | https://groups.google.com/forum/#!topic/meteor-talk/N4C6ZRv6zb8 26 | -------------------------------------------------------------------------------- /_book/gitbook/print.css: -------------------------------------------------------------------------------- 1 | h1,h2{page-break-after:avoid;page-break-before:auto}pre,blockquote{border:1px solid #999;page-break-inside:avoid}img{max-width:100%!important;page-break-inside:avoid}section{page-break-after:always}section#cover{padding:3cm 0;text-align:center}section#cover h1{font-size:1.5cm}section#summary{text-align:center}section#summary ul{font-size:.5cm;line-height:1.8em;padding:0;margin:0;list-style:none}section#summary>ul>li{margin-bottom:1cm}section#summary>ul>li>a{font-size:.6cm}section article{margin:1.5cm}section article.new-chapter{page-break-after:always;font-size:.6cm;text-align:center;padding:3cm 0;border-top:1px solid #ccc}@media print{section article.new-chapter{border:0}}section article .exercise{margin:1cm 0;padding:.4cm;page-break-inside:avoid;border:3px solid #ddd}section article .exercise .exercise-header{margin-bottom:.4cm;padding-bottom:.2cm;border-bottom:1px solid #ddd} 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ##Meteor Cookbook 2 | 3 | Welcome to the Meteor Cookbook; a FAQ and tutorial culled and currated from over 12 months of emails and discussions from the [Meteor Talk](https://groups.google.com/forum/#!forum/meteor-talk) google group and my experiences rolling out packages and apps. 4 | 5 | These documents are intended for the intermediate user learning Meteor, who is accustomed to 6 | 7 | - object-oriented frameworks and languages, such as Java and C#, and 8 | - relational databases and data structures derived from SQL table schemas. 9 | 10 | The focus is on helping the user grow accustomed to functional programming using document oriented databases. 11 | 12 | The original work for this can be found on [Abigail Watson's](https://github.com/awatson1978) Github [repo](https://github.com/awatson1978/meteor-cookbook). Abigail is the author of the content, I have reorganized this content to fit easily into the GitBook format. 13 | -------------------------------------------------------------------------------- /Quickstart.md: -------------------------------------------------------------------------------- 1 | ## Meteor Quickstart Installation 2 | **Q: Why can't I run start my Meteor app?** 3 | 4 | This quickstart is written for Mac OSX, and is a bit more verbose than other installation instructions. It should hopefully cover a few edge cases, such as setting your path, which can cause an installation to go awry. 5 | 6 | ````sh 7 | # install meteor 8 | curl https://install.meteor.com | sh 9 | 10 | # check it's installed correctly 11 | meteor --version 12 | 13 | # install node and npm 14 | curl http://npmjs.org/install.sh | sh 15 | 16 | # check npm is installed correctly 17 | npm -version 18 | 19 | # find your npm path 20 | which npm 21 | 22 | # make sure npm is in your path 23 | sudo nano ~/.profile 24 | export PATH=$PATH:/usr/local/bin 25 | 26 | # install meteorite 27 | npm install -g meteorite 28 | 29 | # and if you have problems with permissions 30 | sudo -H npm install -g meteorite 31 | 32 | # check mrt is installed correctly 33 | mrt --version 34 | 35 | # find your mrt path 36 | which mrt 37 | locate mrt 38 | 39 | # make sure meteorite is in your path 40 | sudo nano ~/.profile 41 | export PATH=$PATH:/usr/local/share/npm/bin 42 | 43 | # check mrt is installed correctly 44 | mrt --version 45 | ```` 46 | -------------------------------------------------------------------------------- /Video IO.md: -------------------------------------------------------------------------------- 1 | ## Video.IO 2 | 3 | So, Video Input/Output can mean a couple different things. And they both revolve around the concept of [Double Buffering](http://en.wikipedia.org/wiki/Multiple_buffering). Take an embedded YouTube video, as an example. There's the video stream which is served by YouTube and has a specific URL. But then, the browser will combine that video with the page elements from the rest of the webpage, add some Chrome such as the URL bar, tabs, and window controls, and render a new video stream. It's **that** second video stream that eventually gets rendered to your computer screen. 4 | 5 | 6 | ### Video Stream Buffers 7 | There's also the OpenTok framework, which a few different groups have used to make video solutions with. 8 | http://tokbox.com/opentok 9 | 10 | 11 | ### Browser Video Buffer 12 | Watch these videos for the future of Meteor video.io. Specifically, Newcomb talks about getAnimationFrame() functions as being the secret to getting 60fps DOM refresh rates. 13 | 14 | http://www.youtube.com/watch?v=83MX4wsoMzU 15 | https://www.youtube.com/watch?v=br1NhXeVD6Y 16 | https://www.youtube.com/watch?v=ixASZtHYGKY 17 | https://www.youtube.com/watch?v=zpebYhm8f2o 18 | https://www.youtube.com/watch?v=OhfI2wFNKFQ 19 | -------------------------------------------------------------------------------- /Punctuation.md: -------------------------------------------------------------------------------- 1 | ## Grammar 2 | 3 | **Semicolons** 4 | Obviously, everybody has their own opinions about grammar, and the Javascript specification (ECMA5 whatever) says that semicolons are optional. Fair enough. But here's a reason to use semicolons: eventmaps. 5 | 6 | ````js 7 | // eventmap will fail 8 | Template.topicsPage.events({ 9 | 'click .button':function(){ 10 | console.count('initialize-rooms') // note the missing semicolon 11 | } 12 | }) 13 | 14 | // eventmap will run correctly 15 | Template.topicsPage.events({ 16 | 'click .button':function(){ 17 | console.count('initialize-rooms'); 18 | } 19 | }) 20 | 21 | ```` 22 | 23 | **Variable and Function Names** 24 | Speaking of global contexts, when you bring variables into the global scope, err on the side of verbose names. A rule-of-thumb I use is any varible in the local scope should be at least 6 characters long. 25 | 26 | ````js 27 | // bad! creates unreadable code 28 | var f = 0; 29 | 30 | // still too short 31 | var foo = 0; 32 | 33 | // much better! 34 | fooCount = 0; 35 | 36 | // ideal 37 | currentFooIndex = 0; 38 | ```` 39 | 40 | The reason behind wanting to use long variable names has to do with the entropic information density of longer strings, which leads to less name collissions. This is particularly useful when refactoring. Sometimes you'll want to do a global Find And Replace on just 'foo' elements, or just 'count' elements, or just 'current' elements, etc. Having long names will help in refactoring, and prevent name collisions. Short, concise names are prone to causing name collisions. Also this rule-of-thumb about name lengths applies to function names too. 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [Cookbook Conventions](Cookbook Conventions.md) 4 | * [General Advice](General Advice.md) 5 | * [Meteor Style Guide](Meteor Style Guide.md) 6 | * [Terminology](Terminology.md) 7 | * [Syntax](Syntax.md) 8 | * [Punctuation](Punctuation.md) 9 | * [Reserved Words](Reserved Words.md) 10 | * [Installation](Installation.md) 11 | * [Quickstart](Quickstart.md) 12 | * [Development Tools](Development Tools.md) 13 | * [WebStorm IDE](WebStorm IDE.md) 14 | * [Test Driven Development](Test Driven Development.md) 15 | * [The Refactoring Process](The Refactoring Process.md) 16 | * [Refactoring with Test Driven Development](Refactoring with Test Driven Development.md) 17 | * [Writing Acceptance Tests](Writing Acceptance Tests.md) 18 | * [Site Mechanics](Site Mechanics.md) 19 | * [File Structure](File Structure.md) 20 | * [Dependencies](Dependencies.md) 21 | * [App Structure](App Structure.md) 22 | * [Event Cycle](Event Cycle.md) 23 | * [Namespacing](Namespacing.md) 24 | * [Packages](Packages.md) 25 | * [Site Configuration](Site Configuration.md) 26 | * [OSI Model Physical Layer](OSI Model Physical Layer.md) 27 | * [OSI Model Data-Link Layer](OSI Model Data-Link Layer.md) 28 | * [Console Logging](Console Logging.md) 29 | * [WebKit Browsers](WebKit Browsers.md) 30 | * [File IO](File IO.md) 31 | * [Video IO](Video IO.md) 32 | * [OSI Model Network Layer](OSI Model Network Layer.md) 33 | * [OSI Model Transport Layer](OSI Model Transport Layer.md) 34 | * [OSI Model Data Layer](OSI Model Data Layer.md) 35 | * [OSI Model Presentation Layer](OSI Model Presentation Layer.md) 36 | * [OSI Model Application Layer](OSI Model Application Layer.md) 37 | 38 | -------------------------------------------------------------------------------- /File IO.md: -------------------------------------------------------------------------------- 1 | ## File Input/Output 2 | For when you need to read and parse a file on the server disk drive. Useful for persistent data-drops and initialization files. Be careful, as this solution doens't scale horizontally. So be sure that you're using a shared-nothing architecture. 3 | 4 | ````js 5 | // Asynchronous Method. 6 | Meteor.startup(function () { 7 | console.log('starting up'); 8 | 9 | var fs = Npm.require('fs'); 10 | fs.readFile('file.json', 'utf8', function (err, data) { 11 | if (err) { 12 | console.log('Error: ' + err); 13 | return; 14 | } 15 | 16 | data = JSON.parse(data); 17 | console.log(data); 18 | }); 19 | }); 20 | 21 | 22 | // Synchronous Method. 23 | Meteor.startup(function () { 24 | var fs = Npm.require('fs'); 25 | var data = fs.readFileSync('public/datafile/flare.json', 'utf8'); 26 | 27 | if (Icd10.find().count() === 0) { 28 | Icd10.insert({ 29 | date: new Date(), 30 | data: JSON.parse(data) 31 | }); 32 | } 33 | }); 34 | ```` 35 | 36 | ## BindEnvironment Example 37 | 38 | Sometimes you need to run some expensive functions while reading from Disk or Network. If you find yourself running into IO problems, and suspect you're having fibers or sync/async problems, try using Meteor.bindEnvironment. 39 | ````js 40 | Meteor.methods({ 41 | convertFileToRecord: function(postId) { 42 | if(postId) { 43 | expensiveObject.ioIntensiveFunction(null, Meteor.bindEnvironment(function(result) { 44 | Posts.update({_id: postId}, {$set: {text: result}}); 45 | console.log(result); 46 | return result; 47 | }, function(err) { 48 | console.error(err.message); 49 | return err.message; 50 | })); 51 | }else{ 52 | return 'no postId'; 53 | } 54 | } 55 | }); 56 | ```` 57 | 58 | 59 | -------------------------------------------------------------------------------- /Terminology.md: -------------------------------------------------------------------------------- 1 | ## Terminology 2 | **Q: How do I use DDP instead of a REST API with an ORM? Is that ACID compliant?** 3 | 4 | Luckily, Meteor has been fairly good about not using too many acronyms. But there are a few concept which you might not have run across, depending on your background, and how you came to Meteor. Here are a few relevant acronyms which people ask about from time to time... 5 | 6 | **ACID - Atomicity, Consistency, Isolation, Durability** 7 | Generally speaking, when Meteor folks talk about ACID, they're talking about the fact that Mongo doesn't support traditional database transactions; they're not talking about the Acid2 browser compatibility tests. 8 | 9 | **DDP - Distributed Data Protocol** 10 | This is simply the protocol that enables the Meteor.publish() and Meteor.subscribe() methods. It does all the heavy lifting of data communications between the server and client. 11 | http://meteor.com/blog/2012/03/21/introducing-ddp 12 | 13 | **DDS - Data Distribution Service** 14 | A data distribution protocol that has nothing to do with Meteor. It just happens to be named very similarly to DDP. 15 | http://en.wikipedia.org/wiki/Data_distribution_service 16 | 17 | **MDG - Meteor Development Group** 18 | Nickname for the wonderful folks who brought us Meteor. 19 | 20 | **ORM - Object Relation Mapper** 21 | Something that the Meteor community doesn't like, related to SQL databases. Most SQL table structures are designed with a Don't Repeat Yourself (DRY) principle, and create tables that isolate data so it's only entered into the database a single time. This process is called normalization, and results in data tables that don't represent the data objects that are typically used in the application itself. Thus, a layer is added above the database, which translates the normalized data into usable data objects for the application. This mapping layer is the cause of countless problems, and is something Meteor has been architected without. 22 | http://www.codinghorror.com/blog/2006/06/object-relational-mapping-is-the-vietnam-of-computer-science.html 23 | http://blogs.tedneward.com/PermaLink,guid,33e0e84c-1a82-4362-bb15-eb18a1a1d91f.aspx 24 | http://nedbatchelder.com/blog/200606/the_vietnam_of_computer_science.html 25 | 26 | **REST - Representation State Transfer** 27 | When people talk about REST interfaces, they're talking about GET, POST, PUT, and DELETE commands that web browsers use to request data from a server. 28 | https://en.wikipedia.org/wiki/Representational_state_transfer 29 | http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Writing Acceptance Tests.md: -------------------------------------------------------------------------------- 1 | ## Writing Acceptance Tests 2 | 3 | #### Business Use Cases and Regulatory Requirements 4 | It's very convenient to begin writing your acceptance tests by looking at the business use cases and regulatory obligations. Behavior Driven Develop (BDD) is very convenient for this. The following example shows the process of converting a Business Feature into a use case and testing scenario. 5 | 6 | ````feature 7 | Feature: Player score can be increased manually 8 | 9 | As a score keeper in some hyperthetical game 10 | I want to manually give a player five points 11 | So that I can publicly display a up-to-date scoreboard 12 | 13 | Scenario: Give 5 points to a player 14 | Given I authenticate 15 | And "Grace Hopper" has a score of 10 16 | When I give "Grace Hopper" 5 points 17 | Then "Grace Hopper" has a score of 15 18 | ```` 19 | 20 | 21 | #### Converting Use Cases into Tests 22 | Once you have your features, use cases, and scearios defined, begin translating them into acceptance tests, using CoffeeScript, jQuery, and Behavior Driven Development libraries, such as Chai. 23 | 24 | ````feature 25 | Feature: Player score can be increased manually 26 | 27 | As a score keeper in some hyperthetical game 28 | I want to manually give a player five points 29 | So that I can publicly display a up-to-date scoreboard 30 | 31 | Scenario: Give 5 points to a player 32 | Given I can connect to page "http://leaderboard.meteor.com" 33 | And "Grace Hopper" has a score of 10 34 | When $("#niftyWidgetButton").click() 35 | foo = $("#niftyWidgetText").val() 36 | Then foo.should.have.value(20) 37 | ```` 38 | 39 | #### Acceptance Tests Have 3 Essential Key Features 40 | Be aware that most all acceptance testing can be boiled down to three essential features: querying a resource, reading data, and writing data. When it comes to browsers and webpages, these three features basically boil down to the following: 41 | 42 | 1. Load a webpage or application view 43 | 2. Inspect user interface elements (i.e. DOM) 44 | 3. Trigger an event / simulate a user interaction 45 | 46 | 47 | Which, when translated to JQuery (and a bit of Chai), look something like this: 48 | ````js 49 | $(window).open("http://leaderboard.meteor.com"); 50 | $('#niftyWidgetButton').click(); 51 | $('#niftyWidgetText').val().should.have.value(20); 52 | ```` 53 | 54 | Sometimes, you'll want to adjust the timing of your tests, which is easily done by setting timeouts (in milliseconds). 55 | ````js 56 | $(window).open("http://leaderboard.meteor.com"); 57 | setTimeout(function(){ 58 | $('#niftyWidgetButton').click(); 59 | }, 200); 60 | setTimeout(function(){ 61 | $('#niftyWidgetText').val().should.have.value(20); 62 | }, 500); 63 | ```` 64 | -------------------------------------------------------------------------------- /Installation.md: -------------------------------------------------------------------------------- 1 | 2 | ## Installation & Uninstallation 3 | 4 | **Q: Is there a Homebrew installer for Mac OSX?** 5 | Unofficially, yes. It can be found here: 6 | https://gist.github.com/4317935 7 | 8 | ```` 9 | brew install https://gist.github.com/raw/4317935/05084353d3cd50acad7e88e01c3f6463b42c0ed3/meteor.rb 10 | ```` 11 | 12 | **Q: Is there an MSI installer for Windows?** 13 | Unofficially, yes. The last released version is 0.6.4.1. It can be found here: 14 | http://win.meteor.com/ 15 | 16 | **Q: When will Windows version become a first class citizen?** 17 | Not in the immediate future, as it's slated to be included after the 1.0 release. In the meantime, it's recommended to use a virtual machine for development. You can read the roadmap and relevant disscussions here: 18 | https://trello.com/card/official-windows-support/508721606e02bb9d570016ae/11 19 | https://github.com/meteor/meteor/issues/867 20 | 21 | **Q: Can Meteor run on Rasberry Pi?** 22 | Daaah... maybe? People seem to be working on it, but not much success yet. 23 | http://www.badgersblog.co.uk/2012/12/nodejs-raspberry-pi-tutorial-1.html 24 | https://groups.google.com/forum/#!msg/meteor-talk/CcXzU14EHH8/3wvB-d1RfaAJ 25 | 26 | 27 | **Q: How do I determine what version of Meteor is installed?** 28 | 29 | Use the ``--version`` flag! It's standard between Npm, Meteor, and Meteorite. 30 | ````sh 31 | npm --version 32 | meteor --version 33 | mrt --version 34 | ```` 35 | 36 | **Q: How do I run a specific version of Meteor?** 37 | 38 | Use the ``--release`` flag! 39 | ````js 40 | // for specifying meteor deployment target 41 | meteor update --release 0.6.5 42 | 43 | // for deployment 44 | meteor bundle --release 0.6.5 45 | ```` 46 | 47 | 48 | **Q: Should I install Npm with Node Version Manager?** 49 | That's really up to you. However, in my experience, it's been a bit more trouble than it's been worth. 50 | 51 | ````sh 52 | # to check what version of NVM is installed 53 | nvm ls 54 | ```` 55 | 56 | **Q: How do I install and use a development branch of Meteor?** 57 | There are two ways, depending if you're using meteor, or meteorite. If using meteor: 58 | 59 | ```` 60 | cd 61 | mkdir meteor.branchname 62 | cd meteor.branchname 63 | git clone https://github.com/username/meteor.git 64 | cd 65 | ~/meteor.branchname/meteor/meteor 66 | ```` 67 | 68 | And, if you're using mrt: 69 | ```` 70 | { 71 | "meteor": { 72 | "meteor.branch": "branchname", 73 | "git": "https://github.com/username/meteor.git" 74 | } 75 | } 76 | ```` 77 | **Q: How do I uninstall Meteor?** 78 | No need to run scripts. Just delete directories like so: 79 | ````js 80 | // the older location, pre 0.6.0 81 | sudo rm /usr/local/bin/meteor 82 | 83 | // the newer location, post 0.6.0 84 | sudo rm -rf ~/.meteor 85 | ```` 86 | 87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /Syntax.md: -------------------------------------------------------------------------------- 1 | ## Syntax 2 | **- the arrangement of words and phrases to create well-formed sentences in a language.** 3 | 4 | Language syntax doesn't have to be hard. But somehow it often is. Meteor makes language syntax a breeze, if you're willing to use a few particular patterns. 5 | 6 | ####Semantic HTML in Meteor 7 | Keep in mind that Meteor introduces the ``