@paroicms/demo-app 0.29.0

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 (2) hide show
  1. package/package.json +23 -0
  2. package/start.js +23 -0
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@paroicms/demo-app",
3
+ "type": "commonjs",
4
+ "version": "0.29.0",
5
+ "description": "ParoiCMS: demo app",
6
+ "author": "Paroi Team",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "@paroicms/server": "0.146.0",
10
+ "@paroicms/playground_bangkok": "0.18.0",
11
+ "@paroicms/playground_seoul": "0.12.0"
12
+ },
13
+ "scripts": {
14
+ "start": "node start.js"
15
+ },
16
+ "bin": {
17
+ "paroicms-demo-app": "start.js"
18
+ },
19
+ "main": "index.js",
20
+ "files": [
21
+ "start.js"
22
+ ]
23
+ }
package/start.js ADDED
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ const { start } = require("@paroicms/server");
3
+ const { dependencies } = require("./package.json");
4
+
5
+ start({
6
+ sitePackPlaces: {
7
+ playground: loadSitePlaces(),
8
+ }
9
+ });
10
+
11
+ function loadSitePlaces() {
12
+ const packagePrefix = "@paroicms/playground_";
13
+
14
+ const sitePlaces = [];
15
+ for (const dependencyName of Object.keys(dependencies ?? {})) {
16
+ if (!dependencyName.startsWith(packagePrefix)) continue;
17
+ const { siteDir, version } = require(dependencyName);
18
+ const domain = dependencyName.substring(packagePrefix.length);
19
+ sitePlaces.push({ siteDir, domain, version });
20
+ }
21
+
22
+ return sitePlaces;
23
+ }