This is the website codebase for tessel.io. Contributions welcome.
This repo is built on gulp, sass, and livereload.
Environment variables examples can be found in .env.example
npm run dev
will automatically use the .env file you have locally. You can also export the variables to your environment manually with export $(cat .env | xargs)
.
Production env is stored in the password management. It should live in /mnt/secrets/tessel-env.json
on the server the currently used keys are set in the .env.example file.
npm install
npm run build
npm run dev
Be sure to install livereload plug-in to your chrome browser while developing.
Gulp is a task runner for development. While it can be used in production it's not advisable. Everything should be pre-compiled before it's pushed to heroku when using npm run dev
Syntactically Awesome Style Sheets docs
We use Foundation, which has scss and JavaScript files in its npm package.
HTML that sucks less docs
Using browserify to combined and compress js files. docs
Currently using this for a cms. Eventually we should move to something that does that. Gulp will watch for changes in json files so when you update the json the server will reload. This allows us to use any of these attributes if we load them in as context for jade templates.
Keep track of the size of these files as they are loaded into memory on server start. Make sure they don't start to get absurdly large.
To upload compressed images assets to AWS, fill out aws.json
in accordance with https://www.npmjs.com/package/gulp-s3.
Ensure you have a .env
file.
In production, set the env variables CELERY_URL
and CELERY_TOKEN
.
In development, set the TEST_CELERY_URL
, TEST_CELERY_TOKEN
, and TEST_CELERY_ID
variables.
A Bocoup run Hookshot instance is configured to deploy commits taged with prod-xxx
to production. Where xxx
is an incrementing version number. You can see the results of a deploy in the webhook response tab of this repo.
Be sure to install the AWS cli install aws cli
Safest way is to use the bundler if you're on Linux or OS X installing on linux
include an aws.json file
{
"accessKeyID": "Tessel-accessID",
"secretAccessKey": "Tessel-secret-access-key",
"bucket": "technicalmachine-assets/launch"
}
commands to download assets
gulp images-download
command to encoding optimize and upload images
gulp images-upload