js-tag-manager 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License Copyright (c) 2021
2
+
3
+ Permission is hereby granted, free
4
+ of charge, to any person obtaining a copy of this software and associated
5
+ documentation files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use, copy, modify, merge,
7
+ publish, distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice
12
+ (including the next paragraph) shall be included in all copies or substantial
13
+ portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
16
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
18
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # js-tag-manager
2
+
3
+ Manage JS tags
4
+
5
+ ## Features
6
+
7
+ - ES6 syntax, managed with Prettier + Eslint and Stylelint
8
+ - Unit testing via Jest
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ yarn add js-tag-manager
14
+ // or
15
+ npm i js-tag-manager
16
+ ```
17
+
18
+ ### Requirements
19
+
20
+ - Node.js `v14.x` or later
21
+ - React ^16.8
22
+
23
+ ### Usage
24
+
25
+ ```js
26
+ import { registerComponent } from 'saddlebag-componentregistry';
27
+
28
+ import { App } from 'js-tag-manager';
29
+
30
+ const { version, dynamics, pagetype, url } = window.TAG_MANAGER_PROPS;
31
+
32
+ registerComponent({
33
+ name: 'js-tag-manager',
34
+ version,
35
+ componentDefinition: App,
36
+ props: { dynamics, pagetype, url },
37
+ });
38
+ ```