Skip to content

Update 2020 #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
17f978e
Update to Webpack 2. Update dependencies.
coryhouse Feb 20, 2017
9837ba5
Fix syntax errors
coryhouse Apr 19, 2017
b851de8
Merge branch 'master' into update-dependencies
coryhouse Jun 3, 2017
2540ce9
Upgrade dependencies
coryhouse Jun 3, 2017
d3a6aee
Upgrade packages
coryhouse Jun 3, 2017
5b8a253
Switch to babel-preset-env which replaced babel-preset-latest
Oct 11, 2017
f57e2d7
Remove needless escape characters
Oct 11, 2017
27341a5
Update dependencies
Oct 11, 2017
890b415
Update webpack.config to modern syntax
Oct 31, 2017
30a70fb
Update dependencies including Webpack 4
coryhouse May 8, 2018
bebdb27
Update webpack.config.prod.js
coryhouse May 8, 2018
751c4b7
Remove nsp since npm has security checks built in now
coryhouse Jul 8, 2018
fa4732b
Merge branch 'update-dependencies' of https://github.com/coryhouse/ja…
coryhouse Jul 8, 2018
838e8b4
Update dependencies
coryhouse Oct 31, 2018
946d4eb
Upgrade Babel and ESLint
coryhouse Oct 31, 2018
90f42b2
Merge branch 'master' into update-dependencies
coryhouse Nov 2, 2018
9f84e57
Update deps
coryhouse Nov 21, 2018
ae1c8ec
Merge branch 'update-dependencies' of https://github.com/coryhouse/ja…
coryhouse Nov 21, 2018
c9dfefb
Comment tweak
coryhouse Nov 21, 2018
56bd631
Upgrade jsdom
coryhouse Dec 7, 2018
f41c337
Upgrade dependencies
coryhouse May 23, 2019
2870816
Update URL
coryhouse Jun 16, 2019
b3611ce
Eliminate separate config
coryhouse Jun 16, 2019
6a89395
Eliminate separate config
coryhouse Jun 16, 2019
790acac
Switching to prettier
coryhouse Jun 16, 2019
8503916
Change node version
coryhouse Jun 16, 2019
fd582df
Update min Node version
coryhouse Jun 16, 2019
ee5c0ab
Upgrade deps and add babel and eslint configs
coryhouse Jun 16, 2019
a974a53
Fix compression call order
coryhouse Jun 16, 2019
2355faa
Tweak comment
coryhouse Jun 16, 2019
c6dad1a
Tweak comment
coryhouse Jun 16, 2019
a81d95d
prettier
coryhouse Jun 17, 2019
e36e0d2
prettier
coryhouse Jun 17, 2019
19dfc78
prettier
coryhouse Jun 17, 2019
e64b3ec
Update to latest versions
coryhouse Aug 29, 2020
e22e9ae
Upgrade versions
coryhouse Aug 29, 2020
a20911c
Extract config
coryhouse Aug 29, 2020
e9d14ee
Add config back
coryhouse Aug 29, 2020
ff2c1a2
Revert quotes
coryhouse Aug 29, 2020
673dece
revert order
coryhouse Aug 29, 2020
e667589
update deps
coryhouse Aug 29, 2020
66318fe
reorder
coryhouse Aug 29, 2020
a07b8c4
revert quotes
coryhouse Aug 29, 2020
f32d618
revert
coryhouse Aug 29, 2020
45b734f
revert
coryhouse Aug 29, 2020
aa62025
revert
coryhouse Aug 29, 2020
a2edf0e
revert quotes
coryhouse Aug 29, 2020
5dae3bb
Remove
coryhouse Aug 29, 2020
3939517
Make consistent loaders
coryhouse Aug 29, 2020
f462c60
Simplify entry
coryhouse Aug 29, 2020
2e60f8e
remove jsx
coryhouse Aug 29, 2020
b694377
Remove unused
coryhouse Aug 29, 2020
07c5e3a
doc packages
coryhouse Aug 29, 2020
d14897d
revert
coryhouse Aug 29, 2020
d1ada0d
revert
coryhouse Aug 29, 2020
88aa91f
Remove hot
coryhouse Aug 29, 2020
749f3fd
Remove localtunnel
coryhouse Aug 29, 2020
abf9358
revert
coryhouse Aug 29, 2020
9c40f8c
revert
coryhouse Aug 29, 2020
633f957
revert
coryhouse Aug 29, 2020
f0eb168
revert
coryhouse Aug 29, 2020
b2d7d10
revert
coryhouse Aug 29, 2020
ed1c2f2
Remove unused
coryhouse Aug 29, 2020
e77be33
remove escapes
coryhouse Aug 29, 2020
ebbe2db
Remove needless setting
coryhouse Aug 30, 2020
977ecd2
remove needless plugin
coryhouse Aug 30, 2020
86f354b
Remove target
coryhouse Aug 30, 2020
90673d6
Hash css
coryhouse Aug 30, 2020
0f139c2
remove default
coryhouse Aug 30, 2020
c7c5bd9
Fix source map setting
coryhouse Aug 30, 2020
17d23d8
Fix comment
coryhouse Aug 30, 2020
b60d2b7
use default
coryhouse Aug 30, 2020
b8a760f
Use default
coryhouse Aug 30, 2020
dc4f07c
comment
coryhouse Aug 30, 2020
a3867cf
remove
coryhouse Aug 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"presets": [
"latest"
]
"presets": ["@babel/preset-env"],
"env": {
"production": {
"presets": [
[
"@babel/preset-env",
{
"targets": "> 0.25%, not dead"
}
]
]
}
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
language: node_js
node_js:
- "6"
- "12"
72 changes: 37 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a generic JavaScript development environment that I build from scratch i

## Get Started

1. **Install [Node 6 or newer](https://nodejs.org)**. Need to run multiple versions of Node? Use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows)
1. **Install [Node 12 or newer](https://nodejs.org)**. Need to run multiple versions of Node? Use [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows)
2. **Clone this repository.** - `git clone https://github.com/coryhouse/javascript-development-environment.git` or [download the zip](https://github.com/coryhouse/javascript-development-environment/archive/master.zip)
3. **Make sure you're in the directory you just created.** - `cd javascript-development-environment`
4. **Install Node Packages.** - `npm install`
Expand All @@ -24,37 +24,39 @@ This is a generic JavaScript development environment that I build from scratch i

### 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 |
| chalk | Colored command line output |
| cheerio | Supports querying DOM with jQuery like syntax - Useful in testing and build process for HTML manipulation |
| compression | gzip http output |
| 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 | Generate HTML file programatically via Webpack |
| jsdom | In-memory DOM for testing |
| json-schema-faker | Declare a JSON schema for generating fake data |
| json-server | Serve a JSON API locally |
| localtunnel | Create a tunnel to your local machine |
| mocha | JavaScript testing library |
| nock | Mock HTTP requests via Node |
| npm-run-all | Display results of multiple commands on single command line |
| numeral | Library for working with numbers |
| open | Open app in default browser |
| rimraf | Delete files |
| style-loader | Add Style 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 |
| webpack-md5-hash | Used to hash files generated by Webpack using MD5 so that their names change when the content changes |
| **Dependency** | **Use** |
| ----------------------- | --------------------------------------------------------------------------------------------------------- |
| @babel/cli | Babel Command line interface |
| @babel/core | Babel Core for transpiling the new JavaScript to old |
| @babel/node | Run Babel via Node |
| @babel/preset-env | Babel preset for compiling to specific environments |
| @babel/register | Register Babel to transpile our Mocha tests |
| babel-loader | Adds Babel support to Webpack |
| chai | Assertion library |
| chalk | Colored command line output |
| cheerio | Supports querying DOM with jQuery like syntax - Useful in testing and build process for HTML manipulation |
| compression | gzip http output |
| 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 |
| faker | Generates realistic fake data |
| html-webpack-plugin | Generate HTML file programatically via Webpack |
| jsdom | In-memory DOM for testing |
| json-schema-faker | Declare a JSON schema for generating fake data |
| json-server | Serve a JSON API locally |
| mini-css-extract-plugin | Extract CSS to a separate file and minimize |
| mocha | JavaScript testing library |
| nock | Mock HTTP requests via Node |
| npm-run-all | Display results of multiple commands on single command line |
| numeral | Library for working with numbers |
| open | Open app in default browser |
| rimraf | Delete files |
| style-loader | Add Style support to Webpack |
| surge | Host a static site via a CLI command |
| 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 |
| whatwg-fetch | Polyfill for the Browser's native fetch for older browsers |
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Test against this version of Node.js
environment:
matrix:
# node.js
- nodejs_version: "6"
# node.js
- nodejs_version: "12"

# Install scripts. (runs after repo cloning)
install:
Expand Down
4 changes: 3 additions & 1 deletion buildScripts/generateMockData.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import {schema} from './mockDataSchema';
import fs from 'fs';
import chalk from 'chalk';

const json = JSON.stringify(jsf(schema));
// Extend JSF with the fake libs you want to use.
jsf.extend('faker', () => require('faker'));
const json = JSON.stringify(jsf.generate(schema));

fs.writeFile("./src/api/db.json", json, function (err) {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion buildScripts/mockDataSchema.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ export const schema = {
}
},
"required": ["users"]
};
};
4 changes: 2 additions & 2 deletions buildScripts/testSetup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file isn't transpiled, so must use CommonJS and ES5
// This file isn't transpiled, so must use CommonJS

// Register babel to transpile before our tests run.
require('babel-register')();
require('@babel/register')();

// Disable webpack features that Mocha doesn't understand.
require.extensions['.css'] = function() {};
Loading