UNPKG

633 BJavaScriptView Raw
1import maybeMorph from './maybe-morph.js'
2import path from 'path'
3
4export default function morphAllViews({
5 as,
6 getFontImport,
7 getSystemImport,
8 local,
9 filesView,
10 tools,
11 track,
12 viewsById,
13 viewsToFiles,
14}) {
15 return [...filesView]
16 .map(file => viewsToFiles.get(file))
17 .filter(view => !view.custom)
18 .map(view => ({
19 file: path.join(path.dirname(view.file), 'view.js'),
20 content: maybeMorph({
21 as,
22 getFontImport,
23 getSystemImport,
24 local,
25 tools,
26 track,
27 verbose: false,
28 view,
29 viewsById,
30 viewsToFiles,
31 }),
32 }))
33}