open-index/open-npm huggingface dataset:
npm package: @sayduck/viewer-threejs
Description: ### Currently based on Three.js and glTF 2.0.
Latest version: 3.5.7-pre-2

# Sayduck's static 3D viewer app.

### Currently based on Three.js and glTF 2.0.

## Development Setup
Make sure you have nodejs installed

### NPM 
1. Ask a developer to invite you to the all packages access team on sayduck npm.
2. Create a new access token and copy it.
3. Export a path variable in the form of `NPM_AUTH_TOKEN=<token>` from your shell. (Replace <token> with the token you got in step 2)
4. `source` your shell config e.g `source ~/.zshrc` 
  
### App
1. Add a `.npmrc` to the root of the project directory, and paste 
  ```npmrc
  //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}
  ```
2. Create a `.env` file and add these values
  ```.env
  PUBLIC_URL=http://static.sayduck.com/2021.04.23.3d_viewer_comparison/
  REACT_APP_ENVIRONMENT=development
  REACT_APP_HOSTNAME=dvpt-xx-api.sayduck.io
  REACT_APP_API_URL=https://dvpt-fs-cable.ngrok.io
  REACT_APP_API_SUBSCRIPTION_URL=wss://dvpt-xx-api.sayduck.io/cable
  REACT_APP_GA_TRACKING_ID=UA-126878791-3
  REACT_APP_SENTRY_DSN=https://7c60c6358df7435fbf954151a72b08db@sentry.io/1293641
  REACT_APP_CONFIGURATOR_PICKER_URL=https://staging-configurator-picker.sayduck.com
  ```
3. Substitute `xx` for the initials you chose during setup of https://github.com/Sayduck/sayduck-api-rails
4. Run `npm install`
5. Run `npm start`

## Deploying the viewer:

### Pre-requirement

1. Install Pip

- `$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py`
- `$ (sudo) python get-pip.py`

2. Install & configure AWS CLI

- `$ sudo pip install awscli` ( might need `$ sudo pip install awscli --ignore-installed six` on macOS. Also maybe `$ sudo pip install nose`,`sudo pip install tornado` )
- Configure AWS

```
$ aws configure
AWS Access Key ID: [YOUR-ACCESS-KEY-ID]
AWS Secret Access Key: [YOUR-ACCESS-KEY-SECRET]
Default region name [None]: us-east-1
Default output format [None]: json
```

### Deploying

Just run

- `npm run staging-deploy`
  or
- `npm run deploy`