This basic implementation shows how to use FIJS with npm
and parcel
.
- Create a new module using
npm
:
npm init -y
- Add
parcel
:
npm install --save-dev parcel
- Create directories
src
,img
andcss
:
mkdir src
mkdir src/css
touch index.{js,html}
touch src/css/style.css
-
Copy
package.json
and.parcelrc
files from this repository into your project directory. -
In the
src
directory copyindex.html
andindex.js
-
Install
FIJS
:
npm i flight-indicators-js@latest
- Copy the images form the library
cp -v node_modules/flight-indicators-js/img src/
- Your directory must look like:
project/
|-src/
|-css/
|-style.css
|-img/
|-*.svg
|-index.js
|-index.html
|-.parcelrc
|-package.json
- Finally, start (development) or build (production) the project.
start
:
$ npm run start
Server running at http://localhost:1234
√ Built in 36ms
- Then open
http://localhost:1234
in your browser.
Or build
and deploy it:
$ npm run build
√ Built in 3.61s
dist\index.html 615 B 1.19s
dist\index.18a9bc47.css 832 B 2.74s
dist\index.169f7d3f.js 7.62 KB 602ms
Teocci (teocci@yandex.com)
The code supplied here is covered under the MIT Open Source License.