From 83724bbf44457879cab891addebe447a2e30e27a Mon Sep 17 00:00:00 2001 From: Spencer Wilson Date: Fri, 29 Jun 2018 15:07:22 -0700 Subject: [PATCH 01/26] docs(README): Update --- .travis.yml | 1 + packages/optimizely-sdk/README.md | 70 +++++++++++++++---------------- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/.travis.yml b/.travis.yml index 96c7729ea..00d4ac9d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: node_js node_js: +- '0.10.0' - '4' - '6' - '8' diff --git a/packages/optimizely-sdk/README.md b/packages/optimizely-sdk/README.md index 3a37a0642..cca169e33 100644 --- a/packages/optimizely-sdk/README.md +++ b/packages/optimizely-sdk/README.md @@ -1,22 +1,33 @@ -# Optimizely JavaScript SDK +[![npm](https://img.shields.io/npm/v/%40optimizely%2Foptimizely-sdk.svg)](https://www.npmjs.com/package/@optimizely/optimizely-sdk) +[![npm](https://img.shields.io/npm/dm/%40optimizely%2Foptimizely-sdk.svg)](https://www.npmjs.com/package/@optimizely/optimizely-sdk) +[![Travis CI](https://img.shields.io/travis/optimizely/javascript-sdk.svg)](https://travis-ci.org/optimizely/javascript-sdk) -This repository houses the JavaScript SDK for Optimizely X Full Stack. +# JavaScript SDK for Optimizely X Full Stack + +Optimizely X Full Stack is A/B testing and feature management for product development teams. Experiment in any application. Make every feature on your roadmap an opportunity to learn. Learn more at https://www.optimizely.com/products/full-stack/, or see the [documentation](https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=node). + +This directory contains the source code for the JavaScript SDK, which is usable in both Node.js and web environments. ## Getting Started -### Installing the SDK +### Prerequisites -The SDK is available through [npm](https://npmjs.com/package/optimizely-sdk). To install: +Ensure the SDK supports all of the platforms you're targeting. In particular, we support any ES5-compliant JavaScript environment, including + - Node.js >= 0.10.0, and maybe even earlier. CI validates 0.10.0 and the latest version of all [LTS](https://github.com/nodejs/Release) releases from 4.x onward. By extension, places like AWS Lambda, Google Cloud Functions, and Auth0 Webtasks. + - [Web browsers](https://caniuse.com/#feat=es5) + - [Cloudflare Workers](https://developers.cloudflare.com/workers/) and [Fly](https://fly.io/), both of which are powered by V8. + - Anywhere else you can think of that might embed a JavaScript engine. The sky is the limit; experiment everywhere 🚀 ! + +Once you've validated that the SDK supports the platforms you're targeting, fetch the package from [NPM](https://www.npmjs.com/package/@optimizely/optimizely-sdk). Using `npm`: ``` npm install @optimizely/optimizely-sdk --save ``` -Or to use in a non CommonJS fashion in the Browser: +### Usage +See the Optimizely X Full Stack [developer documentation](http://developers.optimizely.com/server/reference/index.html) to learn how to set up your first JavaScript project and use the SDK. -1. Run `npm run build` -2. Pull in `dist/optimizely.browser.umd.min.js` as a `