Installing Ferp in Your Application

Installing

Depending on your project, needs, and target audience, there are a number of ways to get up and running with Ferp within seconds.

Installing from npm or yarn

You know the drill!

npm install --save ferp
# OR
yarn add ferp

And import Ferp into your code-base:

From es6/babel
From NodeJS
From es6/babel
import { app, effects, util } from 'ferp';
From NodeJS
index.js
const { app, effects, util } = require('ferp');

If you are targeting a web browser, you may need to bundle or build your scripts, with something like rollup, webpack, or parcel.

Using a CDN

Of course, you don't need to install anything at all. Content delivery networks (CDNs) like unpkg work great!

Standard es5 javascript
Modern Browsers
Standard es5 javascript
index.html
<script src="https://unpkg.com/ferp"></script>
const { app, effects, util } = window.ferp;
Modern Browsers
<script type="module">
import { app, effects, util } from 'https://unpkg.com/ferp?module=1';
</script>

With a CDN, there is no install needed to get going. Of course, you may want to look into Service Workers if you want to support your application while offline.