Socket
Socket
Sign inDemoInstall

@optimizely/optimizely-sdk

Package Overview
Dependencies
55
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @optimizely/optimizely-sdk

JavaScript SDK package for Optimizely X Full Stack


Version published
Weekly downloads
218K
decreased by-0.21%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

2.0.1

April 16th, 2018

  • Improve browser entry point by pointing to the browser index file instead of the webpack-compiled bundle. (@DullReferenceException in #88)

Readme

Source

Optimizely JavaScript SDK

This repository houses the JavaScript SDK for Optimizely X Full Stack.

Getting Started

Installing the SDK

The SDK is available through npm. To install:

npm install @optimizely/optimizely-sdk --save

Or to use in a non CommonJS fashion in the Browser:

  1. Run npm run build
  2. Pull in dist/optimizely.browser.umd.min.js as a <script>
  3. Use as global variable window.optimizelyClient

Migrating from 1.x.x

This version represents a major version change and, as such, introduces some breaking changes:

  • The Node SDK is now combined with the JavaScript SDK so that we have one optimizely-sdk package that works across both server + browser environments.

  • We no longer support legacy Node versions (under 4.0).

  • You will no longer be able to pass in revenue value as a stand-alone argument to the track call. Instead you will need to pass it as an entry in the eventTags.

Feature Management Access

To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.

Using the SDK

See the Optimizely X Full Stack testing developer documentation to learn how to set up your first JavaScript project and use the SDK.

Development

Installing dependencies

npm install

Unit tests

You can run all unit tests with:

npm test

Build distribution packages

npm run build

This command will build several distribution bundles under the dist directory:

  1. optimizely.browser.cjs.js - This is the main entry point for browser/client-side bundles
  2. optimizely.browser.umd.js - This is used when not packaging the optimizely-sdk with your own JS bundles. Instead you would load this script as a <script> tag and reference it via the global var optimizelyClient
  3. optimizely.node.js - This is the main entry point for Node apps

The browser bundles also come with a minified / production-ready version.

Environment Variables

The .yml of this project contains environment vairables for BROWSER_STACK_USERNAME and BROWSER_STACK_ACCESS_KEY.

These variables, created in BrowserStack, are encrypted by the TravisCI public key. This is done directly with the TravisCI command line tools; for additional information see travis encrypt-file.

Keywords

FAQs

Last updated on 16 Apr 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc