-
Notifications
You must be signed in to change notification settings - Fork 18
Build
In order to build and test the USEEIO widgets you need to have a current version of
Node.js installed. Make sure that the node
and npm
commands are available in your systems path (you can test this via node -v
and
npm -v
on the command line which should give you the respective version of
these tools).
The first step is then to install the build tools and dependencies:
cd useeio-widgets
npm install
You can build the widget libraries via:
npm run build
This should create a build
folder with a lib
sub-folder containing a small JavaScript library for each widget.
You will receive some warning messages that can be ignored.
Once built, the build
folder contains example HTML files that demonstrate the usage of these widgets.
To view these examples locally, you'll need some data that you can download from an instance of the USEEIO API via the following command (add your API key):
cd useeio-widgets
npm run download -- --endpoint https://path/to/api --apikey an-optional-api-key
This will mirror the static data of that API into the build/api
folder.
You can then start a server that hosts the examples with data using the following command:
npm run server
This will give you one or more URLs on your local machine that you can copy and paste into your browser and load. Once loaded, you should see the index page with links to the examples.
The United States Environmental Protection Agency (EPA) GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. EPA has relinquished control of the information and no longer has responsibility to protect the integrity , confidentiality, or availability of the information. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by EPA. The EPA seal and logo shall not be used in any manner to imply endorsement of any commercial product or activity by EPA or the United States Government.