Skip to content
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

Nouveau chapitre : Utilisation de cet ouvrage grâce au module nodebook #395

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ debug.txt
stdout.txt
stderr.txt

chapter-02/schedule.json
chapter-04/examples/stream/copie.js
chapter-07/examples/framework/assets/main.css
chapter-07/examples/sessions
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
12
15 changes: 11 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
dist: trusty
sudo: false

dist: xenial
language: node_js
cache: npm

Expand All @@ -10,7 +8,7 @@ addons:
packages:
- libxml2-utils

node_js: v10
node_js: v12
env:
- npm_version=6
DEBUG=tape-spawn
Expand Down Expand Up @@ -83,9 +81,18 @@ deploy:
- provider: npm
tag: next
skip-cleanup: true
tag: latest
on:
tags: true
all-branches: true
condition: $TRAVIS_BRANCH =~ ^v2.
email: "[email protected]"
api-key: "$NPM_TOKEN"
- provider: npm
skip-cleanup: true
tag: next
on:
tags: true
branch: v2
email: "[email protected]"
api-key: "$NPM_TOKEN"
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ des *outils en ligne de commande*.
>
> Plus de 500 exemples pour apprendre en pratiquant.

✅ **Versions couvertes** • `node v10` • `npm v6`.<br>
✅ **Versions couvertes** • `node v12` • `npm v6`.<br>
📖 **Journal de bord d'écriture** • [2018][journal-2018] • [2017][journal-2017].<br>
🔎 **Lire l'ouvrage** • [sur papier](#sur-papier) • [sur liseuse numérique](#sur-liseuse-numérique) • [sur le web](#sur-le-web) • [sur npm](#avec-nodejs).

Expand All @@ -28,7 +28,9 @@ des *outils en ligne de commande*.
| **[Créer une application web][ch07]** | _ça marche comment HTTP ?_ | [issues][ch07-issues]
| **[Créer un outil en ligne de commande][ch08]** | _ça marche comment du code métier dans le terminal ?_ | [issues][ch08-issues]
| **[Créer une application frontend][ch09]** | _ça marche comment les modules Node dans les navigateurs web ?_ | [issues][ch09-issues]
| Annexe : **[Sélection de modules npm][a01]** | _quel(s) module(s) npm choisir ou découvrir ?_ | [issues][appendix-issues]
| Annexe A : **[Sélection de modules npm][a01]** | _quel(s) module(s) npm choisir ou découvrir ?_ | [issues][appendix-issues]
| Annexe B : **[Nouveautés et changements dans Node.js][a02]** | _qu'est-ce je dois prendre en compte dans cette nouvelle version ?_ | [issues][appendix-issues]
| Annexe C : **[Utilisation de cet ouvrage grâce au module npm{nbsp}nodebook][a03]** | _ça marche comment l'exécution des exemples du livre depuis mon terminal ?_ | [issues][appendix-issues]

# Lire l'ouvrage

Expand Down Expand Up @@ -157,6 +159,8 @@ $ npm test
| Chapitre 8 | ![][ch08-deps] | ![][ch08-security]
| Chapitre 9 | ![][ch09-deps] | ![][ch09-security]
| Annexe A | ![][a01-deps] | ![][a01-security]
| Annexe B | ![][a02-deps] | ![][a02-security]
| Annexe C | ![][a03-deps] | ![][a03-security]

## Génération des épreuves

Expand Down Expand Up @@ -263,3 +267,9 @@ Les exemples de code sont placés sous la [licence MIT][].
[appendix-issues]: https://github.com/oncletom/nodebook/labels/:book:%20chapitre:annexes
[a01-deps]: https://david-dm.org/oncletom/nodebook/status.svg?path=appendix-a
[a01-security]: https://snyk.io/test/github/oncletom/nodebook/badge.svg?targetFile=appendix-a/package.json
[a02]: appendix-b/index.adoc
[a02-deps]: https://david-dm.org/oncletom/nodebook/status.svg?path=appendix-b
[a02-security]: https://snyk.io/test/github/oncletom/nodebook/badge.svg?targetFile=appendix-b/package.json
[a03]: appendix-c/index.adoc
[a03-deps]: https://david-dm.org/oncletom/nodebook/status.svg?path=appendix-c
[a03-security]: https://snyk.io/test/github/oncletom/nodebook/badge.svg?targetFile=appendix-c/package.json
24 changes: 17 additions & 7 deletions appendix-a/index.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:appendix-number: A
:chapterId: appendix-a
:sectnums:
:nodeCurrentVersion: v10
:nodeCurrentVersion: v12
:npmCurrentVersion: v6
:revdate: {docdate}
:sourceDir: ./examples
Expand Down Expand Up @@ -396,12 +396,22 @@ suivantes :

----
$ ../node_modules/.bin/htmlhint sample.html
sample.html:
line 1, col 1: Doctype must be first.
line 8, col 10: Id redefinition of [ btn ].
line 10, col 3: Tagname [ BUTTON ] must be lower case.
...
line 10, col 52: Tagname [ BUTTON ] must be lower case.
examples/sample.html
L1 |<html>
^ Doctype must be declared first. (doctype-first)
L4 |</head>
^ <title> must be present in <head> tag. (title-require)
L8 | <button id="btn" class="btn">KO</button>
^ The id value [ btn ] must be unique. (id-unique)
L10 | <BUTTON class='btn__primary--curent btn--active'></BUTTON>
^ The html element name of [ BUTTON ] must be in lowercase.
(tagname-lowercase)
L10 | class='btn__primary--curent btn--active'></BUTTON>
^ The value of attribute [ class ] must be in double quotes.
(attr-value-double-quotes)
L10 |...></BUTTON>
^ The html element name of [ BUTTON ] must be in lowercase.
(tagname-lowercase)
----

=== eslint
Expand Down
55 changes: 26 additions & 29 deletions appendix-a/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions appendix-a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": "^10.0.0"
"node": "^12.0.0"
},
"author": "Thomas Parisot (https://oncletom.io)",
"license": "MIT",
Expand Down Expand Up @@ -41,7 +41,7 @@
"restify-errors": "^6.1.1",
"sanitize-filename": "^1.6.1",
"sinon": "^1.10.3",
"sqlite3": "^4.0.6",
"sqlite3": "^4.0.7",
"tape": "^4.10.1",
"tcomb": "^3.2.29"
}
Expand Down
Loading