ferp-js
  • What is Ferp
  • Getting Started
    • Installing Ferp in Your Application
    • What Does Ferp Provide
  • Building Your First App
    • The Boilerplate
  • Understanding Effects in Ferp
    • What is a Ferp Effect?
    • Core Effects
    • Composing Custom Effects
    • Testing Your Effects
  • Understanding Actions in Ferp
    • What is a Ferp Action?
    • Writing Your Own Actions
    • Testing Actions
  • Understanding Subscriptions in Ferp
    • What is a Ferp Subscription?
    • Composing Custom Subscriptions
    • Testing Your Subscriptions
  • Advanced Usage
    • Third-Party Libraries and Objects
Powered by GitBook
On this page
  • Installing
  • Installing from npm or yarn
  • Using a CDN

Was this helpful?

  1. Getting Started

Installing Ferp in Your Application

PreviousWhat is FerpNextWhat Does Ferp Provide

Last updated 4 years ago

Was this helpful?

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@^2
# OR
yarn add ferp@^2

And import Ferp into your code-base:

import { app, effects } from 'ferp';
index.js
const { app, effects } = require('ferp');

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

Using a CDN

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

index.html
<script src="https://unpkg.com/ferp@2"></script>
const { app, effects } = window.ferp;
<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 if you want to support your application while offline.

rollup
webpack
parcel
Service Workers