/angularjs-development-environment

AngularJS development environment starter kit

Primary LanguageJavaScriptMIT LicenseMIT

AngularJS Development Environment

This is an AngularJS development environment that is based on the Pluralsight course: "Building a JavaScript Development Environment" on Pluralsight, and more specifically this repo: coryhouse/javascript-development-environment.

Get Started

  1. Install Node 6. Need to run multiple versions of Node? Use nvm or nvm-windows
  2. Install Yarn.
  3. Clone this repository. - git clone git@github.com:Matt-Dionis/javascript-development-environment.git or download the zip
  4. Make sure you're in the directory you just created. - cd javascript-development-environment
  5. Install Node Packages. - yarn
  6. Run the app. - npm start -s This will run the automated build process, start up a webserver, and open the application in your default browser. When doing development with this kit, this command will continue watching all of your files. Every time you hit save the code is rebuilt, linting runs, and tests run automatically. Note: The -s flag is optional. It enables silent mode which suppresses unnecessary messages during the build.
  7. Having issues? See below.

Having Issues? Try these things first:

  1. Run yarn - If you forget to do this, you'll see this: babel-node: command not found.
  2. Make sure you're running the latest version of Node. Or, use Node 6.9.1 if you're having issues on Windows. Node 7 has issues on some Windows machines.
  3. Make sure files with names that begin with a dot (.babelrc, .editorconfig, .eslintrc) are copied to the project directory root. This is easy to overlook if you copy this repository manually.
  4. Don't run the project from a symbolic link. It will cause issues with file watches.
  5. Having linting issues? Delete any .eslintrc that you're storing in your user directory. Also, disable any ESLint plugin / custom rules that you've enabled within your editor. These will conflict with the ESLint rules defined in the course.
  6. Nothing above work? Delete your node_modules folder and re-run yarn.

Development Dependencies

Dependency Use
babel-cli Babel Command line interface
babel-core Babel Core for transpiling the new JavaScript to old
babel-loader Adds Babel support to Webpack
babel-preset-latest Babel preset for running all the latest standardized JavaScript features
babel-register Register Babel to transpile our Mocha tests
chai Assertion library for use with Mocha
chalk Adds string styling
cheerio Supports querying DOM with jQuery like syntax - Useful in testing and build process for HTML manipulation
compression Supports gzip compression
cross-env Cross-environment friendly way to handle environment variables
css-loader Add CSS support to Webpack
eslint Lints JavaScript
eslint-plugin-import Advanced linting of ES6 imports
eslint-watch Add watch functionality to ESLint
express Serves development and production builds
extract-text-webpack-plugin Extracts CSS into separate file for production build
html-webpack-plugin Simplifies creation of HTML files
jsdom In-memory DOM for testing
mocha JavaScript testing library
nock HTTP mocking library
npm-run-all Display results of multiple commands on single command line
open Open app in default browser
rimraf Delete files
style-loader Add Style support to Webpack
surge Static web publishing
webpack Bundler with plugin system and integrated development server
webpack-dev-middleware Adds middleware support to webpack
webpack-hot-middleware Adds hot reloading to webpack
webpack-md5-hash Adds md5 hashing to webpack