Skip to content

Commit 43664ed

Browse files
committed
static asset folder mashlib/dist/
1 parent ae49cfd commit 43664ed

4 files changed

Lines changed: 15 additions & 55 deletions

File tree

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ or [for Pivot as piece of config+software](https://matrix.to/#/#solid_pivot:matr
2424

2525
## Changelog
2626

27+
### - CSS >= 7.1.9
28+
mashlib chunks do not need to be declared anymore. CSS >= 7.1.9 implements folder expansion from root in StaticAssets. See static asset entries in `config/customise-me.json`
2729
### - mashlib >= v2.0.0
2830

2931
As from mashlib v2 the config/customise-me.json contains new parameters to :
3032
- remove CSS default `Markdown to Html converter`
31-
- include `mashlib chunks` in the static assets entries
33+
- ~~include `mashlib chunks` in the static assets entries~~
3234

3335
### - removal of css-mashlib dependency
3436

@@ -94,12 +96,15 @@ openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 3
9496
npm start
9597
```
9698

97-
Or on `http localhost`, use `config/dev-http-suffix.json`
99+
Or on `http localhost`
98100
```
99-
npx community-solid-server -c ./config/dev-http-suffix.json ./custom-config.json -f ./data -p 3000 -b http://localhost:3000 -m .
101+
npm run start-dev/suffix # will start http://localhost:3100
100102
```
101-
or `config/dev-http-subdomain.json`
102-
When using localhost with subdomain you must also declaree the subdomain in `/etc/hosts`.
103+
104+
```
105+
npm run start-dev/subdomain # will start http://localhost:3000
106+
```
107+
When using localhost with subdomain you must also declare the subdomain in `/etc/hosts`.
103108
To create an account `bob.localhost:3000` you shall add the following record
104109
```
105110
127.0.0.1 bob.localhost

config/customise-me.json

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -68,59 +68,14 @@
6868
}]
6969
},
7070
{
71-
"comment": "Serve Mashlib static files.",
71+
"comment": "Serve Mashlib static files from /dist/ folder.",
7272
"@id": "urn:solid-server:default:StaticAssetHandler",
7373
"@type": "StaticAssetHandler",
7474
"assets": [
7575
{
7676
"@type": "StaticAssetEntry",
77-
"relativeUrl": "/browse.html",
78-
"filePath": "./node_modules/mashlib/dist/browse.html"
79-
},
80-
{
81-
"@type": "StaticAssetEntry",
82-
"relativeUrl": "/mash.css",
83-
"filePath": "./node_modules/mashlib/dist/mash.css"
84-
},
85-
{
86-
"@type": "StaticAssetEntry",
87-
"relativeUrl": "/mashlib.js",
88-
"filePath": "./node_modules/mashlib/dist/mashlib.js"
89-
},
90-
{
91-
"@type": "StaticAssetEntry",
92-
"relativeUrl": "/mashlib.js.map",
93-
"filePath": "./node_modules/mashlib/dist/mashlib.js.map"
94-
},
95-
{
96-
"@type": "StaticAssetEntry",
97-
"relativeUrl": "/mashlib.min.js",
98-
"filePath": "./node_modules/mashlib/dist/mashlib.min.js"
99-
},
100-
{
101-
"@type": "StaticAssetEntry",
102-
"relativeUrl": "/mashlib.min.js.map",
103-
"filePath": "./node_modules/mashlib/dist/mashlib.min.js.map"
104-
},
105-
{
106-
"@type": "StaticAssetEntry",
107-
"relativeUrl": "/841.mashlib.js",
108-
"filePath": "./node_modules/mashlib/dist/841.mashlib.js"
109-
},
110-
{
111-
"@type": "StaticAssetEntry",
112-
"relativeUrl": "/841.mashlib.map",
113-
"filePath": "./node_modules/mashlib/dist/841.mashlib.map"
114-
},
115-
{
116-
"@type": "StaticAssetEntry",
117-
"relativeUrl": "/841.mashlib.min.js",
118-
"filePath": "./node_modules/mashlib/dist/841.mashlib.min.js"
119-
},
120-
{
121-
"@type": "StaticAssetEntry",
122-
"relativeUrl": "/841.mashlib.min.js.map",
123-
"filePath": "./node_modules/mashlib/dist/841.mashlib.min.js.map"
77+
"relativeUrl": "/",
78+
"filePath": "./node_modules/mashlib/dist/"
12479
}
12580
]
12681
}

config/customise-me.ori.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
{
9696
"@type": "StaticAssetEntry",
9797
"relativeUrl": "/841.mashlib.js",
98-
"filePath": "./node_modules/mashlib/dist/841.mashlibDo you know if .js"
98+
"filePath": "./node_modules/mashlib/dist/841.mashlib.js"
9999
},
100100
{
101101
"@type": "StaticAssetEntry",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"scripts": {
2222
"start": "community-solid-server --loggingLevel debug -c config/prod.json ./custom-config.json -f ./data --httpsKey ./key.pem --httpsCert ./cert.pem -p 443 -b https://lolcathost.de -m .",
23-
"start-dev/suffix": "npx community-solid-server -c ./config/dev-http-suffix.json config/customise-me.json -f ./data-suffix -p 3100 -b http://localhost:3000 -m .",
23+
"start-dev/suffix": "npx community-solid-server -c ./config/dev-http-suffix.json config/customise-me.json -f ./data-suffix -p 3100 -b http://localhost:3100 -m .",
2424
"start-dev/subdomain": "npx community-solid-server -c ./config/dev-http-subdomain.json config/customise-me.json -f ./data-subdomain -p 3000 -b http://localhost:3000 -m .",
2525
"staging": "npx community-solid-server -c ./config/prod.json ./custom-config.json -f ./data --httpsKey /etc/letsencrypt/live/pivot.pondersource.com-0001/privkey.pem --httpsCert /etc/letsencrypt/live/pivot.pondersource.com-0001/fullchain.pem -p 443 -b https://pivot.pondersource.com -m .",
2626
"build": "npm run build:ts && npm run build:components",

0 commit comments

Comments
 (0)