ahdjs 0.0.24 → 0.0.26
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 +23 -3
- package/build/css/index.css +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/types/index.d.ts +6 -2
- package/package.json +1 -1
- package/webpack.config.development.js +97 -0
package/build/types/index.d.ts
CHANGED
|
@@ -13,12 +13,16 @@ declare class AHD extends GuideChimp {
|
|
|
13
13
|
getHelpContent(url: string, refetch: boolean): Promise<any>;
|
|
14
14
|
showPageTour(url: string, refetch: boolean): Promise<void>;
|
|
15
15
|
showPageBeacons(url: string, refetch: boolean): Promise<void>;
|
|
16
|
+
showPageHighlights(url: string, refetch: boolean, force?: boolean): Promise<void>;
|
|
16
17
|
clearCachedData(): Promise<void>;
|
|
18
|
+
acknowledgeHighlight(id: string): Promise<void>;
|
|
17
19
|
private generateDescription;
|
|
20
|
+
private getUnAcknowledgedHightlightsForUrl;
|
|
18
21
|
private getApplicabeDataForUrl;
|
|
19
|
-
private
|
|
20
|
-
private
|
|
22
|
+
private fetchAndCacheHighlightsData;
|
|
23
|
+
private fetchAndCacheTourData;
|
|
21
24
|
private fetchAndCachePageVisitsData;
|
|
25
|
+
private updateVisitorStats;
|
|
22
26
|
private markPageVisited;
|
|
23
27
|
}
|
|
24
28
|
declare const AHDjs: {
|
package/package.json
CHANGED
|
@@ -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
|
+
];
|