1 1
import * as path from 'path';
2 1
import hostComponents from '../hostComponents/node';
3
import type { PluginConstructor } from '@remax/types';
4

5 1
const TPL_DEFAULT_ROOT = path.join(__dirname, '../../templates', 'default');
6 1
const TPL_STATIC_ROOT = path.join(__dirname, '../../templates', 'static');
7

8 1
const plugin: PluginConstructor = () => {
9 1
  return {
10
    meta: {
11
      global: 'my',
12
      template: {
13
        extension: '.axml',
14
        tag: 'import',
15
        src: 'src',
16
      },
17
      style: '.acss',
18
      jsHelper: {
19
        extension: '.sjs',
20
        tag: 'import-sjs',
21
        src: 'from',
22
      },
23
      ejs: {
24
        base: '',
25
        page: path.join(TPL_DEFAULT_ROOT, 'page.ejs'),
26
      },
27
      staticEjs: {
28
        base: '',
29
        page: path.join(TPL_STATIC_ROOT, 'page.ejs'),
30
        isolatedTemplates: path.join(TPL_STATIC_ROOT, 'isolated-templates.ejs'),
31
      },
32
    },
33
    hostComponents,
34
    skipHostComponents: ['swiper-item', 'picker-view-column'],
35
  };
36
};
37

38 1
export default plugin;

Read our documentation on viewing source code .

Loading