@silexlabs/silex 3.0.0-alpha.36 → 3.0.0-alpha.38
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/default/.silex.data.json +1 -0
- package/.silex.js +12 -0
- package/dist/client/js/main.js +1 -1
- package/dist/server/cli.js +5 -1
- package/package.json +5 -1
- package/public/assets/container.png +0 -0
- package/public/assets/favicon.png +0 -0
- package/public/assets/logo-silex-small.png +0 -0
- package/public/robots.txt +2 -0
- package/public/silex.js +25 -0
- package/src/ts/server/cli.ts +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/.silex.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module.exports = function (silexConfig, options) {
|
|
2
|
+
silexConfig.addPlugin([
|
|
3
|
+
__dirname + '/src/plugins/ExpressPlugin.js',
|
|
4
|
+
__dirname + '/src/plugins/SslPlugin.js',
|
|
5
|
+
__dirname + '/src/plugins/StaticPlugin.js',
|
|
6
|
+
__dirname + '/src/plugins/WebsitePlugin.js',
|
|
7
|
+
__dirname + '/src/plugins/PublishPlugin.js',
|
|
8
|
+
])
|
|
9
|
+
|
|
10
|
+
// Return an object to be merged with Silex config
|
|
11
|
+
return {}
|
|
12
|
+
}
|
package/dist/client/js/main.js
CHANGED
|
@@ -39,7 +39,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
|
|
|
39
39
|
><span>${e.text}</span></div>
|
|
40
40
|
`))}
|
|
41
41
|
</header>
|
|
42
|
-
`,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},de=document.createElement("div");let he;const ge="open-settings";let ve="v3";const me=f.plugins.add("settings-dialog",((t,e)=>{try{ve="3.0.0-alpha.
|
|
42
|
+
`,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},de=document.createElement("div");let he;const ge="open-settings";let ve="v3";const me=f.plugins.add("settings-dialog",((t,e)=>{try{ve="3.0.0-alpha.38"}catch(t){}console.log("Silex version:",ve),t.Commands.add(ge,{run:(e,n,{page:r})=>{he=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{t.stopCommand(ge)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),Pt(ft`
|
|
43
43
|
<p>The page settings will override site settings, <a href="https://github.com/silexlabs/Silex/wiki/Settings" target="_blank">more info about settings here</a>.</p>
|
|
44
44
|
<form class="silex-form">
|
|
45
45
|
<h2>General settings</h2>
|
package/dist/server/cli.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
3
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const index_1 = __importDefault(require("./index"));
|
|
4
8
|
const cli_1 = require("cli");
|
|
5
9
|
const options = (0, cli_1.parse)({
|
|
6
10
|
config: ['c', 'Path for the server side config file to load at startup', 'file'],
|
|
@@ -40,4 +44,4 @@ if (options['client-config'])
|
|
|
40
44
|
process.env.SILEX_CLIENT_CONFIG = options['client-config'];
|
|
41
45
|
if (options['fs-root'])
|
|
42
46
|
process.env.FS_ROOT = options['fs-root'];
|
|
43
|
-
|
|
47
|
+
(0, index_1.default)();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexlabs/silex",
|
|
3
3
|
"description": "Free and easy website builder for everyone.",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.38",
|
|
5
5
|
"version:backwardcompat": "3.0.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Alex Hoyau",
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
"files": [
|
|
15
15
|
"dist/",
|
|
16
16
|
"src/",
|
|
17
|
+
"public",
|
|
18
|
+
".silex.js",
|
|
19
|
+
".silex",
|
|
17
20
|
"package.json",
|
|
21
|
+
"package-lock.json",
|
|
18
22
|
"README.md",
|
|
19
23
|
"LICENSE"
|
|
20
24
|
],
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/public/silex.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// This file is loaded by Silex when the user opens the editor
|
|
2
|
+
// Unless you override the default config with the environment variable SILEX_CLIENT_CONFIG or the CLI option --client-config
|
|
3
|
+
export default async function (config) {
|
|
4
|
+
// // For example add a GrapesJs plugin like this
|
|
5
|
+
// config.editor.plugins.push(plugin)
|
|
6
|
+
// config.editor.pluginsOpts[plugin] = {
|
|
7
|
+
// }
|
|
8
|
+
// // Or like this to override the default options
|
|
9
|
+
// // See the docs for the list of options
|
|
10
|
+
// return {
|
|
11
|
+
// ...config,
|
|
12
|
+
// editor: {
|
|
13
|
+
// ...config.editor,
|
|
14
|
+
// plugins: [
|
|
15
|
+
// ...config.editor.plugins,
|
|
16
|
+
// plugin,
|
|
17
|
+
// ],
|
|
18
|
+
// pluginsOpts: {
|
|
19
|
+
// ...config.editor.pluginsOpts,
|
|
20
|
+
// [plugin]: {
|
|
21
|
+
// },
|
|
22
|
+
// },
|
|
23
|
+
// },
|
|
24
|
+
// }
|
|
25
|
+
}
|
package/src/ts/server/cli.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
import silex from './index'
|
|
21
21
|
import { parse } from 'cli'
|
|
22
22
|
|
|
23
23
|
const options = parse({
|
|
@@ -48,4 +48,4 @@ if(options['cors-url']) process.env.SILEX_CORS_URL = options['cors-url']
|
|
|
48
48
|
if(options['client-config']) process.env.SILEX_CLIENT_CONFIG = options['client-config']
|
|
49
49
|
if(options['fs-root']) process.env.FS_ROOT = options['fs-root']
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
silex()
|