@silexlabs/silex 3.0.0-alpha.30 → 3.0.0-alpha.32

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.
Files changed (41) hide show
  1. package/.silex.js +1 -8
  2. package/CONTRIBUTING.md +48 -25
  3. package/README.md +94 -0
  4. package/dist/client/css/admin.css +4 -66
  5. package/dist/client/js/main.js +45 -95
  6. package/dist/client/js/main.js.LICENSE.txt +1 -1
  7. package/dist/constants.js +4 -0
  8. package/dist/page.js +15 -0
  9. package/dist/server/cli.js +9 -0
  10. package/dist/server/config.js +31 -11
  11. package/dist/server/{start.js → express.js} +1 -1
  12. package/dist/server/index.js +9 -3
  13. package/dist/types.js +34 -0
  14. package/package.json +5 -4
  15. package/public/silex.js +25 -0
  16. package/src/example-client-config.js +47 -0
  17. package/src/plugins/DefaultBackend.js +19 -4
  18. package/src/plugins/ExpressPlugin.js +9 -0
  19. package/src/plugins/PublishPlugin.js +4 -4
  20. package/src/plugins/WebsitePlugin.js +77 -18
  21. package/src/ts/client/config.ts +20 -2
  22. package/src/ts/client/grapesjs/blocks.ts +18 -86
  23. package/src/ts/client/grapesjs/index.ts +22 -8
  24. package/src/ts/client/grapesjs/internal-links.test.ts +1 -0
  25. package/src/ts/client/grapesjs/publish.ts +4 -4
  26. package/src/ts/client/grapesjs/semantic.ts +1 -0
  27. package/src/ts/client/index.ts +21 -8
  28. package/src/ts/constants.ts +5 -0
  29. package/src/ts/server/cli.ts +6 -0
  30. package/src/ts/server/config.ts +45 -16
  31. package/src/ts/server/{start.ts → express.ts} +1 -1
  32. package/src/ts/server/index.ts +9 -2
  33. package/src/ts/types.ts +6 -12
  34. package/tsconfig-server-debug.json +2 -2
  35. package/tsconfig-server-release.json +2 -2
  36. package/tsconfig.json +2 -2
  37. package/webpack.config.js +0 -1
  38. package/public/example-config.js +0 -31
  39. package/readme.md +0 -51
  40. /package/dist/{server/events.js → events.js} +0 -0
  41. /package/src/ts/{server/events.ts → events.ts} +0 -0
