ahdjs 0.0.23 → 0.0.25

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/README.md CHANGED
@@ -7,19 +7,39 @@
7
7
 
8
8
  ### npm Installtion
9
9
  ```
10
- npm install @ishaan-puniani/ahdjs
10
+ npm install ahdjs --save
11
+ ```
12
+
13
+ ### yarn Installtion
14
+ ```
15
+ yarn add ahdjs
11
16
  ```
12
17
  ### app components
13
18
  ```
14
19
  import AHDjs from 'ahdjs';
15
- const libraryInstance = new MyLibrary();
16
-
20
+ ...
17
21
  const ahdJS = new AHDjs(undefined, {applicationId: '<Application ID from Back office>'});
18
22
  ...
19
23
 
24
+ ahdJS.initializeSiteMap();
20
25
  ahdJS.updatePageUrl(props.url, false); <<-- to connect with router
21
26
  ```
22
27
 
28
+ ### Example
29
+ ```
30
+
31
+ let _ahdJs = new AHDjs(undefined, {
32
+ applicationId: "64d2b934c6cfdc96aa3734c5",
33
+ apiHost: "https://ahd.fabbuilder.com",
34
+ });
35
+ _ahdJs.initializeSiteMap();
36
+
37
+ setTimeout(() => {
38
+ _ahdJs.showPageTour("/auth/signin");
39
+ }, 1000);
40
+ ```
41
+
42
+
23
43
  ### self-host/cdn
24
44
 
25
45
  ```
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * ahdjs v0.0.23
3
+ * ahdjs v0.0.25
4
4
  *
5
5
  *
6
6
  * Copyright (c) Ishaan Puniani (https://github.com/ishaan-puniani) and project contributors.
package/build/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * ahdjs v0.0.23
3
+ * ahdjs v0.0.25
4
4
  *
5
5
  *
6
6
  * Copyright (c) Ishaan Puniani (https://github.com/ishaan-puniani) and project contributors.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ahdjs",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/types/index.d.ts",
package/testing.html CHANGED
@@ -214,12 +214,12 @@
214
214
  const AHDjs = window.AHDjs.default;
215
215
  let _ahdJs = new AHDjs(undefined, {
216
216
  applicationId: "64d2b934c6cfdc96aa3734c5",
217
- apiHost: "https://ahd.fabbuilder.com/ahd",
217
+ apiHost: "https://ahd.fabbuilder.com",
218
218
  });
219
219
  _ahdJs.initializeSiteMap();
220
220
 
221
221
  setTimeout(() => {
222
- // _ahdJs.clearCachedData()
222
+ _ahdJs.clearCachedData()
223
223
  }, 50000);
224
224
 
225
225
  // _ahdJs.start();
@@ -0,0 +1,97 @@
1
+ const path = require("path");
2
+ const webpack = require("webpack");
3
+ const getPackageJson = require("./scripts/getPackageJson");
4
+ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
5
+
6
+ const { version, name, license, repository, author } = getPackageJson(
7
+ "version",
8
+ "name",
9
+ "license",
10
+ "repository",
11
+ "author"
12
+ );
13
+
14
+ const banner = `
15
+ ${name} v${version}
16
+ ${repository.url}
17
+
18
+ Copyright (c) ${author.replace(/ *<[^)]*> */g, " ")} and project contributors.
19
+
20
+ This source code is licensed under the ${license} license found in the
21
+ LICENSE file in the root directory of this source tree.
22
+ `;
23
+
24
+ module.exports = [
25
+ {
26
+ mode: "development",
27
+ // devtool: "source-map",
28
+ entry: "./src/lib/index.ts",
29
+ output: {
30
+ filename: "index.js",
31
+ path: path.resolve(__dirname, "build"),
32
+ library: "AHDjs",
33
+ libraryTarget: "umd",
34
+ // clean: true,
35
+ },
36
+ // optimization: {
37
+ // minimize: true,
38
+ // minimizer: [
39
+ // new TerserPlugin({ extractComments: false }),
40
+ // new CssMinimizerPlugin(),
41
+ // ],
42
+ // },
43
+ module: {
44
+ rules: [
45
+ {
46
+ test: /\.html$/i,
47
+ loader: "html-loader",
48
+ options: {
49
+ minimize: {
50
+ caseSensitive: true,
51
+ collapseWhitespace: true,
52
+ conservativeCollapse: true,
53
+ keepClosingSlash: true,
54
+ minifyCSS: false,
55
+ minifyJS: true,
56
+ removeComments: true,
57
+ removeRedundantAttributes: true,
58
+ removeScriptTypeAttributes: true,
59
+ removeStyleLinkTypeAttributes: true,
60
+ },
61
+ },
62
+ },
63
+ {
64
+ test: /\.(m|j|t)s$/,
65
+ exclude: /(node_modules|bower_components)/,
66
+ use: {
67
+ loader: "babel-loader",
68
+ },
69
+ },
70
+ {
71
+ test: /\.(sa|sc|c)ss$/,
72
+ use: [
73
+ {
74
+ loader: MiniCssExtractPlugin.loader,
75
+ },
76
+ {
77
+ loader: "css-loader",
78
+ options: {
79
+ sourceMap: true,
80
+ },
81
+ },
82
+ "sass-loader",
83
+ ],
84
+ },
85
+ ],
86
+ },
87
+ plugins: [
88
+ new MiniCssExtractPlugin({
89
+ filename: "css/index.css",
90
+ }),
91
+ new webpack.BannerPlugin(banner),
92
+ ],
93
+ resolve: {
94
+ extensions: [".ts", ".js", ".json"],
95
+ },
96
+ },
97
+ ];