Import CSV and Slacker Radio playlists into Spotify.
- NVM
- Chrome or Chromium
Run nvm use and then npm install.
Run npm run start for a dev server. Navigate to http://127.0.0.1:4200/. The app will automatically reload if you change any of the source files.
Run npm run build to build the project. The build artifacts will be stored in the dist/ directory.
Follow these steps when updating dependencies:
- Perform a clean checkout of main
- Ensure all automated tests pass (unit, integration, component, e2e)
- Create a new branch
- Update dev deps that relate to automated testing, in small batches
- Ensure all automated tests pass
- Update all non-Angular and non-WDIO deps, in small batches
- Ensure all automated tests pass
- Update all WDIO deps
- Ensure all automated tests pass
- Update all Angular deps (see sub-section)
- Ensure all automated tests pass
Note: as a best practice rm -rf node_modules/ package-lock.json after each batch of updates.
Use Angular's update guide and only update one major version at a time.
Use the following settings:
- Application complexity:
Medium - Other dependencies:
Angular Material
Run npm run test to execute the unit tests via Karma.
Note: Runs automatically when starting the development server.
Run npm run e2e to execute the end-to-end tests via WDIO.
Note: The development server must be running.
Test configuration is based on the following environment variables:
- SPOTIFY_AUTH_TOKEN_PRIMARY - used to sign into Spotify and grant access
- SPOTIFY_CLIENT_ID - used to make api calls
- SPOTIFY_CLIENT_SECRET - used to make api calls
To get a Spotify Auth Token do the following:
- Log into Spotify
- Examine the site's cookies
- The value of
sp_dcis your auth token
The Spotify Client ID and Secret are located in the settings of the development dashboard.
Tests can be filtered via the command line, for example: npm run e2e -- --mochaOpts.fgrep="simple slacker playlist"
To build and upload (aka deploy) the project:
npm run deployDeployment configuration is based on the following environment variables:
- ENVIRONMENT
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_HOST
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_USERNAME
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_PASSWORD
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_PORT
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_HOME_PATH
- NG_SPOTIFY_IMPORTER__DEPLOYMENT_PROJECT_PATH
Note: ENVIRONMENT must match a value found in angular.json's configurations section.