/spotify-api-course

Primary LanguageJavaScriptMIT LicenseMIT

Spotify API Course

A wrapper to work with the Spotify Web API.

npm mocha Build Status

About the course

TDD with JavaScript Course by William Justen

Browser Support

This library relies on Fetch API. And this API is supported in the following browsers.

Chrome Firefox Opera Safari IE
39+ ✔ 42+ ✔ 29+ ✔ 10.1+ ✔ Nope ✘

Important commands

1.0 - List global npm plugins

npm list -g --depth=0

Fix possible bugs

1.0 - Webpack > UglifyJSPlugin

Maybe you'll have some trouble with this plugin. However, you can solve this installing it separately.

npm i -D uglifyjs-webpack-plugin

Config your webpack.config.js file.

const UglifyJSPlugin = require('uglifyjs-webpack-plugin');

[...]
plugins: [
  new UglifyJSPlugin({
    uglifyOptions: {
      compress: { warnings: false },
      output: { comments: false },
    },
    sourceMap: true,
  }),
],

2.0 - NPM Error while running the test

This is a problem when using npm run, it has to do with Mocha exiting with code !== 0 whenever a test fails.

http://prntscr.com/hripxp

"scripts": {
  "test": "./node_modules/.bin/mocha specs/**/*.spec.js || ECHO.",
},

3.0 - Solve LF replace to CRLF on Git

This command will solve the problem with linebreak replacement on git commit.

git config --global core.autocrlf input

eslint-magic

License

This project is licensed under the MIT License - see the LICENSE file for details