Skip to content

Commit d0f2f5c

Browse files
Merge pull request #116 from Haeresis/develop
Update Readme
2 parents 3db99ac + dec7524 commit d0f2f5c

File tree

10 files changed

+69
-53
lines changed

10 files changed

+69
-53
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ Créer facilement des sites JavaScript côté serveur et orienté composant !
1212

1313
## Site Officiel de NodeAtlas ##
1414

15-
**Pour une documentation complète, vous pouvez vous rendre sur [le Site Officiel de NodeAtlas](https://node-atlas.js.org/)** ([README mirroir ici](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/README.fr.md)).
15+
> **Pour une documentation complète, vous pouvez vous rendre sur [le Site Officiel de NodeAtlas](https://node-atlas.js.org/)** ([README.md mirroir ici](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/README.fr.md)).
16+
17+
- [README de la v1.x](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/v1.x/README.fr.md).
1618

1719

1820

TLDR.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
## NodeAtlas Official Website ##
1010

11-
**For a complete documentation, you could refer to [the NodeAtlas Official Website](https://node-atlas.js.org/english/)** ([Mirror README here](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/README.en.md)).
11+
> **For a complete documentation, you could refer to [the NodeAtlas Official Website](https://node-atlas.js.org/english/)** ([Mirror README here](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/README.en.md)).
12+
13+
- [README for v1.x](https://github.com/Haeresis/NodeAtlas/blob/gh-pages/v1.x/README.en.md).
1214

1315

1416

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* @requires {@link NA#modules.external:extend}
2424
* @requires {@link NA#modules.external:forcedomain}
2525
* @requires {@link NA#modules.external:imagemin}
26+
* @requires {@link NA#modules.external:less}
2627
* @requires {@link NA#modules.external:less-middleware}
2728
* @requires {@link NA#modules.external:mkpath}
2829
* @requires {@link NA#modules.external:open}

languages/default.json

Lines changed: 40 additions & 40 deletions
Large diffs are not rendered by default.

languages/en-gb.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"downloadStarting": "Download of all modules in progress...",
55
"installationDone": "All modules have been installed correctly.",
66
"restartRequired": "You can restart the application.",
7-
"installShortcutsDone": "`nodeatlas` command is available as a shortcut for `node <path/to/>node-atlas.js`.",
7+
"installShortcutsDone": "`nodeatlas` command is available as a shortcut for `node <path/to/node-atlas/>`.",
88
"installDone": "node-atlas module successfully installed !"
99
},
1010
"running": {

languages/fr-fr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"downloadStarting": "Téléchargement de tous les modules en cour...",
55
"installationDone": "Tous les modules ont été correctement installé.",
66
"restartRequired": "Vous pouvez redémarrer l'application.",
7-
"installShortcutsDone": "La commande `nodeatlas` est maintenant disponible en tant que raccourci pour `node <path/to/>node-atlas.js`.",
7+
"installShortcutsDone": "La commande `nodeatlas` est maintenant disponible en tant que raccourci pour `node <path/to/node-atlas/>`.",
88
"installDone": "node-atlas a été installé avec succès !"
99
},
1010
"running": {

lib/back-end-part.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,12 +618,12 @@ exports.loadListOfExternalModules = function (callback) {
618618
NA.loadController(NA.webconfig.commonController, function () {
619619

620620
/**
621-
* Folder which contain the `node-atlas.js` node_modules.
621+
* Folder which contain the `node-atlas` node_modules.
622622
* @public
623623
* @alias nodeAtlasModulesPath
624624
* @type {String}
625625
* @memberOf NA#
626-
* @default « path/to/node-atlas.js/node_modules/ »
626+
* @default « path/to/node-atlas/node_modules/ »
627627
*/
628628
NA.nodeAtlasModulesPath = path.join(NA.serverPhysicalPath, 'node_modules');
629629

lib/global-functions.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,15 +229,26 @@ exports.addSpecificVariation = function (specific, languageCode, variation) {
229229
*/
230230
exports.newRender = function (templateFile, variations) {
231231
var NA = this,
232+
data,
232233
ejs = NA.modules.ejs,
233234
fs = NA.modules.fs,
234235
path = NA.modules.path;
235236

236-
/* Generate asynchrone render. */
237-
return ejs.render(
238-
fs.readFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.componentsRelativePath, templateFile), 'utf-8'),
239-
variations
240-
);
237+
try {
238+
/* Transform ejs data and inject incduded file. */
239+
data = ejs.render(
240+
fs.readFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.componentsRelativePath, templateFile), 'utf-8'),
241+
variations
242+
);
243+
} catch (err) {
244+
/* Make error more readable. */
245+
data = err.toString()
246+
.replace(/[\n]/g, "<br>")
247+
.replace(/ /g, "<span style='display:inline-block;width:32px'></span>")
248+
.replace(/ >> /g, "<span style='display:inline-block;width:32px'>&gt;&gt;</span>");
249+
}
250+
251+
return data;
241252
};
242253

243254
/**

test/bad-webconfig/templates/index.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</head>
77
<body>
88
<h1>How to test ?</h1>
9-
<p>You could display this files to « http://localhost:7777/templates/index.htm » and « http://localhost:7777/webconfig.json » with « &lt;/path/to/&gt;node-atlas/node-atlas.js --webconfig.no-webconfig.json --httpPort 7777 » command in « bad-webconfig » directory.</p>
9+
<p>You could display this files to « http://localhost:7777/templates/index.htm » and « http://localhost:7777/webconfig.json » with « &lt;/path/to/node-atlas/&gt; --webconfig.no-webconfig.json --httpPort 7777 » command in « bad-webconfig » directory.</p>
1010
</body>
1111
</html>

test/no-webconfig/index.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
</head>
77
<body>
88
<h1>How to test ?</h1>
9-
<p>You could display this file to « http:/localhost/index.htm » with « &lt;/path/to/&gt;node-atlas/node-atlas.js » command in « no-webconfig » directory.</p>
9+
<p>You could display this file to « http:/localhost/index.htm » with « &lt;/path/to/node-atlas/&gt; » command in « no-webconfig » directory.</p>
1010
</body>
1111
</html>

0 commit comments

Comments
 (0)