-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New modules docs #2946
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
New modules docs #2946
Conversation
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
This comment was marked as resolved.
This comment was marked as resolved.
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
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.
This PR deletes a bunch of markdown files which will break URLs people have been using, you could consider adding them back and adding the deprecated
YML tag and there's a tag you can use to forward someone to the replacement also. It should handle the HTML tags to tell search engines to lower the rank on those pages too
Only looked at the theory page, but got 1-2 comments
packages/documentation/copy/en/modules-reference/Introduction.md
Outdated
Show resolved
Hide resolved
|
||
This approach had some downsides, especially as web pages grew larger and more complex. In particular, all scripts loaded onto the same page share the same scope—appropriately called the “global scope”—meaning the scripts had to be very careful not to overwrite each others’ variables and functions. | ||
|
||
Any system that solves this problem by giving files their own scope while still providing a way to make bits of code available to other files can be called a “module system.” (It may sound obvious to say that each file in a module system is called a “module,” but the term is often used to contrast with _script_ files, which run outside a module system, in a global scope.) |
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 opening line for this paragraph feels a little unwieldy (lots of abstract terms) when you try say it out loud could try starting with the term and then building backwards?
Any system that solves this problem by giving files their own scope while still providing a way to make bits of code available to other files can be called a “module system.” (It may sound obvious to say that each file in a module system is called a “module,” but the term is often used to contrast with _script_ files, which run outside a module system, in a global scope.) | |
We call a system which tries to break up that single global scope a “module system“, these are usually build around providing a per-file scope which allows for ways to pass bits of code between each other. (It may sound obvious to say that each file in a module system is called a “module,” but the term is often used to contrast with _script_ files, which run outside a module system, in a global scope.) |
``` | ||
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/dependency/utils' imported from .../node_modules/dependency/index.js | ||
Did you mean to import ./utils.js? | ||
``` |
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 have the ability to inline custom errors if you want
I added redirects for the deleted pages in |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-glacier-09aa73710-2946.centralus.azurestaticapps.net |
Closes microsoft/TypeScript#52593