Tuesday, April 14, 2020
browserify
1) must use sudo install globally
sudo npm install -g brwoserify
https://github.com/perliedman/reproject
sudo npm install reproject // install locally is fine
must manually create 'dist' folder for later output file use
2) must use --s expose global variable function 'reproject' and or 'toWgs84' you will use later in browser js.
without --s , will get 'reproject' undefined error . https://makerlog.org/posts/creating-js-library-builds-with-browserify-and-other-npm-modules
browserify --help will list all options. -o means output file directory
browserify node_modules/reproject/index.js --s reproject -o node_modules/reproject/dist/reproject.js
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment