Skip to content

Instantly share code, notes, and snippets.

View htammen's full-sized avatar

Helmut Tammen htammen

View GitHub Profile
@htammen
htammen / package.json
Created July 17, 2019 14:13
Package.json for UI5 Typescript projects
{
"name": "AppAdminApp",
"version": "0.0.1",
"engines": {
"node": ">=10.0.0"
},
"scripts": {
"start": "ui5 serve -o index.html",
"serve": "ui5 serve",
...
@htammen
htammen / AppAdminApp.d.ts
Created July 17, 2019 13:47
Typescript type definitions for sample UI5 Typescript project
declare namespace de {
namespace tammenit {
namespace ui5 {
namespace AppAdminApp {
export class Component extends sap.ui.core.UIComponent {
/**
* returns the main Model of the application
*
* @returns {sap.ui.model.json.JSONModel} the main model of the application
@htammen
htammen / tsconfig.json
Created July 17, 2019 13:34
tsconfig.json (Typescript configuration file for UI5 typescript projects)
{
"compilerOptions": {
"module": "none",
"target": "es5",
"sourceMap": true,
"noEmit": false,
"downlevelIteration": true,
"checkJs": false,
"allowJs": false,
"lib": ["dom", "es5", "es2015.promise", "es2015.iterable"],
@htammen
htammen / BaseController.ts
Last active July 17, 2019 13:27
BaseController.ts (Typescript version of UI5 BaseController from which view controller inherit)
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/ui/core/routing/History",
"de/tammenit/ui5/AppAdminApp/Component",
"sap/ui/model/json/JSONModel"
], function(Controller: typeof sap.ui.core.mvc.Controller,
History: typeof sap.ui.core.routing.History,
Component: typeof de.tammenit.ui5.AppAdminApp.Component,
JSONModel: typeof sap.ui.model.json.JSONModel) {
"use strict";
@htammen
htammen / Main.controller.ts
Last active July 17, 2019 13:32
MainController.ts (Typescript version of UI5 view controller that inherits from a BaseController)
sap.ui.define([
"de/tammenit/ui5/AppAdminApp/controller/BaseController",
"sap/ui/model/json/JSONModel",
"sap/ui/core/format/DateFormat",
"sap/ui/core/Fragment"
], function (BaseController: typeof de.tammenit.ui5.AppAdminApp.controller.BaseController,
JSONModel: typeof sap.ui.model.json.JSONModel,
DateFormat: typeof sap.ui.core.format.DateFormat,
Fragment: typeof sap.ui.core.Fragment
) {
@htammen
htammen / Component.ts
Last active July 17, 2019 13:46
Component.ts (Typescript version of UI5 component controller)
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"sap/ui/model/json/JSONModel",
"de/tammenit/ui5/AppAdminApp/model/models",
"sap/base/Log",
"sap/ui/core/Popup"
], function (UIComponent: typeof sap.ui.core.UIComponent,
Device: typeof sap.ui.Device,
JSONModel: typeof sap.ui.model.json.JSONModel,
# find all README.md files in a folder hierarchy but exclude all node_modules folders
find . -path "**/node_modules" -prune -o -name "README.md" -print
# like before but also find a specific keyworkd, here "mklink" in the README.md files
find . -path "**/node_modules" -prune -o -name "README.md" -print -exec grep -Hni "mklink" {} \;
# show all files in a folder in list view
ls -l
@htammen
htammen / ui5con-2018-ui5-goes-pwa.md
Created May 31, 2018 09:28
ui5con-2018-ui5-goes-pwa.md

Dev Notes

Das Projekt ui5con-2018-1 ist das Projekt, das ich während der Präsentation clone (remix). Es ist mit dem github Projekt ui5con-htammen.github.com Branch glitch verbunden.
D.h. Änderungen sollten in dem Github Projekt vorgenommen werden, entweder in glitch oder lokal. In der Glitch Console können folgende Befehle verwendet werden.

  • git branch -a (List both remote-tracking branches and local branches.)
  • git remote
  • git pull: zum pullen der Änderungen von github
  • git push: zum pushen der Änderung aus glitch nach github

MD Datei online anschauen

<!-- This jsbin demonstrates UI5s different selection and input fields with value helps -->
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-libs="sap.m"></script>
<div id="uiArea"></div>
<script id="view1" type="ui5/xmlview">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">