@rhc-shared-components/title-util 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/index.modern.js +1 -0
- package/package.json +13 -2
- package/index.js +0 -9
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/title-util",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Title for CTE Apps",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.modern.js",
|
|
7
|
+
"source": "src/index.ts",
|
|
6
8
|
"author": "redhatofficial",
|
|
7
9
|
"license": ".",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "microbundle --css inline --no-sourcemap --no-compress --format modern,cjs"
|
|
15
|
+
},
|
|
8
16
|
"publishConfig": {
|
|
9
17
|
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"microbundle": "^0.13.3"
|
|
10
21
|
}
|
|
11
22
|
}
|
package/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Red Hat Connect title library
|
|
3
|
-
* @param title {string} Title to set
|
|
4
|
-
* @param postfix {string} Postfix for the SPA title eg: "Red Hat Partner Connect"
|
|
5
|
-
*/
|
|
6
|
-
export const SetSPATitle = (title, postfix = "Red Hat Partner Connect") => {
|
|
7
|
-
const titleToSet = `${title} | ${postfix}`;
|
|
8
|
-
if (document.title !== titleToSet) document.title = titleToSet;
|
|
9
|
-
}
|