ferp-js
Search…
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
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!
1
npm
install
--save
[email protected]
^2
2
# OR
3
yarn
add
[email protected]
^2
Copied!
And import Ferp into your code-base:
From es6/babel
From NodeJS
1
import
{
app
,
effects
}
from
'ferp'
;
Copied!
index.js
1
const
{
app
,
effects
}
=
require
(
'ferp'
);
Copied!
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
index.html
1
<
script
src
=
"
https://unpkg.com/
[email protected]
"
>
</
script
>
Copied!
1
const
{
app, effects
}
=
window.ferp
;
Copied!
1
<
script
type
=
"
module
"
>
2
import
{
app
,
effects
,
util
}
from
'https://unpkg.com/ferp?module=1'
;
3
</
script
>
Copied!
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.
Previous
What is Ferp
Next - Getting Started
What Does Ferp Provide
Last modified
1yr ago
Copy link
Contents
Installing
Installing from npm or yarn
Using a CDN