Learn how to get Free YouTube subscribers, views and likes
Get Free YouTube Subscribers, Views and Likes

turf.js - Creating custom builds for use in the browser

Follow
Moulay Anwar Sounny-Slitine

https://turfjs.org/gettingstarted/

This video shows you how to use terminal to create a custom build of turf to make it lighter weight for your web browser.

Step 1 Create a folder and install whatever modules you are interested in via npm

Step 2 Create a file called main.js in the root directory, in this include your required modules within a modules.exports statement

Step 3 Run the following browserify command

Done You can now use your outTurf.js file where you want just like you would normally use Turf, eg load it via a script tag and call turf using the turf global variable.

posted by Fixtoinidign3