File tree Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ import {
32
32
InsightsSearchViewFiltersEvent ,
33
33
viewedFilters
34
34
} from "./view" ;
35
- import { ANONYMOUS_USER_TOKEN , getUserToken , setUserToken } from "./_cookieUtils" ;
35
+ import {
36
+ ANONYMOUS_USER_TOKEN ,
37
+ getUserToken ,
38
+ setUserToken
39
+ } from "./_cookieUtils" ;
40
+ import { version } from "../package.json" ;
36
41
37
42
type Queue = {
38
43
queue : string [ ] [ ] ;
@@ -65,6 +70,8 @@ class AlgoliaAnalytics {
65
70
// LocalStorage
66
71
storageManager : StorageManager ;
67
72
73
+ version : string = version ;
74
+
68
75
// Private methods
69
76
private processQueue : ( ) => void ;
70
77
private sendEvent : (
Original file line number Diff line number Diff line change 19
19
"build:dev" : " rollup --watch --environment NODE_ENV:'development' -c rollup.config.js" ,
20
20
"build:test" : " yarn run jest" ,
21
21
"build:examples" : " webpack --config config/webpack.config.js --color --progress" ,
22
- "dev" : " NODE_ENV=development webpack --config config/webpack.config.js --color --progress --watch & node server/server"
22
+ "dev" : " NODE_ENV=development webpack --config config/webpack.config.js --color --progress --watch & node server/server" ,
23
+ "version" : " yarn build"
23
24
},
24
25
"repository" : {
25
26
"type" : " git" ,
57
58
"rollup-plugin-buble" : " 0.19.6" ,
58
59
"rollup-plugin-commonjs" : " 8.4.1" ,
59
60
"rollup-plugin-filesize" : " 1.5.0" ,
61
+ "rollup-plugin-json" : " 4.0.0" ,
60
62
"rollup-plugin-node-resolve" : " 3.4.0" ,
61
63
"rollup-plugin-replace" : " 2.1.1" ,
62
64
"rollup-plugin-typescript" : " 1.0.1" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import filesize from 'rollup-plugin-filesize';
4
4
import resolve from 'rollup-plugin-node-resolve' ;
5
5
import commonjs from 'rollup-plugin-commonjs' ;
6
6
import uglify from 'rollup-plugin-uglify' ;
7
+ import json from "rollup-plugin-json" ;
7
8
import replace from 'rollup-plugin-replace' ;
8
9
import typescript from 'rollup-plugin-typescript' ;
9
10
@@ -20,6 +21,10 @@ export default {
20
21
browser : true ,
21
22
preferBuiltins : false ,
22
23
} ) ,
24
+ json ( {
25
+ preferConst : true ,
26
+ compact : true
27
+ } ) ,
23
28
buble ( ) ,
24
29
commonjs ( ) ,
25
30
uglify ( ) ,
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
+ "resolveJsonModule" : true ,
4
+ "moduleResolution" : " node" ,
3
5
"outDir" : " ./dist/" ,
4
6
"module" : " es6" ,
5
7
"target" : " es6" ,
6
8
"noImplicitAny" : false ,
7
9
"allowJs" : true
8
10
},
9
- "exclude" : [
10
- " node_modules" ,
11
- " **/*.test.ts"
12
- ]
13
- }
11
+ "exclude" : [" node_modules" , " **/*.test.ts" ]
12
+ }
Original file line number Diff line number Diff line change @@ -8164,6 +8164,13 @@ rollup-plugin-filesize@1.5.0:
8164
8164
filesize "^3.5.6"
8165
8165
gzip-size "^3.0.0"
8166
8166
8167
+ rollup-plugin-json@4.0.0 :
8168
+ version "4.0.0"
8169
+ resolved "https://registry.yarnpkg.com/rollup-plugin-json/-/rollup-plugin-json-4.0.0.tgz#a18da0a4b30bf5ca1ee76ddb1422afbb84ae2b9e"
8170
+ integrity sha512-hgb8N7Cgfw5SZAkb3jf0QXii6QX/FOkiIq2M7BAQIEydjHvTyxXHQiIzZaTFgx1GK0cRCHOCBHIyEkkLdWKxow==
8171
+ dependencies :
8172
+ rollup-pluginutils "^2.5.0"
8173
+
8167
8174
rollup-plugin-node-resolve@3.4.0 :
8168
8175
version "3.4.0"
8169
8176
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz#908585eda12e393caac7498715a01e08606abc89"
You can’t perform that action at this time.
0 commit comments