Naughty Program Manipulator
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    opthubpublic

    opthub

    Sync an Optimizely snippet w/ your local fs - easier version control, linting, code reviews etc...

    Installation

    npm install -g opthub

    Hello World

    See the output in ./opthub-output/!

    # Run it! 
    $ opthub 
    prompt: http://cdn.optimizely.com/js/THIS_NUMBER.js:  1127947420
    ./opthub-output/: 2 experiments / wrote 8 files

    Multiple Projects Support

    See the output in ./opthub-output/ and ./optimizely-example/!

    # Compile your snippet ids (1 or more) 
    $ curl -s http://www.optimizely.com | grep -n cdn.optimizely.com
    6:<script type="text/javascript" src="//cdn.optimizely.com/js/5935064.js"></script>
     
    # Make a ./.opthubrc file w/ snippet/name pairs 
    echo '{"1127947420":"opthub-output","5935064":"optimizely-example"}' > .opthubrc
     
    # Run it! 
    $ opthub
    ./optimizely-example/: 75 experiments / wrote 169 files
    ./opthub-output/: 2 experiments / wrote 8 files

    Authors

    Clearhead?

    We're an AB Testing Consulting Agency specializing in Optimizely engagements. We're hiring!

    Keywords

    none

    install

    npm i opthub

    Downloadsweekly downloads

    25

    version

    0.0.10

    license

    LICENSE-2.0.txt

    repository

    githubgithub

    last publish

    collaborators

    • avatar