Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions tools/README.md.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/**
* Copyright (c) 2023 Contributors to the Eclipse Foundation.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
* SPDX-License-Identifier: EPL-2.0
*
* Contributors: Smart City Jena
*/

export const readme = (config)=> {

let goUp ='';
const parts = config.name.split('.');
const steps = (parts.length);
for(let a=0;a<=steps;a++){
goUp+='../'
}
return `# org.eclipse.daanse.board.app.xxx
## Description
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

## If Lib/Core Package
How to use the Package
describe EntryPoint

## If UI-Widget
### Widget

![Example Widget](${goUp}tools/assets/widget.png)

Describe what the Widget is showing in configured state.

### Widget Settings

![Example Widget Settings](${goUp}tools/assets/settings.png)



Describe what each Setting is doing.
Describe what minimal has to setted up for a working example.

eg:

| Field | required | explanation | hints |
|---------|----------|------------------------------|----------------------------------|
| Name | x | Name of receiver | less than 255 unicode-characters |
| Email | x | Emailaddress of reciver | valid pattern [email protected] |
| Subject | x | Short description of content | less than 255 unicode-characters |
| Message | x | Text to send | less than 750 unicode-characters |
| Send | |if valid trys to send the Email |triggers the validation of above marked fields|

### Examples

Show Widget in Wildlife
`
}
Binary file added tools/assets/settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tools/assets/widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions tools/createPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { fileURLToPath } from 'url';
import path,{ dirname } from 'path';
import {exec} from "node:child_process";
import {vite} from "./vite.config.js";
import {readme} from "./README.md.js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand Down Expand Up @@ -102,6 +103,15 @@ try {
console.log(error('couldn t vite.config.ts'));
process.exit(1);
}
console.log(notice('create README.md...'))
try {
fs.writeFileSync('README.md', readme(config))
console.log(notice('[✓]'))
} catch (err) {
console.error(err)
console.log(error('couldn t create README.md'));
process.exit(1);
}

if(config.withBoilerplate){
console.log(notice('copy base Code...'))
Expand Down
Loading