@parameter1/base-cms-marko-web 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/browser/index.js +13 -11
- package/components/browser-component.marko.js +10 -10
- package/components/document/components/body-wrapper.marko.js +8 -8
- package/components/document/components/error.marko.js +9 -9
- package/components/document/components/live-reload.marko.js +7 -7
- package/components/document/components/polyfill.marko.js +7 -7
- package/components/document/container.marko.js +9 -9
- package/components/document/index.marko +1 -1
- package/components/document/index.marko.js +18 -18
- package/components/element/array.marko.js +9 -9
- package/components/element/audio.marko.js +8 -8
- package/components/element/block.marko.js +8 -8
- package/components/element/clear.marko.js +7 -7
- package/components/element/components/image.marko.js +7 -7
- package/components/element/components/text.marko.js +9 -9
- package/components/element/content/address1.marko.js +8 -8
- package/components/element/content/address2.marko.js +8 -8
- package/components/element/content/audio.marko.js +8 -8
- package/components/element/content/authors.marko.js +7 -7
- package/components/element/content/body.marko.js +8 -8
- package/components/element/content/byline.marko.js +8 -8
- package/components/element/content/city-state-zip.marko.js +8 -8
- package/components/element/content/contributors.marko.js +7 -7
- package/components/element/content/country.marko.js +8 -8
- package/components/element/content/embed-code.marko.js +8 -8
- package/components/element/content/end-date.marko.js +8 -8
- package/components/element/content/ends.marko.js +8 -8
- package/components/element/content/fax.marko.js +8 -8
- package/components/element/content/images.marko.js +7 -7
- package/components/element/content/mobile.marko.js +8 -8
- package/components/element/content/name.marko.js +8 -8
- package/components/element/content/phone.marko.js +8 -8
- package/components/element/content/photographers.marko.js +7 -7
- package/components/element/content/public-email.marko.js +8 -8
- package/components/element/content/published.marko.js +8 -8
- package/components/element/content/short-name.marko.js +8 -8
- package/components/element/content/sidebar-stubs.marko.js +7 -7
- package/components/element/content/sidebars.marko.js +7 -7
- package/components/element/content/source.marko.js +8 -8
- package/components/element/content/sponsors.marko.js +7 -7
- package/components/element/content/start-date.marko.js +8 -8
- package/components/element/content/starts.marko.js +8 -8
- package/components/element/content/teaser.marko.js +8 -8
- package/components/element/content/title.marko.js +8 -8
- package/components/element/content/tollfree.marko.js +8 -8
- package/components/element/content/transcript.marko.js +8 -8
- package/components/element/content/website.marko.js +8 -8
- package/components/element/date.marko.js +7 -7
- package/components/element/image/caption.marko.js +8 -8
- package/components/element/image/credit.marko.js +8 -8
- package/components/element/image/display-name.marko.js +8 -8
- package/components/element/image/slider.marko.js +7 -7
- package/components/element/img.marko.js +8 -8
- package/components/element/index.marko.js +8 -8
- package/components/element/link.marko.js +8 -8
- package/components/element/magazine-issue/description.marko.js +8 -8
- package/components/element/magazine-issue/digital-edition-url.marko.js +8 -8
- package/components/element/magazine-issue/name.marko.js +8 -8
- package/components/element/magazine-issue/pdf-url.marko.js +8 -8
- package/components/element/magazine-publication/cancel-url.marko.js +8 -8
- package/components/element/magazine-publication/change-address-url.marko.js +8 -8
- package/components/element/magazine-publication/description.marko.js +8 -8
- package/components/element/magazine-publication/einquiry-url.marko.js +8 -8
- package/components/element/magazine-publication/name.marko.js +8 -8
- package/components/element/magazine-publication/renewal-url.marko.js +8 -8
- package/components/element/magazine-publication/reprints-url.marko.js +8 -8
- package/components/element/magazine-publication/subscribe-url.marko.js +8 -8
- package/components/element/obj-array.marko.js +7 -7
- package/components/element/obj-audio.marko.js +7 -7
- package/components/element/obj-date.marko.js +7 -7
- package/components/element/obj-nodes.marko.js +7 -7
- package/components/element/obj-text.marko.js +7 -7
- package/components/element/obj.marko.js +7 -7
- package/components/element/picture.marko.js +9 -9
- package/components/element/text.marko.js +9 -9
- package/components/element/website-section/description.marko.js +8 -8
- package/components/element/website-section/hierarchy.marko.js +7 -7
- package/components/element/website-section/name.marko.js +8 -8
- package/components/load-more/index.marko.js +9 -9
- package/components/load-more/trigger.marko.js +7 -7
- package/components/node/body.marko.js +9 -9
- package/components/node/element.marko.js +8 -8
- package/components/node/footer.marko.js +8 -8
- package/components/node/header.marko.js +8 -8
- package/components/node/image-inner-wrapper.marko.js +9 -9
- package/components/node/image-wrapper.marko.js +8 -8
- package/components/node/image.marko.js +8 -8
- package/components/node/index.marko.js +9 -9
- package/components/node-list/body.marko.js +8 -8
- package/components/node-list/element.marko.js +8 -8
- package/components/node-list/footer.marko.js +8 -8
- package/components/node-list/header.marko.js +8 -8
- package/components/node-list/index.marko.js +8 -8
- package/components/node-list/node.marko.js +8 -8
- package/components/node-list/nodes.marko.js +10 -10
- package/components/page/container.marko.js +8 -8
- package/components/page/description.marko.js +7 -7
- package/components/page/image.marko.js +8 -8
- package/components/page/layouts/content.marko.js +8 -8
- package/components/page/layouts/default.marko.js +8 -8
- package/components/page/layouts/dynamic-page.marko.js +8 -8
- package/components/page/layouts/magazine-issue.marko.js +8 -8
- package/components/page/layouts/magazine-publication.marko.js +8 -8
- package/components/page/layouts/website-section.marko.js +8 -8
- package/components/page/metadata/components/common.marko.js +7 -7
- package/components/page/metadata/content.marko.js +9 -9
- package/components/page/metadata/default.marko.js +7 -7
- package/components/page/metadata/dynamic-page.marko.js +6 -6
- package/components/page/metadata/magazine-issue.marko.js +6 -6
- package/components/page/metadata/magazine-publication.marko.js +6 -6
- package/components/page/metadata/website-section.marko.js +6 -6
- package/components/page/rel-canonical.marko.js +8 -8
- package/components/page/title.marko.js +8 -8
- package/components/page/wrapper.marko.js +10 -10
- package/components/resolve/page.marko.js +7 -7
- package/components/rss/website-section.marko.js +7 -7
- package/config/asset-manifest.js +3 -3
- package/eslint.log +3 -0
- package/package.json +16 -16
- package/scss/node.scss +3 -1
- package/.eslintrc.js +0 -9
- package/express/marko.js +0 -36
@@ -1,13 +1,13 @@
|
|
1
1
|
// Compiled using marko@4.20.2 - DO NOT EDIT
|
2
2
|
"use strict";
|
3
3
|
|
4
|
-
var marko_template = module.exports = require("marko/
|
5
|
-
marko_componentType = "/@parameter1/base-cms-marko-web$4.
|
6
|
-
marko_renderer = require("marko/
|
4
|
+
var marko_template = module.exports = require("marko/dist/html").t(__filename),
|
5
|
+
marko_componentType = "/@parameter1/base-cms-marko-web$4.1.0/components/rss/website-section.marko",
|
6
|
+
marko_renderer = require("marko/dist/runtime/components/renderer"),
|
7
7
|
module_url_module = require("url"),
|
8
8
|
url_module = module_url_module.default || module_url_module,
|
9
9
|
URLSearchParams = module_url_module.URLSearchParams,
|
10
|
-
marko_attr = require("marko/
|
10
|
+
marko_attr = require("marko/dist/runtime/html/helpers/attr");
|
11
11
|
|
12
12
|
function render(input, out, __component, component, state) {
|
13
13
|
var data = input;
|
@@ -37,10 +37,10 @@ function render(input, out, __component, component, state) {
|
|
37
37
|
}
|
38
38
|
|
39
39
|
marko_template._ = marko_renderer(render, {
|
40
|
-
|
41
|
-
|
40
|
+
d_: true,
|
41
|
+
e_: marko_componentType
|
42
42
|
});
|
43
43
|
|
44
44
|
marko_template.meta = {
|
45
|
-
id: "/@parameter1/base-cms-marko-web$4.
|
45
|
+
id: "/@parameter1/base-cms-marko-web$4.1.0/components/rss/website-section.marko"
|
46
46
|
};
|
package/config/asset-manifest.js
CHANGED
@@ -8,7 +8,7 @@ class AssetManifest {
|
|
8
8
|
js() {
|
9
9
|
if (!this.scripts) {
|
10
10
|
const { js } = this.load();
|
11
|
-
this.scripts = [js['
|
11
|
+
this.scripts = [js['browser/index.js']];
|
12
12
|
}
|
13
13
|
return this.scripts;
|
14
14
|
}
|
@@ -16,7 +16,7 @@ class AssetManifest {
|
|
16
16
|
css() {
|
17
17
|
if (!this.stylesheets) {
|
18
18
|
const { css } = this.load();
|
19
|
-
this.stylesheets = [css['
|
19
|
+
this.stylesheets = [css['server/styles/index.scss']];
|
20
20
|
}
|
21
21
|
return this.stylesheets;
|
22
22
|
}
|
@@ -36,7 +36,7 @@ class AssetManifest {
|
|
36
36
|
const distFolder = distDir.split('/').pop();
|
37
37
|
// eslint-disable-next-line global-require, import/no-dynamic-require
|
38
38
|
const json = require(join(distDir, type, 'manifest.json'));
|
39
|
-
return Object.keys(json).reduce((o, k) => ({ ...o, [k]: join('/', distFolder, type, json[k]) }), {});
|
39
|
+
return Object.keys(json).reduce((o, k) => ({ ...o, [k]: join('/', distFolder, type, json[k].file) }), {});
|
40
40
|
}
|
41
41
|
}
|
42
42
|
|
package/eslint.log
ADDED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parameter1/base-cms-marko-web",
|
3
|
-
"version": "4.
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "Core Marko+Express components for BaseCMS websites",
|
5
5
|
"author": "Jacob Bare <jacob@parameter1.com>",
|
6
6
|
"main": "index.js",
|
@@ -23,20 +23,20 @@
|
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
25
|
"@godaddy/terminus": "^4.11.2",
|
26
|
-
"@parameter1/base-cms-apollo-ssr": "^4.0.
|
27
|
-
"@parameter1/base-cms-dayjs": "^4.0.
|
28
|
-
"@parameter1/base-cms-embedded-media": "^4.0.
|
29
|
-
"@parameter1/base-cms-express-apollo": "^4.0.
|
30
|
-
"@parameter1/base-cms-graphql-fragment-types": "^4.0.
|
31
|
-
"@parameter1/base-cms-image": "^4.0.
|
32
|
-
"@parameter1/base-cms-inflector": "^4.0.
|
33
|
-
"@parameter1/base-cms-marko-express": "^4.0.
|
34
|
-
"@parameter1/base-cms-marko-node-require": "^4.0.
|
35
|
-
"@parameter1/base-cms-marko-web-deferred-script-loader": "^4.
|
36
|
-
"@parameter1/base-cms-object-path": "^4.0.
|
37
|
-
"@parameter1/base-cms-tenant-context": "^4.0.
|
38
|
-
"@parameter1/base-cms-utils": "^4.0.
|
39
|
-
"@parameter1/base-cms-web-common": "^4.0.
|
26
|
+
"@parameter1/base-cms-apollo-ssr": "^4.0.2",
|
27
|
+
"@parameter1/base-cms-dayjs": "^4.0.2",
|
28
|
+
"@parameter1/base-cms-embedded-media": "^4.0.2",
|
29
|
+
"@parameter1/base-cms-express-apollo": "^4.0.2",
|
30
|
+
"@parameter1/base-cms-graphql-fragment-types": "^4.0.2",
|
31
|
+
"@parameter1/base-cms-image": "^4.0.2",
|
32
|
+
"@parameter1/base-cms-inflector": "^4.0.2",
|
33
|
+
"@parameter1/base-cms-marko-express": "^4.0.2",
|
34
|
+
"@parameter1/base-cms-marko-node-require": "^4.0.2",
|
35
|
+
"@parameter1/base-cms-marko-web-deferred-script-loader": "^4.1.0",
|
36
|
+
"@parameter1/base-cms-object-path": "^4.0.2",
|
37
|
+
"@parameter1/base-cms-tenant-context": "^4.0.2",
|
38
|
+
"@parameter1/base-cms-utils": "^4.0.2",
|
39
|
+
"@parameter1/base-cms-web-common": "^4.0.2",
|
40
40
|
"cheerio": "^1.0.0-rc.12",
|
41
41
|
"cookie-parser": "^1.4.6",
|
42
42
|
"express": "^4.18.2",
|
@@ -56,5 +56,5 @@
|
|
56
56
|
"publishConfig": {
|
57
57
|
"access": "public"
|
58
58
|
},
|
59
|
-
"gitHead": "
|
59
|
+
"gitHead": "8a5353f4c06ccc6b21a0fb99220cb9f992107cde"
|
60
60
|
}
|
package/scss/node.scss
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
|
2
|
+
@use "sass:math";
|
3
|
+
|
2
4
|
$marko-web-node-image-aspect-ratios: () !default;
|
3
5
|
// stylelint-disable-next-line scss/dollar-variable-default
|
4
6
|
$marko-web-node-image-aspect-ratios: join(
|
@@ -38,7 +40,7 @@ $marko-web-node-placeholder-image-opacity: .2 !default;
|
|
38
40
|
display: block;
|
39
41
|
content: "";
|
40
42
|
@if $ratio-y and $ratio-x {
|
41
|
-
padding-top: percentage($ratio-y
|
43
|
+
padding-top: percentage(math.div($ratio-y, $ratio-x));
|
42
44
|
}
|
43
45
|
}
|
44
46
|
}
|
package/.eslintrc.js
DELETED
package/express/marko.js
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
/* eslint-disable no-underscore-dangle */
|
2
|
-
require('marko');
|
3
|
-
const buildGlobal = require('@parameter1/base-cms-marko-core/utils/build-marko-global');
|
4
|
-
|
5
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
6
|
-
const express = module.main ? module.main.require('express') : require('express');
|
7
|
-
|
8
|
-
if (!express) throw new Error('Unable to load Express.');
|
9
|
-
|
10
|
-
const patch = (response) => {
|
11
|
-
response.marko = response.marko || function markoResponse(template, data) {
|
12
|
-
if (typeof template === 'string') throw new Error('res.marko does not accept a string or path as a template.');
|
13
|
-
|
14
|
-
const res = this;
|
15
|
-
const { req } = res;
|
16
|
-
res.set({ 'content-type': 'text/html; charset=utf-8' });
|
17
|
-
const $global = buildGlobal(res, data);
|
18
|
-
return template.render({ ...(data || {}), $global }, res).on('error', req.next);
|
19
|
-
};
|
20
|
-
};
|
21
|
-
|
22
|
-
patch(express.response);
|
23
|
-
delete require.cache[__filename];
|
24
|
-
|
25
|
-
module.exports = () => {
|
26
|
-
const app = express();
|
27
|
-
app.once('mount', (parent) => {
|
28
|
-
patch(parent.response);
|
29
|
-
if (parent._router) {
|
30
|
-
parent._router.stack.pop(); // express <= 4.x
|
31
|
-
} else {
|
32
|
-
parent.router.stack.pop(); // express 5.x
|
33
|
-
}
|
34
|
-
});
|
35
|
-
return app;
|
36
|
-
};
|