rawls238 / PlanOut.js

A JavaScript port of Facebook's PlanOut Experimentation Framework
MIT License
308 stars 52 forks source link

PlanOut.js from typescript? #44

Closed MilesParker closed 7 years ago

MilesParker commented 7 years ago

Hi,

This isn't a defect report, hope that's ok.

Has anyone been able to make the above work ideally against raw ES5 planout.js? We're not currently using npm or babel, so we're relying on plain old require.js and amd against non-ES6 .js libraries using d.ts. I understand that I'm going to have to add dependencies for sha1 and bignumber in as well..

I'm working my way through this: http://www.jbrantly.com/es6-modules-with-typescript-and-webpack/ but hoping that someone has a quicker recipe or has done this before. I'll follow up if I figure this out in interim. (I'm under a bit of pressure to use existing Facebook python implementation from server API but I'd much rather use a .js client.)

thanks!

MilesParker commented 7 years ago

Closing as I'm going to have to go with server side approach for now. Hopefully as ES6 picks up speed we'll have some convergence with typescript and these issues will become trivial to deal with.

rawls238 commented 7 years ago

Hi,

The examples are actually in ES5. I'm not sure if it'll help you get what you're looking for but take a look and let me know: https://github.com/HubSpot/PlanOut.js/blob/master/examples/sample_planout_es5.js

dobesv commented 4 years ago

FWIW I have made an attempt at this here:

https://github.com/dobesv/planout-ts