Skip to content
Snippets Groups Projects
Commit fb4ff75c authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Merge branch 'master' into provider-component

parents 7bf03db3 e98b3ee3
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 12 deletions
......@@ -21,8 +21,10 @@ publish:
only:
refs:
- publish
- master
script:
- sudo npm install --global can-npm-publish
- yarn config set registry https://registry.npmjs.org/
- yarn config set cache-folder "$CI_PROJECT_DIR/_yarn_cache"
- yarn install
- yarn run publish
.npmrc 0 → 100644
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
......@@ -20,3 +20,10 @@ yarn install
* `yarn run test` - Run test for all packages
* `yarn run clean` - Removes all `node_modules` directories.
## Publishing packages to npmjs.com
There is an automatic publishing process initiated for each package if code is pushed
to the `master` branch, if the package isn't set to private in its `package.json` and
the version number in its `package.json` is higher than the version number on npmjs.com.
node_modules
.idea
npm-debug.log
package-lock.json
index.html
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
......@@ -3,10 +3,17 @@
A web component for building SPAs consisting of one topic with multiple
activities. Handles login, language selection, activity switching, menus etc.
You can install this component via npm:
```bash
npm i @dbp-toolkit/app-shell
```
## Usage
```html
<dbp-app-shell src="/example.topic.metadata.json"></dbp-app-shell>
<script type="module" src="node_modules/@dbp-toolkit/app-shell/dist/dbp-app-shell.js"></script>
```
## Attributes
......@@ -83,6 +90,9 @@ yarn run watch
# run tests
yarn test
# build local packages in dist directory
yarn run build
```
Jump to <http://localhost:8002> and you should get a Single Sign On login page.
{
"name": "@dbp-toolkit/app-shell",
"version": "0.1.0",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell",
"version": "0.1.4",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
"private": true,
"devDependencies": {
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-json": "^4.1.0",
......@@ -45,7 +45,7 @@
"watch": "npm run watch-local",
"watch-local": "rollup -c --watch",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true",
"lint": "eslint ."
}
}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
{
"name": "@dbp-toolkit/auth",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/auth",
"version": "0.1.0",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
......
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
{
"name": "@dbp-toolkit/check-in-place-select",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/check-in-place-select",
"version": "0.1.0",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
......@@ -45,6 +46,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true"
}
}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
......@@ -8,9 +8,9 @@ import i18next from 'i18next';
* @param {i18next.i18n} i18n - The i18next instance
* @param {Date} date - The date to format
* @param {object} options - Options passed to Intl.DateTimeFormat
* @returns {string} The formated datetime
* @returns {string} The formatted datetime
*/
export function dateTimeFormat(i18n, date, options) {
export function dateTimeFormat(i18n, date, options = {}) {
return new Intl.DateTimeFormat(i18n.languages, options).format(date);
}
......@@ -22,9 +22,9 @@ export function dateTimeFormat(i18n, date, options) {
* @param {i18next.i18n} i18n - The i18next instance
* @param {number} number - The number to format
* @param {object} options - Options passed to Intl.NumberFormat
* @returns {string} The formated number
* @returns {string} The formatted number
*/
export function numberFormat(i18n, number, options) {
export function numberFormat(i18n, number, options = {}) {
return new Intl.NumberFormat(i18n.languages, options).format(number);
}
......
{
"name": "@dbp-toolkit/common",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common",
"version": "0.1.0",
"module": "index.js",
"license": "LGPL-2.1-or-later",
......@@ -29,7 +30,7 @@
"test": "npm run build-test && karma start --singleRun",
"watch": "rollup -c --watch",
"lint": "eslint .",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true"
},
"dependencies": {
"@open-wc/scoped-elements": "^1.3.2",
......
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
{
"name": "@dbp-toolkit/data-table-view",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/data-table-view",
"version": "0.1.0",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
......@@ -51,6 +52,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true"
}
}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
{
"name": "@dbp-toolkit/file-handling",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling",
"version": "0.1.5",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
......@@ -46,6 +47,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true"
}
}
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
\ No newline at end of file
{
"name": "@dbp-toolkit/knowledge-base-web-page-element-view",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/knowledge-base-web-page-element-view",
"version": "0.1.0",
"main": "src/index.js",
"license": "LGPL-2.1-or-later",
......@@ -44,6 +45,6 @@
"watch-local": "rollup -c --watch",
"watch-dev": "rollup -c --watch --environment BUILD:development",
"test": "npm run build-test && karma start --singleRun",
"publish": "can-npm-publish --verbose 2>&1 && npm run build && echo 'Todo: Publish' || true"
"publish": "can-npm-publish --verbose 2>&1 && npm run build && npm publish --access public 2>&1 || true"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment