@silexlabs/silex 3.0.0-alpha.168 → 3.0.0-alpha.170

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/.silex.js CHANGED
@@ -21,13 +21,47 @@
21
21
 
22
22
  const SslPlugin = require('./dist/plugins/server/plugins/server/SslPlugin').default
23
23
  const StaticPlugin = require('./dist/plugins/server/plugins/server/StaticPlugin').default
24
+ const { join } = require('path')
25
+ const nodeModules = require('node_modules-path')
24
26
 
25
27
  module.exports = async function(config, options) {
26
28
  try {
27
29
  await config.addPlugin([
28
30
  SslPlugin,
29
31
  StaticPlugin,
30
- ])
32
+ ], {
33
+ [StaticPlugin]: {
34
+ routes: [
35
+ {
36
+ route: '/',
37
+ path: join(__dirname, 'public'),
38
+ }, {
39
+ route: '/css/',
40
+ path: nodeModules('@fortawesome/fontawesome-free') + '/@fortawesome/fontawesome-free/css/',
41
+ }, {
42
+ route: '/webfonts/',
43
+ path: nodeModules('@fortawesome/fontawesome-free') + '/@fortawesome/fontawesome-free/webfonts/',
44
+ }, {
45
+ route: '/css/files/',
46
+ path: nodeModules('@fontsource/ubuntu') + '/@fontsource/ubuntu/files/',
47
+ }, {
48
+ route: '/',
49
+ path: join(__dirname, 'dist', 'client'),
50
+ }, {
51
+ route: '/',
52
+ path: join(__dirname, 'dist', 'plugins', 'client'),
53
+ },
54
+ ]
55
+ // add project route for source maps
56
+ .concat(config.debug ? [{
57
+ route: '/',
58
+ path: './',
59
+ }, {
60
+ route: '/js/',
61
+ path: nodeModules('@silexlabs/silex-cms') + '/@silexlabs/silex-cms/',
62
+ }] : []),
63
+ },
64
+ })
31
65
  } catch(e) {
32
66
  console.error(e)
33
67
  }
@@ -1,10 +1,11 @@
1
+ import { TemplateResult } from 'lit-html';
1
2
  import { WebsiteSettings } from '../../types';
2
3
  export declare const idCodeWrapper = "settings-head-wrapper";
3
4
  export declare function isSite(model: any): boolean;
4
5
  export interface SettingsSection {
5
6
  id: string;
6
7
  label: string;
7
- render: (settings: WebsiteSettings, model: any) => any;
8
+ render: (settings: WebsiteSettings, model: any) => TemplateResult;
8
9
  }
9
10
  /**
10
11
  * This is the settings dialog default sections
@@ -1 +1,2 @@
1
+ export declare const cmdPauseAutoSave = "pause-auto-save";
1
2
  export declare const storagePlugin: (editor: any) => void;