fix(core): update
This commit is contained in:
40
assets/templates/website/.package.json
Normal file
40
assets/templates/website/.package.json
Normal file
@ -0,0 +1,40 @@
|
||||
---
|
||||
fileName: package.json
|
||||
---
|
||||
{
|
||||
"name": "{{module.npmPackagename}}",
|
||||
"version": "1.0.0",
|
||||
"description": "{{module.description}}",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "npm run build",
|
||||
"build": "tsbuild --web --allowimplicitany && tsbundle website --production",
|
||||
"watch": "tswatch website",
|
||||
"start": "(node cli.js)",
|
||||
"startTs": "(node cli.ts.js)"
|
||||
},
|
||||
"author": "{{author.name}}",
|
||||
"license": "{{module.license}}",
|
||||
"dependencies": {
|
||||
"@api.global/typedserver": "^1.0.16",
|
||||
"@consentsoftware_private/catalog": "^1.0.73",
|
||||
"@design.estate/dees-domtools": "^2.0.23",
|
||||
"@design.estate/dees-element": "^2.0.15",
|
||||
"@push.rocks/smartlog": "^2.0.1",
|
||||
"@push.rocks/qenv": "^5.0.2",
|
||||
"@push.rocks/smartpath": "^5.0.5",
|
||||
"@push.rocks/smartstate": "^2.0.0",
|
||||
"@push.rocks/websetup": "^3.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^2.1.17",
|
||||
"@git.zone/tsbundle": "^2.0.3",
|
||||
"@git.zone/tsrun": "^1.2.8",
|
||||
"@git.zone/tswatch": "^2.0.1",
|
||||
"@push.rocks/projectinfo": "^5.0.1",
|
||||
"@types/node": "^18.11.15"
|
||||
},
|
||||
"private": true
|
||||
}
|
17
assets/templates/website/.smartscaf.yml
Normal file
17
assets/templates/website/.smartscaf.yml
Normal file
@ -0,0 +1,17 @@
|
||||
defaults:
|
||||
module.name: my.website
|
||||
module.author: Task Venture Capital GmbH
|
||||
module.license: UNLICENSED
|
||||
module.description: a smart description for my.website
|
||||
|
||||
dependencies:
|
||||
merge:
|
||||
- ../website_update
|
||||
- ../gitignore
|
||||
- ../ci_docker
|
||||
- ../tsconfig_update
|
||||
- ../cli
|
||||
|
||||
runafter:
|
||||
- gitzone format
|
||||
- pnpm install
|
3
assets/templates/website/Dockerfile
Normal file
3
assets/templates/website/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
# gitzone dockerfile_service
|
||||
# written by format action
|
||||
#
|
24
assets/templates/website/npmextra.json
Normal file
24
assets/templates/website/npmextra.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"gitzone": {
|
||||
"projectType": "website",
|
||||
"module": {
|
||||
"githost": "{{module.githost}}",
|
||||
"gitscope": "{{module.gitscope}}",
|
||||
"gitrepo": "{{module.gitrepo}}",
|
||||
"description": "{{module.description}}",
|
||||
"npmPackagename": "{{module.npmPackagename}}",
|
||||
"license": "{{module.license}}",
|
||||
"projectDomain": "{{module.projectDomain}}"
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"dockerRegistryRepoMap": {
|
||||
"registry.gitlab.com": "{{docker.registryImageTag}}"
|
||||
},
|
||||
"dockerBuildargEnvMap": {
|
||||
"NPMCI_TOKEN_NPM2": "NPMCI_TOKEN_NPM2"
|
||||
},
|
||||
"npmRegistryUrl": "{{private.npmRegistryUrl}}"
|
||||
}
|
||||
}
|
1
assets/templates/website/qenv.yml
Normal file
1
assets/templates/website/qenv.yml
Normal file
@ -0,0 +1 @@
|
||||
required:
|
1
assets/templates/website/readme.md
Normal file
1
assets/templates/website/readme.md
Normal file
@ -0,0 +1 @@
|
||||
## Usage
|
7
assets/templates/website/ts/ffb.paths.ts
Normal file
7
assets/templates/website/ts/ffb.paths.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import * as plugins from './ffb.plugins.js';
|
||||
|
||||
export const packageDir = plugins.path.join(
|
||||
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
|
||||
'../'
|
||||
);
|
||||
export const distWebDir = plugins.path.join(packageDir, 'dist_serve/');
|
14
assets/templates/website/ts/ffb.plugins.ts
Normal file
14
assets/templates/website/ts/ffb.plugins.ts
Normal file
@ -0,0 +1,14 @@
|
||||
// native scope
|
||||
import * as path from 'path';
|
||||
export { path };
|
||||
|
||||
// @api.global scope
|
||||
import * as typedserver from '@api.global/typedserver';
|
||||
|
||||
export { typedserver };
|
||||
|
||||
// @pushrocks scope
|
||||
import * as qenv from '@push.rocks/qenv';
|
||||
import * as smartpath from '@push.rocks/smartpath';
|
||||
|
||||
export { qenv, smartpath };
|
12
assets/templates/website/ts/index.ts
Normal file
12
assets/templates/website/ts/index.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import * as plugins from './ffb.plugins.js';
|
||||
import * as paths from './ffb.paths.js';
|
||||
|
||||
export const runCli = async () => {
|
||||
const serviceQenv = new plugins.qenv.Qenv('./', './.nogit', false);
|
||||
const websiteServer = new plugins.loleWebsiteserver.LoleWebsiteServer({
|
||||
feedMetadata: null,
|
||||
domain: '{{module.projectDomain}}',
|
||||
serveDir: paths.distWebDir
|
||||
});
|
||||
await websiteServer.start();
|
||||
};
|
62
assets/templates/website/ts_web/elements/header.ts
Normal file
62
assets/templates/website/ts_web/elements/header.ts
Normal file
@ -0,0 +1,62 @@
|
||||
import {
|
||||
customElement,
|
||||
DeesElement,
|
||||
property,
|
||||
html,
|
||||
cssManager,
|
||||
unsafeCSS,
|
||||
css,
|
||||
TemplateResult,
|
||||
} from '@design.estate/dees-element';
|
||||
|
||||
@customElement('default-header')
|
||||
export class DefaultHeader extends DeesElement {
|
||||
@property()
|
||||
public someProperty = 'someProperty';
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
public static styles = [
|
||||
cssManager.defaultStyles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
height: 100px;
|
||||
}
|
||||
:host([hidden]) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.headerMain {
|
||||
background: var(--background-accent);
|
||||
color: #fff;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
height: 100px;
|
||||
}
|
||||
.headerMain:after {
|
||||
background: inherit;
|
||||
bottom: 0;
|
||||
content: '';
|
||||
display: block;
|
||||
height: 60%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
transform: skewY(-2deg);
|
||||
transform-origin: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
public render(): TemplateResult {
|
||||
return html`
|
||||
<style></style>
|
||||
<div class="headerMain">${this.someProperty}</div>
|
||||
<slot></slot>
|
||||
`;
|
||||
}
|
||||
}
|
63
assets/templates/website/ts_web/index.ts
Normal file
63
assets/templates/website/ts_web/index.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import * as serviceworker from '@api.global/typedserver/web_serviceworker_client';
|
||||
import * as domtools from '@design.estate/dees-domtools';
|
||||
|
||||
import { html, render } from '@design.estate/dees-element';
|
||||
import { DefaultHeader } from './elements/header.js';
|
||||
|
||||
export { DefaultHeader };
|
||||
|
||||
const run = async () => {
|
||||
const domtoolsInstance = await domtools.DomTools.setupDomTools();
|
||||
domtools.elementBasic.setup();
|
||||
domtoolsInstance.setWebsiteInfo({
|
||||
metaObject: {
|
||||
title: '{{website.title}}',
|
||||
description:
|
||||
'{{website.description}}',
|
||||
canonicalDomain: 'https://{{module.domain}}',
|
||||
ldCompany: {
|
||||
name: '{{company.name}}',
|
||||
status: 'active',
|
||||
contact: {
|
||||
address: {
|
||||
name: '{{company.name}}',
|
||||
city: '{{company.city}}',
|
||||
country: 'Germany',
|
||||
houseNumber: '{{company.houseNumber}}',
|
||||
postalCode: '{{company.postalCode}}',
|
||||
streetName: '{{company.streetName}}',
|
||||
},
|
||||
description: 'work',
|
||||
name: 'Task Venture Capital GmbH',
|
||||
type: 'company',
|
||||
facebookUrl: 'https://www.facebook.com/{{author.facebookHandle}}',
|
||||
twitterUrl: 'https://twitter.com/{{authro.twitterHandle}}',
|
||||
website: 'https://{{author.website}}',
|
||||
phone: '+49 421 16767 548',
|
||||
},
|
||||
closedDate: null,
|
||||
foundedDate: {
|
||||
day: 1,
|
||||
month: 1,
|
||||
year: 2014,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const serviceWorker = serviceworker.getServiceWorker();
|
||||
|
||||
const mainTemplate = html`
|
||||
<style>
|
||||
body {
|
||||
margin: 0px;
|
||||
--background-accent: #303f9f;
|
||||
}
|
||||
</style>
|
||||
<default-header></default-header>
|
||||
`;
|
||||
|
||||
render(mainTemplate, document.body);
|
||||
};
|
||||
|
||||
run();
|
Reference in New Issue
Block a user