ember-tribe 1.1.4 → 1.1.7
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.
|
@@ -6,9 +6,14 @@ $commands = "sudo rm tests/unit/models -R; ";
|
|
|
6
6
|
$commands = "mkdir app/models; ";
|
|
7
7
|
|
|
8
8
|
foreach (array_keys($types) as $type) {
|
|
9
|
-
|
|
10
|
-
$
|
|
11
|
-
|
|
9
|
+
|
|
10
|
+
if (in_array($type, ($types['webapp']['interface_urls'][basename(dirname(__FILE__))]['types'] ?? array_keys($types)))) {
|
|
11
|
+
|
|
12
|
+
$type_hyphen = str_replace('_', '-', $type);
|
|
13
|
+
$type_ucwords = str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
|
|
14
|
+
$commands .= "echo \"import Model, { attr } from '@ember-data/model'; export default class ".$type_ucwords."Model extends Model { @attr modules; }\" > app/models/".$type_hyphen.".js; ";
|
|
15
|
+
|
|
16
|
+
}
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
exec($commands);
|