@@ -1,88 +1,20 @@
1
- import * as grapesjs from 'grapesjs/dist/grapes.min.js'
2
-
3
- const pluginName = 'blocks'
4
- const clsContainer = 'silex-container'
5
- const clsSection = 'silex-section'
6
- const clsSectionBackground = 'silex-section-background'
7
-
8
- export const blocksPlugin = grapesjs.plugins.add(pluginName, (editor, opts) => {
9
- // Make row and column classes private
10
- const privateCls = [clsSection, clsSectionBackground, clsContainer]
11
- .map(cls => '.' + cls)
12
- editor.on(
13
- 'selector:add',
14
- selector => privateCls.indexOf(selector.getFullName()) >= 0 && selector.set('private', 1)
15
- )
16
- ;[
17
- // {
18
- // id: 'section',
19
- // def: {
20
- // label: 'Section',
21
- // category: 'Containers',
22
- // attributes: { class: 'fa fa-list-alt' },
23
- // draggable: 'body',
24
- // content: {
25
- // tagName: 'section',
26
- // styles: `
27
- // .${clsSectionBackground} {
28
- // display: flex;
29
- // justify-content: center;
30
- // }
31
- // `,
32
- // components: [
33
- // {
34
- // tagName: 'div',
35
- // name: 'Section container',
36
- // attributes: { class: ['website-width'] },
37
- // draggable: false,
38
- // removable: false,
39
- // resizable: true,
40
- // styles: `
41
- // .${clsSection} {
42
- // min-height: 100px;
43
- // width: 1200px;
44
- // }
45
- // `,
46
- // },
47
- // ],
48
- // },
49
- // },
50
- // },
51
- {
52
- id: 'container',
53
- def: {
54
- label: 'Container',
55
- category: 'Basics',
56
- attributes: { class: 'container-png' },
57
- content: {
58
- type: 'container',
59
- style: {
60
- 'min-height': '100px',
61
- },
62
- },
1
+ export const blocksPlugin = (editor, opts) => {
2
+ // Defaults
3
+ const options = {
4
+ ...opts,
5
+ }
6
+ // Container block
7
+ const containerId = 'container'
8
+ editor.BlockManager.add(containerId, {
9
+ label: 'Container',
10
+ category: 'Basics',
11
+ attributes: { class: 'container-png' },
12
+ content: {
13
+ type: containerId, // display as "Container"
14
+ style: {
15
+ 'min-height': '100px',
63
16
  },
64
17
  },
65
- // {
66
- // id: 'link-block',
67
- // def: {
68
- // category: 'Containers',
69
- // label: 'Link Block',
70
- // attributes: { class: 'fa fa-link' },
71
- // content: {
72
- // type: 'link',
73
- // editable: false,
74
- // droppable: true,
75
- // resizable: true,
76
- // style:{
77
- // display: 'inline-block',
78
- // padding: '5px',
79
- // 'min-height': '100px',
80
- // 'width': '100px'
81
- // }
82
- // },
83
- // },
84
- // },
85
- ]
86
- .forEach(block => editor.BlockManager.add(block.id, block.def))
87
- })
88
-
18
+ })
19
+ editor.DomComponents.addType(containerId, {})
20
+ }
@@ -14,7 +14,7 @@ import styleFilterPlugin from 'grapesjs-style-filter'
14
14
  import formPlugin from 'grapesjs-plugin-forms'
15
15
  import codePlugin from 'grapesjs-custom-code'
16
16
  import uiSuggestClasses from '@silexlabs/grapesjs-ui-suggest-classes'
17
- import symbolsPlugin from '@silexlabs/grapesjs-symbols/src'
17
+ import symbolsPlugin from '@silexlabs/grapesjs-symbols'
18
18
  import loadingPlugin from '@silexlabs/grapesjs-loading'
19
19
  import fontsDialogPlugin, { cmdOpenFonts } from '@silexlabs/grapesjs-fonts'
20
20
  import symbolDialogsPlugin, { cmdPromptAddSymbol } from './symbolDialogs'
@@ -60,8 +60,6 @@ plugins
60
60
  throw new Error(`Plugin ${p.name} could not be loaded correctly`)
61
61
  })
62
62
 
63
- export function getPlugins() { return plugins }
64
-
65
63
  // ////////////////////
66
64
  // Config
67
65
  // ////////////////////
@@ -86,7 +84,7 @@ export function getEditorConfig(id: string, rootUrl: string) {
86
84
  },
87
85
 
88
86
  assetManager: {
89
- upload: `${rootUrl}/assets/`,
87
+ upload: `${rootUrl}assets/`,
90
88
  },
91
89
 
