ember-tribe 2.2.1 → 2.3.0
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.
|
@@ -7,18 +7,17 @@ if (($_ENV['TRIBE_API_URL'] ?? false) && $_ENV['TRIBE_API_URL'] != '') {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// re-create models folder
|
|
10
|
-
$commands = "[
|
|
10
|
+
$commands = "[ -d app/models ] && rm -r app/models && mkdir app/models; ";
|
|
11
11
|
// remove test for models
|
|
12
|
-
$commands .= "[
|
|
12
|
+
$commands .= "[ -d tests/unit/models ] && rm -r tests/unit/models; ";
|
|
13
13
|
|
|
14
14
|
foreach (array_keys($types) as $type) {
|
|
15
15
|
if ($type == 'webapp' || in_array($type, ($types['webapp']['interface_urls'][basename(dirname(__FILE__))]['types'] ?? array_keys($types)))) {
|
|
16
16
|
|
|
17
17
|
$type_hyphen = str_replace('_', '-', $type);
|
|
18
18
|
$type_ucwords = str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
|
|
19
|
-
$commands .= "echo \"import Model, { attr } from '@ember-data/model'
|
|
19
|
+
$commands .= "echo \"import Model, { attr } from '@ember-data/model';\n\nexport default class ".$type_ucwords."Model extends Model {\n @attr slug;\n @attr modules;\n}\" > app/models/".$type_hyphen.".js; ";
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
exec($commands);
|
|
24
|
-
?>
|
package/package.json
CHANGED
|
File without changes
|