@minnai/create-aura-app 0.0.15 → 0.0.17
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/package.json
CHANGED
|
@@ -9,15 +9,21 @@ import { LOCAL_AIRS } from '../../aura.config';
|
|
|
9
9
|
|
|
10
10
|
export const registerExampleAIRs = () => {
|
|
11
11
|
// 1. Register Standard AIRs (Core)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
const coreAIRs = [
|
|
13
|
+
{ data: TasksAIR, id: 'tasks-air' },
|
|
14
|
+
{ data: YouTubeAIR, id: 'youtube-player-air' }
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
coreAIRs.forEach(({ data, id }) => {
|
|
18
|
+
if (LOCAL_AIRS.includes(id)) {
|
|
19
|
+
const air = (data as any).default || data;
|
|
20
|
+
if (air && air.manifest) {
|
|
21
|
+
atmosphere.register({
|
|
22
|
+
...air.manifest,
|
|
23
|
+
component: air.component || air.Component,
|
|
24
|
+
resources: air.resources
|
|
25
|
+
});
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
});
|
|
23
29
|
|
|
@@ -38,9 +44,11 @@ export const registerExampleAIRs = () => {
|
|
|
38
44
|
}
|
|
39
45
|
};
|
|
40
46
|
|
|
47
|
+
const getManifest = (air: any) => (air?.default || air)?.manifest;
|
|
48
|
+
|
|
41
49
|
export const EXAMPLE_AIRS = [
|
|
42
|
-
YouTubeAIR
|
|
43
|
-
TasksAIR
|
|
50
|
+
getManifest(YouTubeAIR),
|
|
51
|
+
getManifest(TasksAIR),
|
|
44
52
|
StocksManifest,
|
|
45
53
|
CurrencyManifest
|
|
46
|
-
].filter(manifest => LOCAL_AIRS.includes(manifest.id));
|
|
54
|
+
].filter(manifest => manifest && LOCAL_AIRS.includes(manifest.id));
|
|
@@ -271,6 +271,13 @@ export default {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
],
|
|
274
|
+
resolve: {
|
|
275
|
+
alias: {
|
|
276
|
+
'react': path.resolve(__dirname, './node_modules/react'),
|
|
277
|
+
'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
|
|
278
|
+
},
|
|
279
|
+
dedupe: ['react', 'react-dom']
|
|
280
|
+
},
|
|
274
281
|
server: {
|
|
275
282
|
port: 5175
|
|
276
283
|
}
|