Skip to content

frankrue/base2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base 2

Provides a template for all HTML5, CSS, and JS projects. Ultimately, the output is built and minified to protect proprietary intellectual property.

Contents

Basic Setup

npm install
bower install

Basic Watching/Editing

Gulp will run a watch server at localhost:3000 and open Chrome to view your work. This will also take care of compiling SASS and refreshing the page on JS changes.

gulp

Defaults

Make sure you add any global constants to the Defaults.js file, including (if you're using Keen tracking) the Keen projectId, writeKey, and readKey.

Tracking with Keen.IO

You can easily track anything at all by using API calls to Keen. This first requires that you set up a new project in your Keen Boco Digital dashboard.

The code to do this looks like this:

// don't forget to include a defined Tracking.js module from the utils folder
Tracking.send("global", { name: "app-init" } );

Keep in mind that the first and second parameters are wide open. The first must always be a string, but it can be any collection name (single word with hyphens or underscores) you want; the second is a JavaScript object, so can include ANY properties you want. It's a good idea to ensure you're collecting lots of good data in this object.

Building/Minifying for Distribution

To distribute the file so that our work is protected, us the following command:

gulp build

This will create a build folder which is also necessary for Amazon deployment, which you can then upload anywhere with the dependencies therein.

Please note: The inc folder is used for assets that need to be copied into the build folder. Put files in folders within inc like audio, video, etc.

Deploying to Amazon Elastic Beanstalk

If you already have your Amazon Credentials set up, you can use the following commands to get a real server instance running (non-load-balanced, single-instance) for the first time:

eb init
eb create

Then use this command for new deploys:

eb deploy

Finally, use this to terminate the server when the project is done:

eb terminate

Releases

No releases published

Packages

No packages published