Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
es6-epf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
school
formation-dev-web
es6-epf
Commits
e749d694
Commit
e749d694
authored
Feb 27, 2024
by
Olivier ABDELNOUR
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
ee368aea
No related branches found
No related tags found
No related merge requests found
Pipeline
#60120
passed
Feb 27, 2024
Stage: training_resources
Stage: clean_training_resources
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
resources/docs/docs/chapters/tp/bundle2.md
+50
-0
50 additions, 0 deletions
resources/docs/docs/chapters/tp/bundle2.md
with
50 additions
and
0 deletions
resources/docs/docs/chapters/tp/bundle2.md
+
50
−
0
View file @
e749d694
...
...
@@ -43,3 +43,53 @@ After this chapter, thanks to the _ES modules_, there will be no more imported f
- Remove the _IIFE_
- Write an `export` statement to export the component's function.
- Write an `import` statement to import the `parseUrl` function if required.
??? note "Show the resulting files"
=== "welcome.js"
```js linenums="1"
export function WelcomeComponent() {}
/* method WelcomeComponent.init */
WelcomeComponent.prototype.init = function init() {
// ...
};
// ...
```
=== "game.js"
```js linenums="1"
import { parseUrl } from "./utils";
var environment = {
api: {
host: "http://localhost:8081",
},
};
export function GameComponent() {
// ...
}
/* method GameComponent.init */
GameComponent.prototype.init = function init() {
// ...
};
// ...
```
=== "score.js"
```js linenums="1"
import { parseUrl } from "./utils";
export function ScoreComponent() {
// ...
}
// ...
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment