Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

acumenbrands/flip-flop-spike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Country Outfitter Flip Flop Spike

See trello card https://trello.com/c/XBgS4I0n

An Important Note on Semantic Versioning

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
  2. Run npm install, which will install all necessary support libraries for testing building, and exporting
  3. 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.

Build for Use In Browsers

  1. Follow the Environment Setup steps above
  2. 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 steps above
  2. Run grunt test

Deploy to Production

  1. Follow the Environment Setup steps above
  2. Update the semantic version in package.json
  3. 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

To implement this script on a live site, load the script either synchronously or asynchronously using the following:

<script src="//my-cloudfront-dist-id.cloudfront.net/libs/flip-flop-spike/0.1.0b/flip-flop-spike.min.js"></script>
<script>
  (function() {
    var params = {
      /* ... */
    };
    window.FFS = new FlipFlopSpike(params);
  })();
</script>

About

Javascript with a minimalist test setup using mocha-chai-sinon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published