-
Notifications
You must be signed in to change notification settings - Fork 195
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
Update dependencies #7
base: master
Are you sure you want to change the base?
Conversation
}] | ||
] | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ES2015 modules can be parsed by webpack 2. This enables tree shaking in the production build by disabling Babel's transpilation of ES2015 modules. Since ES2015 modules are statically analyzable, webpack can determine with certainly what code you're not calling, and leave it out of the bundle. This process can reduce your final bundle size. It's commonly called tree shaking or dead code elimination.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've also switched to babel-preset-env since it replaced babel-preset-latest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need to update all "latest" with "env" in .babelrc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcscott2015 - Correct, and I did that as you can see above.
@@ -15,6 +17,11 @@ export default { | |||
filename: 'bundle.js' | |||
}, | |||
plugins: [ | |||
new webpack.LoaderOptionsPlugin({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that debug and noInfo are now handled here instead in Webpack 2+.
@@ -4,7 +4,7 @@ export default function getBaseUrl() { | |||
|
|||
function getQueryStringParameterByName(name, url) { | |||
if (!url) url = window.location.href; | |||
name = name.replace(/[\[\]]/g, "\\$&"); | |||
name = name.replace(/[[]]/g, "\\$&"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing unnecessary escape characters
@jcscott2015 - Thanks for the heads up - I updated the webpack.config syntax to use the latest style. |
after updating the files for Babel7, express used in srcServer.js does not recognize the get method. |
@baakaweb - I just pulled this branch down and it runs fine. I'm not running web storm, so can't say why you're seeing that message. But I do suggest deleting node_modules and reinstalling. After that, it should run fine. |
const dom = new JSDOM(index); | ||
const h1 = dom.window.document.getElementsByTagName("h1")[0]; | ||
expect(h1.innerHTML).to.equal("Users"); | ||
dom.window.close(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of JSDOM
doesn't use an env var and no longer requires calling done when complete. Instead, you instantiate JSDOM
and receive a dom
.
"mocha": "3.1.2", | ||
"nock": "8.1.0", | ||
"npm-run-all": "3.1.1", | ||
"nsp": "2.6.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node security project (NSP) is now built into npm, so you don't need to reference it or call it manually anymore. 😀
@@ -4,11 +4,10 @@ | |||
"description": "JavaScript development environment Pluralsight course by Cory House", | |||
"scripts": { | |||
"prestart": "babel-node buildScripts/startMessage.js", | |||
"start": "npm-run-all --parallel security-check open:src lint:watch test:watch start-mockapi", | |||
"start": "npm-run-all --parallel open:src lint:watch test:watch start-mockapi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node security project (NSP) is now built into npm, so you don't need to reference it or call it manually anymore. 😀
Updated September 2020
The pull request shows how to update the course dev environment to use the latest dependency versions.
To try this:
git clone https://github.com/coryhouse/javascript-development-environment.git
git checkout update-2019