#JavaScript Development Environment
This is a generic JavaScript development environment. This isn't tied to any specific JS framework.
- Install Node 6. Need to run multiple versions of Node? Use nvm or nvm-windows
- Clone this repository. -
git clone https://github.com/coryhouse/javascript-development-environment.gitor download the zip - Make sure you're in the directory you just created. -
cd javascript-development-environment - Install Node Packages. -
npm install - Run the app. -
npm start -sThis 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 files all 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. - Having issues? See below.
- Run
npm install- If you forget to do this, you'll see this:babel-node: command not found. - Make sure you're running the latest version of Node.
- Use Node 5.12.0 if you're having issues on Windows. Node 6 has issues on some Windows machines.
- Don't run the project from a symbolic link. It will cause issues with file watches.
###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 |
| cheerio | Supports querying DOM with jQuery like syntax - Useful in testing and build process for HTML manipulation |
| 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 |
| eventsource-polyfill | Polyfill to support hot reloading in IE |
| expect | Assertion library for use with Mocha |
| express | Serves development and production builds |
| extract-text-webpack-plugin | Extracts CSS into separate file for production build |
| file-loader | Adds file loading support to Webpack |
| jsdom | In-memory DOM for testing |
| mocha | JavaScript testing 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 |
| url-loader | Add url loading support to Webpack |
| 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 |