92
90
  storageManager: {
@@ -94,8 +92,8 @@ export function getEditorConfig(id: string, rootUrl: string) {
94
92
  type: 'remote',
95
93
  options: {
96
94
  remote: {
97
- urlStore: `${rootUrl}/website/?id=${id}`,
98
- urlLoad: `${rootUrl}/website/?id=${id}`,
95
+ urlStore: `${rootUrl}website/?id=${id}`,
96
+ urlLoad: `${rootUrl}website/?id=${id}`,
99
97
  },
100
98
  },
101
99
  },
@@ -214,10 +212,16 @@ export function getEditorConfig(id: string, rootUrl: string) {
214
212
  // Keep a ref to the editor singleton
215
213
  let editor
216
214
 
217
- export function initEditor(config: EditorConfig) {
215
+ export function initEditor(config: EditorConfig, grapesJsPlugins) {
218
216
  if(editor) throw new Error('Grapesjs editor already created')
219
217
 
220
- editor = grapesjs.init(config)
218
+ editor = grapesjs.init({
219
+ plugins: [
220
+ ...grapesJsPlugins,
221
+ ...config.plugins,
222
+ ],
223
+ ...config,
224
+ })
221
225
 
222
226
  // customize the editor
223
227
  ;['text']
@@ -253,6 +257,16 @@ export function initEditor(config: EditorConfig) {
253
257
  // use the style filter plugin
254
258
  editor.StyleManager.addProperty('extra',{ extend: 'filter' })
255
259
  })
260
+
261
+ editor.StorageManager.onError = (type: string, err: Error) => {
262
+ editor.Modal.open(type === 'load' ? {
263
+ title: 'Error loading website',
264
+ content: `This website could not be loaded.<br><hr>Error: ${err.message}`,
265
+ } : {
266
+ title: 'Error saving website',
267
+ content: `This website could not be saved.<br><hr>Error: ${err.message}`,
268
+ })
269
+ }
256
270
  }
257
271
 
258
272
  export function getEditor() {
@@ -1,4 +1,5 @@
1
1
  import { internalLinksPlugin } from './internal-links'
2
+ import { expect, test, beforeEach } from '@jest/globals'
2
3
  import grapesjs from 'grapesjs'
3
4
 
4
5
  let editor
@@ -8,7 +8,7 @@ import { onAll } from '../utils'
8
8
  const pluginName = 'publish'
9
9
  export const cmdPublish = 'publish-open-dialog'
10
10
  let _token = null
11
- let projectId
11
+ let id
12
12
  let rootUrl
13
13
 
14
14
  // plugin code
@@ -19,7 +19,7 @@ export const publishPlugin = grapesjs.plugins.add(pluginName, (editor, opts) =>
19
19
  }
20
20
  // Global config
21
21
  rootUrl = opts.rootUrl
22
- projectId = opts.projectId
22
+ id = opts.id
23
23
  // Keep track of the token
24
24
  editor.on('login:success', async ({ getUser, getToken }) => {
25
25
  _token = await getToken()
@@ -248,7 +248,7 @@ export async function startPublication(editor) {
248
248
  ...projectData,
249
249
  settings: siteSettings,
250
250
  publication: publicationSettings,
251
- projectId,
251
+ id,
252
252
  files,
253
253
  }
254
254
  // Reset asset URLs
@@ -282,7 +282,7 @@ export async function startPublication(editor) {
282
282
  let res
283
283
  let json
284
284
  try {
285
- res = await fetch(`${ rootUrl }/publish`, {
285
+ res = await fetch(`${ rootUrl }publish`, {
286
286
  method: 'POST',
287
287
  body: JSON.stringify({
288
288
  data,
@@ -20,6 +20,7 @@ const tags = [
20
20
  'SECTION',
21
21
  'ADDRESS',
22
22
  'ARTICLE',
23
+ 'BUTTON',
23
24
  'NAV',
24
25
  'HEADER',
25
26
  'FOOTER',
@@ -4,11 +4,9 @@
4
4
  *
5
5
  */
6
6
 
7
- // Get env vars from webpack (see plugin in webpack.config.js)
8
- declare const CONFIG_URL: string
9
-
10
7
  import { SilexConfig } from './config'
11
8
  import { initEditor, getEditor } from './grapesjs/index'
9
+ import { EVENT_STARTUP_START, EVENT_STARTUP_END } from '../events'
12
10
 
13
11
  /**
14
12
  * Start Silex, called from host HTML page with window.silex.start()
@@ -17,22 +15,37 @@ export async function start(options = {}) {
17
15
  const config = new SilexConfig()
18
16
  Object.assign(config, options)
19
17
 
20
- // Initial config file
21
- if(CONFIG_URL) {
22
- await config.addPlugin(CONFIG_URL, {})
23
- }
18
+ // Config file in root folder which can be generated by the server
19
+ console.log('Loading config', config.clientConfigUrl)
20
+ //import(/* webpackIgnore: true */ config.clientConfigUrl)
21
+ //.then((configFile) => console.log('Config loaded', configFile))
22
+ //.catch((e) => console.error('Config error', config.clientConfigUrl, e))
23
+ await config.addPlugin(config.clientConfigUrl, {})
24
24
 
25
25
  // Debug mode
26
26
  if (config.debug) {
27
27
  console.warn('Silex starting in debug mode.', {config})
28
28
  }
29
29
 
30
+ // Notify plugins that loading is over and Silex is starting
31
+ config.emit(EVENT_STARTUP_START)
32
+
30
33
  // Start grapesjs
31
- initEditor(config.editor)
34
+ console.log('start', {config})
35
+ try{
36
+ initEditor(config.editor, config.grapesJsPlugins)
37
+ } catch(e) {
38
+ console.error('Error starting Silex', e)
39
+ }
40
+
41
+ // Init internationalization module
42
+ getEditor().I18n.setLocale(config.lang)
32
43
 
33
44
  // End of loading
34
45
  getEditor().on('load', () => {
46
+ console.log('Silex started')
35
47
  document.querySelector('.silex-loader').classList.add('silex-dialog-hide')
36
48
  document.querySelector('#gjs').classList.remove('silex-dialog-hide')
49
+ config.emit(EVENT_STARTUP_END)
37
50
  })
38
51
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @fileoverview define constants for Silex client and server
3
+ */
4
+
5
+ export const CLIENT_CONFIG_FILE_NAME = 'silex.js'
@@ -12,6 +12,9 @@ const options = parse({
12
12
  'ssl-certificate': [ false, 'Path to SSL certificate', 'file'],
13
13
  'force-https-trust-xfp-header': [ false, 'Sets the trustXFPHeader param of the express module "cookie-session". Use only with --force-https', 'boolean'],
14
14
  'session-secret': ['s', 'Session secret', 'string'],
15
+ 'cors-url': ['', 'Enable CORS for URL (can be "*")', 'string'],
16
+ 'client-config': ['', 'Path to client config file to be served on .silex-client.js', 'string'],
17
+ 'fs-root': ['', 'Path to the root folder where to store websites. Used by the default backend (fs).', 'string'],
15
18
  }, {})
16
19
 
17
20
  if(options.config) process.env.CONFIG = options.config
@@ -23,5 +26,8 @@ if(options['ssl-private-key']) process.env.SILEX_SSL_PRIVATE_KEY = options['ssl-
23
26
  if(options['ssl-certificate']) process.env.SILEX_SSL_CERTIFICATE = options['ssl-certificate']
24
27
  if(options['force-https-trust-xfp-header']) process.env.SILEX_FORCE_HTTPS_TRUST_XFP_HEADER = options['force-https-trust-xfp-header']
25
28
  if(options['session-secret']) process.env.SILEX_SESSION_SECRET = options['session-secret']
29
+ if(options['cors-url']) process.env.SILEX_CORS_URL = options['cors-url']
30
+ if(options['client-config']) process.env.SILEX_CLIENT_CONFIG = options['client-config']
31
+ if(options['fs-root']) process.env.FS_ROOT = options['fs-root']
26
32
 
27
33
  import './index'
@@ -9,16 +9,20 @@
9
9
 
10
10
  import { Config, Plugin } from '@silexlabs/silex-plugins'
11
11
  import { resolve } from 'path'
12
+ import { CLIENT_CONFIG_FILE_NAME } from '../constants'
13
+ import { Router } from 'express'
14
+ import { readFile } from 'fs/promises'
15
+ import { EVENT_STARTUP_START } from '../events'
12
16
 
13
17
  /**
14
18
  * Config types definitions
15
19
  */
16
20
  export class ServerConfig extends Config {
17
21
  constructor(
18
- public url: string,
19
- public debug: boolean,
20
- public port: string,
21
- public apiPath: string
22
+ public url: string,
23
+ public debug: boolean,
24
+ public port: string,
25
+ public apiPath: string,
22
26
  ) {
23
27
  super()
24
28
  }
@@ -28,13 +32,49 @@ export class ServerConfig extends Config {
28
32
  export default async function(): Promise<ServerConfig> {
29
33
  const port = process.env.PORT || '6805' // 6805 is the date of sexual revolution started in paris france 8-)
30
34
  const debug = process.env.SILEX_DEBUG === 'true'
35
+ const clientConfigPath = process.env.SILEX_CLIENT_CONFIG
31
36
 
32
37
  const url = process.env.SERVER_URL || `http://localhost:${port}`
33
38
  const config = new ServerConfig(url, debug, port, '/api')
34
39
 
40
+ // Serve the client side config file
41
+ if (clientConfigPath) {
42
+ config.on(EVENT_STARTUP_START, async ({ app }) => {
43
+ console.log(`> Serving client side config ${clientConfigPath} at ${CLIENT_CONFIG_FILE_NAME}`)
44
+ // Attach the route immediately
45
+ const router = Router()
46
+ app.use(router)
47
+ // Load the config file and serve it
48
+ let clientConfig = (await readFile(clientConfigPath as string)).toString()
49
+ router.get(`/${CLIENT_CONFIG_FILE_NAME}`, async (res, req, next) => {
50
+ // Reload each time in debug mode
51
+ if (config.debug) {
52
+ console.log('[Debug mode] Reloading config file', clientConfigPath)
53
+ clientConfig = (await readFile(clientConfigPath)).toString()
54
+ }
55
+ // Send the config file
56
+ req.header('Content-Type', 'application/javascript').send(clientConfig)
57
+ })
58
+ })
59
+ }
60
+
61
+ // Optional config file
62
+ // Load this config file before the main config file so that routes can be overriden
63
+ // Or listen for event silex:startup:end to add routes after the default ones
64
+ if (process.env.CONFIG) {
65
+ const userConfigPath: Plugin = process.env.CONFIG
66
+ console.log('> Loading user config', userConfigPath)
67
+ try {
68
+ // Initiate the process with the config file which is just another plugin
69
+ await config.addPlugin(userConfigPath, {})
70
+ } catch (e) {
71
+ throw new Error(`User config file ${userConfigPath} error: ${e.message}`)
72
+ }
73
+ }
74
+
35
75
  // Config file in root folder
36
76
  const configFilePath: Plugin = resolve(__dirname, '../../.silex.js')
37
- console.log('Loading config', configFilePath)
77
+ console.log('> Loading config', configFilePath)
38
78
  try {
39
79
  // Initiate the process with the config file which is just another plugin
40
80
  await config.addPlugin(configFilePath, {})
@@ -45,17 +85,6 @@ export default async function(): Promise<ServerConfig> {
45
85
  throw new Error(`Error in config file ${configFilePath}: ${e.message}`)
46
86
  }
47
87
  }
48
- // Optional config file
49
- if (process.env.CONFIG) {
50
- const userConfigPath: Plugin = process.env.CONFIG
51
- console.log('Loading user config', userConfigPath)
52
- try {
53
- // Initiate the process with the config file which is just another plugin
54
- await config.addPlugin(userConfigPath, {})
55
- } catch (e) {
56
- throw new Error(`User config file ${userConfigPath} not found: ${e.message}`)
57
- }
58
- }
59
88
 
60
89
  // Return the config file
61
90
  return config
@@ -1,7 +1,7 @@
1
1
  import express, { Application } from 'express'
2
2
 
3
3
  import { ServerConfig } from './config'
4
- import { EVENT_STARTUP_START, EVENT_STARTUP_END } from './events'
4
+ import { EVENT_STARTUP_START, EVENT_STARTUP_END } from '../events'
5
5
 
6
6
  export default async function(config: ServerConfig): Promise<Application> {
7
7
  // Plugins hook to create API routes
@@ -1,5 +1,12 @@
1
1
  import getConfig from './config'
2
- import start from './start'
2
+ import start from './express'
3
+
4
+ import * as config from './config'
5
+ import * as types from '../types'
6
+ import * as events from '../events'
7
+ import * as constants from '../constants'
8
+ import * as page from '../page'
9
+ export default { config, types, events, constants, page }
3
10
 
4
11
  // Main app
5
12
  async function main() {
@@ -30,7 +37,7 @@ async function startLiverReload() {
30
37
  const server = createServer({
31
38
  delay: 0,
32
39
  }, () => {
33
- console.info(`\nDebug mode\nLive reload server is running.\nWatching ${dist}`)
40
+ console.info(`\n> Debug mode\n> Live reload server is running.\n> Watching ${dist}`)
34
41
  })
35
42
  server.watch(dist)
36
43
  }
package/src/ts/types.ts CHANGED
@@ -2,11 +2,8 @@
2
2
  * @fileoverview define types for Silex client and server
3
3
  */
4
4
 
5
- export const WEBSITE_CONTEXT_RUNTIME_CLASS_NAME = 'silex-runtime'
6
- export const WEBSITE_CONTEXT_EDITOR_CLASS_NAME = 'silex-editor'
7
-
8
5
  // Note: paths begin and end **without** slash
9
- export const defaultSettings: PublicationSettings = {
6
+ export const defaultPublicationSettings: PublicationSettings = {
10
7
  path: 'publication',
11
8
  url: '',
12
9
  autoHomePage: true,
@@ -16,7 +13,7 @@ export const defaultSettings: PublicationSettings = {
16
13
  }
17
14
 
18
15
  export const defaultSite: WebsiteData = {
19
- pages: [],
16
+ pages: [{name: 'Main', id: 'main', frames: [{component: {type: 'text', stylable: []}, components: []}]}],
20
17
  assets: [],
21
18
  styles: [],
22
19
  name: 'New website',
@@ -24,18 +21,15 @@ export const defaultSite: WebsiteData = {
24
21
  description: '',
25
22
  title: '',
26
23
  head: '',
27
- lang: 'en',
28
- favicon: 'https://editor.silex.me/assets/favicon.png',
24
+ lang: '',
25
+ favicon: '',
29
26
  'og:title': '',
30
27
  'og:description': '',
31
28
  'og:image': '',
32
29
  },
33
- fonts: [
34
- { name: 'Arial', value: 'Arial, Helvetica, sans-serif', variants: [] },
35
- { name: 'Times New Roman', value: '"Times New Roman", Times, serif', variants: [] },
36
- ],
30
+ fonts: [],
37
31
  symbols: [],
38
- publication: defaultSettings,
32
+ publication: defaultPublicationSettings,
39
33
  }
40
34
 
41
35
  export interface WebsiteSettings {
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "compileOnSave": true,
3
3
  "compilerOptions": {
4
- "outDir": "dist/server/",
4
+ "outDir": "dist/",
5
5
  "target": "esnext",
6
6
  "watch": false,
7
7
  "inlineSourceMap": true,
8
- "module": "commonjs",
8
+ "module": "CommonJS",
9
9
  "removeComments": false,
10
10
  "esModuleInterop": true, /* for import 'Events' in silex-plugins */
11
11
  "typeRoots": [
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "compileOnSave": false,
3
3
  "compilerOptions": {
4
- "outDir": "dist/server/",
4
+ "outDir": "dist/",
5
5
  "target": "esnext",
6
6
  "watch": false,
7
7
  "sourceMap": false,
8
- "module": "commonjs",
8
+ "module": "CommonJS",
9
9
  "removeComments": true,
10
10
  "esModuleInterop": true, /* for import 'Events' in silex-plugins */
11
11
  "typeRoots": [
package/tsconfig.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "compileOnSave": true,
3
3
  "compilerOptions": {
4
4
  "outDir": "dist/client/",
5
- "target": "ES2022",
5
+ "target": "ESNext",
6
6
  "watch": true,
7
7
  "sourceMap": true,
8
- "module": "esnext",
8
+ "module": "ESNext",
9
9
  "removeComments": false,
10
10
  "allowJs": true,
11
11
  "typeRoots": [
package/webpack.config.js CHANGED
@@ -23,7 +23,6 @@ module.exports = {
23
23
  plugins: [
24
24
  new webpack.DefinePlugin({
25
25
  VERSION: JSON.stringify(require("./package.json").version),
26
- CONFIG_URL: process.env.CONFIG_URL && JSON.stringify(process.env.CONFIG_URL),
27
26
  }),
28
27
  ]
29
28
  };
@@ -1,31 +0,0 @@
1
- export default async function(config, options) {
2
- //await config.addPlugin('gjs-blocks-basic', 'https://unpkg.com/grapesjs-blocks-basic', {
3
- // blocks: ['text', 'image', 'video', 'map'],
4
- //})
5
-
6
- // Optional plugins
7
- await config.addPlugin([
8
- '@silexlabs/grapesjs-directus-storage',
9
- './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js',
10
- ], {
11
- '@silexlabs/grapesjs-directus-storage': {
12
- directusUrl: 'http://localhost:8055',
13
- },
14
- './plugins/@silexlabs/grapesjs-directus-storage/dist/index.js': {
15
- directusUrl: 'http://localhost:8055',
16
- },
17
- })
18
-
19
- // Return an object to override default config
20
- return {
21
- ...config,
22
- ...options,
23
- editor: {
24
- ...config.editor,
25
- storageManager: {
26
- autoload: false,
27
- type: 'directus',
28
- },
29
- },
30
- }
31
- }
package/readme.md DELETED
@@ -1,51 +0,0 @@
1
- [![status of silex.me instance](https://monitoshi.lexoyo.me/badge/1525963562293-6552)](https://editor.silex.me) [![Join the chat at https://gitter.im/silex-website-builder/community](https://badges.gitter.im/silex-website-builder/community.svg)](https://gitter.im/silex-website-builder/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
-
3
- ![Silex UI](https://github.com/silexlabs/www.silex.me/raw/gh-pages/assets/silex-ui.gif)
4
-
5
- ## About Silex, live web creation.
6
-
7
- | :fire: Developers can test silex v3 with `npx @silexlabs/silex` |
8
- |-------------------------------------------------------------------------------|
9
-
10
- Silex, is a free and open source website builder in the cloud. Create websites directly in the browser without writing code. And it is suitable for professional designers to produce great websites without constraints. Silex is also known as the HTML5 editor.
11
-
12
- Brought to you by Silex Labs team, promoting free software. Feel free to [use the free Silex instance](https://editor.silex.me/) provided by [Silex Labs foundation](https://www.silexlabs.org/).
13
-
14
- Silex for makers and web designers who want a free alternative to Webflow or other closed source website builders:
15
-
16
- * [Use Silex online for free](https://editor.silex.me)
17
- * [Silex desktop app (works offline, with your local files)](https://github.com/silexlabs/silex-desktop/)
18
- * [Silex official website](http://www.silex.me/)
19
- * [Documentation wiki](https://github.com/silexlabs/Silex/wiki)
20
- * [Silex forums](https://github.com/silexlabs/Silex/issues)
21
- * [subscribe to Silex news by email (a few messages per year)](http://eepurl.com/F48q5) and follow us on [Facebook](http://www.facebook.com/silexlabs), [Twitter](https://twitter.com/silexlabs)
22
-
23
-
24
- Silex for professionals, agencies and hosting companies:
25
-
26
- * [Install Silex on your computer or server](https://github.com/silexlabs/Silex/wiki/How-to-Host-An-Instance-of-Silex#as-a-web-app-silex-web-version) (basically this is `npm install -g silex-website-builder && silex`)
27
- * If you know HTML and CSS here is how to [add your own components to the "+" menu](https://github.com/silexlabs/Silex/wiki/Create-Silex-components)
28
- * If you are a designer, here is how to [add your own templates to Silex](https://github.com/silexlabs/Silex/wiki/Create-templates-for-Silex)
29
- * If you are a freelance designer and wants to create Silex website for clients, [please leave your email here](http://eepurl.com/gjYnib)
30
- * If you are looking for a designer to help you create your website, [please leave your email here](http://eepurl.com/gjYnib)
31
- * [Hire a contributor from this list](https://github.com/silexlabs/Silex/graphs/contributors) or [from one](https://github.com/silexlabs/unifile/graphs/contributors) [of these](https://github.com/silexlabs/CloudExplorer2/graphs/contributors) [other lists](https://github.com/silexlabs/drag-drop-stage-component/graphs/contributors)
32
-
33
-
34
- Other links
35
-
36
- * [Silex meta repository for Silex contribution](https://github.com/silexlabs/silex-meta)
37
- * [Silex is dual licensed under GPL or MPL](http://www.silexlabs.org/silex/silex-licensing/)
38
- * [Road map](https://github.com/silexlabs/Silex/milestones)
39
- * [Change log](https://github.com/silexlabs/Silex/pulls?utf8=%E2%9C%93&q=is%3Apr)
40
- * [Open positions, join the team](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22open+position%22)
41
- * [Become a core contributor with these issues to get started](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
42
- * [Testers, docs and other help wanted annoucements](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
43
-
44
- ## Dependencies
45
-
46
- The upstream projects we use in Silex are all listed in [Silex meta package](https://github.com/silexlabs/silex-meta)
47
-
48
- ## Github stars history
49
-
50
- [![Star History Chart](https://api.star-history.com/svg?repos=silexlabs/Silex&type=Timeline)](https://star-history.com/#silexlabs/Silex&Timeline)
51
-
File without changes
File without changes