UNPKG

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