These explanatory scripts, videos ( Jan 2016 ) and slideshows, will start your Meteor development infrastructure immediately with: package development, testing, documenting, logging, code style linting and continuous integration
Please note : You want to learn the most in the least time, right?
You will not find any fluff here. Every word is dedicated to helping you get the most out of the tutorial in the least time. In fact, to save you even more time, I generate code fragments, "on-the-fly", employing a naming scheme you choose, so you're getting more than a tutorial -- it's also a toolkit of boilerplate snippets. The end result is a complete work environment designed to make you into a high-velocity developer with very low "maintenance drag". Skim it to see if it's what you need, but then -- please -- follow all the instructions closely.
Quality is free! But getting there can be daunting. The goal of this tutorial series is to help Meteor developers put together a complete continuous integration work environment from which to build out :
The focus is on 'wiring', with very little discussion of what more one can do with each of the various elements once they're wired together -- there are plenty of tutorials about all of that. 'Wiring' refers to the challenge of connecting a variety of different tools together into a integrated whole -- even if the whole doesn't actually do much to begin with.
Another goal is to help developers begin building Meteor applications as though they were working in multiple teams on multiple projects! In particular, this means going beyond "normal" configuration of ssh and git, to handle multiple user aliases and GitHub deploy keys. The end result will be fractionally more difficult in your daily routine, but much more flexible and "future proof".
Most likely you'll want to flip through the slides to get an overview, then watch the videos, then spin up a fresh virtual machine and execute the scripts. Since the scripts are semi-automatic, you'll have very little typing to do, and so the whole thing shouldn't cost you more than a few hours. In fact, grouped as it is in spoon-sized doses, you can step through it a little bit at a time, when you have time.
Other stuff:
We start off with a fresh Ubuntu 14.04 LTS virtual machine and install all the platform dependencies. These are global installs requiring 'sudo'. Subsequent sections should not require 'sudo'. The script shown can run to completion without intervention, or stop at intermediate steps to view explanations.
Towards the goal of "packages-only-apps", we are mainly interested in version control of each distinct package, but we still need a 'do-nothing' app in which to instantiate the packages.
So, we'll prepare a Meteor project and store it in GitHub.
This section follows the steps to perform to begin testing a Meteor package.
We'll prepare a package, secure it in GitHub and run preliminary tests with TinyTest in the browser and on the command line.
If you want reusable components, especially if you are working with one or several teams, it's very important to ensure consistent styles and documentation standards from all contributors to all your projects. In this and the next section we'll set up an environment where standards conformance is easy.
The first element is linting with esLint, run in the editor for instant feedback as well as on the command line so conformance can be published and monitored as part of continuous integration.
The second element exploits two powerful tools: jsDoc and "GitHub Pages".
We'll put together a mechanism for easily documenting code files and then publishing them as a browsable manual, automatically, on GitHub.
This section expands on your workstation toolbox to include working with continuous integration in the cloud. It covers everything involved in setting up linting, automated documentation, unit testing, version control, end-to-end testing and continuous integration in-the-cloud.
A vital, piece of application architecture is scaleable logging: run-time logs that track critical server-side activity at appropriate levels of detail. We "require" Bunyan, a toolkit for NodeJS that focuses on very flexible logging with JSON output, that can be readily archived and subsequently "mined", for example, for usage patterns.
Here we create a complete working, tested, documented Meteor package from a pre-exising NodeJS module. This step also introduces the "impedance mis-match" between the synchronous layer that Meteor builds on top of the asynchronous substrate of NodeJS.
To close the loop on all the preceding development stage parts we now bring the online documentation up-to-date and automate end-to-end testing of our package in-the-cloud; such that interested users can quickly get started using it.
We build our project as an Android app, place it into our project as a download link, then deploy it to Meteor's servers. W e use our understanding of that to complete our CI script to do it all automatically in CircleCI, every time we push a commit to GitHub.
To begin, you will need to obtain the tutorial. Open up a terminal window, then copy'n paste these commands into it:
export BRANCH="master" # modularize
export URI="https://github.com/martinhbramwell"
export TUT="Meteor-CI-Tutorial"
export FILE="archive/${BRANCH}.zip"
echo "Downloading : \n${URI}/${TUT}/${FILE}"
echo " as : ${TUT}.zip"
wget -O ${TUT}.zip ${URI}/${TUT}/${FILE}
unzip ${TUT}.zip
mv ${TUT}-${BRANCH} ${TUT}
cd ${TUT}
# Ready to run the first script :
# ./Tutorial01_PrepareTheMachine.sh
The result should look like this.
Then you can run the first script with:
./Tutorial01_PrepareTheMachine.sh