1.0.1 • Published 3 years ago

rollup-cocktail v1.0.1

Weekly downloads
98
License
ISC
Repository
-
Last release
3 years ago

Cocktail Library

Boilerplate to create client libraries with rollup

Overview

Using rollup.js to generate a javascript package that can be imported with different methods

ESM

import Cocktail from "rollup-cocktail";

CJS

const Cocktail = require("rollup-cocktail");

Browser

<script src="https://cdn.jsdelivr.net/gh/gabojkz/cocktail-js@master/dist/cocktail.min.js"></script>

Installation

npm i --save-dev rollup-cocktail @babel/polyfill

Usage example

const cocktail = new Cocktail();

cocktail.getDrink('margarita')
  .then(console.log)
  .catch(console.log)

ISC License (ISC)