From 6b91a72ed7cca2ebfc645e4c8a5551a08ee22825 Mon Sep 17 00:00:00 2001 From: Brian Sage Date: Thu, 7 May 2015 17:27:45 -0500 Subject: [PATCH] Add library how-tos to README --- README.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 32b4ede..252b9e5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,57 @@ -# Acumen Brands Modal Utilities Library for Picreel - ---- +# Acumen Brands Utilities Library for Picreel Whosoever embeds this library in a Picreel template, if he be worthy, shall possess the power to send emails to SailThru and track them using Lighthouse. + +## An Important Note on [Semantic Versioning](http://semver.org/) + +This library attempts to follow the SemVer specification. Before deploying, be sure to update the library version in package.json. This library will deploy to a semantically versioned path in the specified S3 bucket, so breaking changes will not affect previously deployed versions. + + +## Environment Setup + +1. Install [Node.js](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager) +1. Run npm install, which will install all necessary support libraries for testing building, and exporting +1. Copy config/aws-config.json.example to config/aws-config.json and fill in with appropriate values.
+ _If you don't have actual values for the config params, the example values may be left or changed simply to "", and the grunt aws task simply won't complete._ + +## Export APLS for Browsers + +1. Follow the [Environment Setup](#environment-setup) steps above +1. Run grunt to build the libraries. If all tests pass, normal and minified libraries will be in the /build directory. + +## Run Acceptance Tests Only + +1. Follow the [Environment Setup](#environment-setup) steps above +1. Run grunt test + +## Deploy to Production + +1. Follow the [Environment Setup](#environment-setup) steps above +1. Update the semantic version in package.json +1. Run grunt deploy:production. If all tests pass, normal and minified libraries will be uploaded to the S3 bucket specified in config/aws-config.json along a semantically versioned path, and a matching CloudFront invalidation will be created. + +## Implementation Example + +In the Picreel template editor... + +```JavaScript + + +``` + +_NOTE 1: Pireel's editor does not load jQuery, but we're dependent on jQuery. Therefore, be sure to wrap new APLSubscriber declaration in an if()_ + +_NOTE 2: Most new APLS attributes may be specified when creating a new object. See lib/factories/subscriber.js for what may be created as arguments_