Skip to content

Commit

Permalink
better build and config example
Browse files Browse the repository at this point in the history
  • Loading branch information
lexoyo committed Jun 27, 2024
1 parent 8dcf258 commit a55c0ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions examples/server-config-connectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const FtpConnector = require('../dist/plugins/server/plugins/server/FtpConnector
const GitlabConnector = require('../dist/plugins/server/plugins/server/GitlabConnector').default
const GitlabHostingConnector = require('../dist/plugins/server/plugins/server/GitlabHostingConnector').default
const DownloadPlugin = require('../dist/plugins/server/plugins/server/DownloadConnector').default
const StaticPlugin = require('@silexlabs/silex/dist/plugins/server/plugins/server/StaticPlugin').default
const node_modules = require('node_modules-path')

class FramaGitConnector extends GitlabConnector {
connectorId = 'framagit'
Expand Down Expand Up @@ -84,6 +86,13 @@ module.exports = async function (config, options) {
}),
])

config.addPlugin(StaticPlugin, {
routes: [{
route: '/js/silex-cms/',
path: node_modules('@silexlabs/silex-cms') + '/@silexlabs/silex-cms/dist',
},
],
})
return {}
}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
"scripts": {
"release": "",
"dev": "run-p watch start:debug start:preview",
"dev": "run-p watch start:debug",
"watch": "npm-watch",
"start": "node dist/server/server/",
"start:debug": "cross-env SILEX_FS_ROOT=`pwd`/silex SILEX_DEBUG=true nodemon --watch dist/server dist/server/server/",
Expand Down

0 comments on commit a55c0ac

Please sign in to comment.