Skip to content
Snippets Groups Projects
Commit de4c0713 authored by Olivier ABDELNOUR's avatar Olivier ABDELNOUR
Browse files

wip

parent 31ad2b9b
No related branches found
No related tags found
No related merge requests found
Pipeline #60114 passed with warnings
...@@ -45,7 +45,51 @@ After this chapter, thanks to the _ES modules_, there will be no more imported f ...@@ -45,7 +45,51 @@ After this chapter, thanks to the _ES modules_, there will be no more imported f
- Write an `import` statement to import the `parseUrl` function if required. - Write an `import` statement to import the `parseUrl` function if required.
??? note "Show the resulting files" ??? 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() {
// ...
}
// ...
```
- Edit `main.js`. Look at `TODO #import-components` for instructions. - Edit `main.js`. Look at `TODO #import-components` for instructions.
......
...@@ -5,7 +5,7 @@ nav: ...@@ -5,7 +5,7 @@ nav:
- "The package manager": chapters/tp/npm.md - "The package manager": chapters/tp/npm.md
- "Single Page Application (SPA)": chapters/tp/spa.md - "Single Page Application (SPA)": chapters/tp/spa.md
- "Webpack": chapters/tp/webpack.md - "Webpack": chapters/tp/webpack.md
- "The bundle": chapters/tp/bundle.md - "The bundle": chapters/tp/bundle2.md
- "CSS Loader": chapters/tp/css-loader.md - "CSS Loader": chapters/tp/css-loader.md
- "HTML Loader": chapters/tp/html-loader.md - "HTML Loader": chapters/tp/html-loader.md
- "Classes": chapters/tp/es6-classes.md - "Classes": chapters/tp/es6-classes.md
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment