ether-code 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/ether.js +16 -11
- package/package.json +1 -1
package/cli/ether.js
CHANGED
|
@@ -6,7 +6,7 @@ const http = require('http')
|
|
|
6
6
|
const { EtherCompiler } = require('./compiler')
|
|
7
7
|
const { Watcher } = require('./watcher')
|
|
8
8
|
|
|
9
|
-
const VERSION = '0.2.
|
|
9
|
+
const VERSION = '0.2.4'
|
|
10
10
|
|
|
11
11
|
const COLORS = {
|
|
12
12
|
reset: '\x1b[0m',
|
|
@@ -746,9 +746,8 @@ document.addEventListener "DOMContentLoaded", initialiser
|
|
|
746
746
|
logSuccess('Projet initialisé avec succès!')
|
|
747
747
|
console.log('')
|
|
748
748
|
logInfo('Prochaines étapes:')
|
|
749
|
-
console.log(` 1.
|
|
750
|
-
console.log(` 2.
|
|
751
|
-
console.log(` 3. Ouvrir ${COLORS.cyan}http://localhost:3000${COLORS.reset} dans le navigateur`)
|
|
749
|
+
console.log(` 1. Lancer ${COLORS.cyan}ether dev${COLORS.reset} pour le mode développement`)
|
|
750
|
+
console.log(` 2. Éditer les fichiers dans ${COLORS.cyan}src/${COLORS.reset}`)
|
|
752
751
|
console.log('')
|
|
753
752
|
}
|
|
754
753
|
|
|
@@ -819,11 +818,13 @@ async function cmdBuild(options) {
|
|
|
819
818
|
|
|
820
819
|
const duration = Date.now() - startTime
|
|
821
820
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
821
|
+
if (!options.quiet) {
|
|
822
|
+
console.log('')
|
|
823
|
+
if (errorCount === 0) {
|
|
824
|
+
logSuccess(`${successCount} fichier(s) compilé(s) en ${duration}ms`)
|
|
825
|
+
} else {
|
|
826
|
+
logWarning(`${successCount} succès, ${errorCount} erreur(s) en ${duration}ms`)
|
|
827
|
+
}
|
|
827
828
|
}
|
|
828
829
|
}
|
|
829
830
|
|
|
@@ -848,14 +849,18 @@ async function cmdDev(options) {
|
|
|
848
849
|
logInfo(`Sortie vers ${outDir}`)
|
|
849
850
|
console.log('')
|
|
850
851
|
|
|
851
|
-
|
|
852
|
+
try {
|
|
853
|
+
await cmdBuild({ ...options, quiet: true })
|
|
854
|
+
} catch (err) {
|
|
855
|
+
logWarning(`Erreur lors de la compilation initiale: ${err.message}`)
|
|
856
|
+
}
|
|
852
857
|
|
|
853
858
|
let devServer = null
|
|
854
859
|
if (!options.noServer) {
|
|
855
860
|
devServer = createDevServer(outDir, port)
|
|
861
|
+
console.log('')
|
|
856
862
|
}
|
|
857
863
|
|
|
858
|
-
console.log('')
|
|
859
864
|
logInfo('En attente de modifications... (Ctrl+C pour arrêter)')
|
|
860
865
|
console.log('')
|
|
861
866
|
|