ether-code 0.4.4 → 0.4.5

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/compiler.js CHANGED
@@ -145,17 +145,22 @@ class EtherCompiler {
145
145
  }
146
146
 
147
147
  detectTarget(content, filePath) {
148
- const directiveMatch = content.match(/^\/\/\s*(?:cible|target|@target)\s*:\s*(\w+)/im)
148
+ const atMatch = content.match(/^@(?:cible|target)\s*:\s*(\w+)/im)
149
+ if (atMatch) {
150
+ return atMatch[1].toLowerCase()
151
+ }
152
+
153
+ const directiveMatch = content.match(/^\/\/\s*(?:cible|target|@cible|@target)\s*:\s*(\w+)/im)
149
154
  if (directiveMatch) {
150
155
  return directiveMatch[1].toLowerCase()
151
156
  }
152
157
 
153
- const commentMatch = content.match(/^\/\*\s*(?:cible|target)\s*:\s*(\w+)\s*\*\//im)
158
+ const commentMatch = content.match(/^\/\*\s*(?:cible|target|@cible|@target)\s*:\s*(\w+)\s*\*\//im)
154
159
  if (commentMatch) {
155
160
  return commentMatch[1].toLowerCase()
156
161
  }
157
162
 
158
- const hashMatch = content.match(/^#\s*(?:cible|target)\s*:\s*(\w+)/im)
163
+ const hashMatch = content.match(/^#\s*(?:cible|target|@cible|@target)\s*:\s*(\w+)/im)
159
164
  if (hashMatch) {
160
165
  return hashMatch[1].toLowerCase()
161
166
  }
@@ -249,4 +254,4 @@ class EtherCompiler {
249
254
  }
250
255
  }
251
256
 
252
- module.exports = { EtherCompiler, GENERATORS, TARGET_EXTENSIONS }
257
+ module.exports = { EtherCompiler, GENERATORS, TARGET_EXTENSIONS }
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.4.4'
9
+ const VERSION = '0.4.5'
10
10
 
11
11
  const COLORS = {
12
12
  reset: '\x1b[0m',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ether-code",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Ether - Le langage intentionnel",
5
5
  "main": "cli/compiler.js",
6
6
  "bin": {