Skip to content

leofavre/canivete-with-rollup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Canivete with Rollup

Canivete on GitHub

Documentation


1. In your project root folder, install Canivete via NPM.

$ npm install --save leofavre/canivete

2. Install Rollup globally via NPM.

$ npm install --global rollup

3. Install the Node Resolve Pulgin for Rollup via NPM.

$ npm install --save-dev rollup-plugin-node-resolve

4. Create a file named "rollup.config.js" with the following content:

import nodeResolve from "rollup-plugin-node-resolve";

export default {
    "entry": "./index.js",
    "dest": "./dist/app.js",
    "plugins": [nodeResolve()],
    "format": "es"
};

5. Create a file named "index.js". Import any dependencies from Canivete using ES6 module syntax before the rest of your code, like this:

import toAverage from "canivete/dist/toAverage";

const myArray = [8, 10, 12, 14, 16];
alert(myArray.reduce(toAverage));
// => 12

6. Use the following shell command to build your project:

$ rollup -c

About

Example of Canivete use with Rollup.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published