mod-build 3.6.75-beta.2 → 4.0.0-alpha.2

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.
Files changed (62) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc +18 -0
  3. package/CHANGELOG.md +2 -252
  4. package/README.md +16 -263
  5. package/gulp-tasks/grab-cdn.js +0 -10
  6. package/package.json +18 -68
  7. package/siteconfig.js +38 -0
  8. package/src/data/footer.js +117 -0
  9. package/src/data/seasons.js +5 -7
  10. package/src/index.html +18 -0
  11. package/src/main.js +45 -0
  12. package/src/scripts/has-qs-params.js +6 -5
  13. package/src/scripts/url-cleaner.js +3 -3
  14. package/src/scripts/utils.js +178 -0
  15. package/src/styles/home.scss +1 -0
  16. package/src/templates/_partials/scripts/deferred-styles.html +16 -16
  17. package/src/templates/_partials/scripts/vwo-redirect-callback.html +43 -45
  18. package/src/templates/components/head.html +70 -0
  19. package/tasks/clean.js +13 -0
  20. package/tasks/grab-cdn.js +107 -0
  21. package/tasks/grab-form-helpers.js +94 -0
  22. package/tasks/grab-shared-components.js +81 -0
  23. package/tasks/grab-shared-scripts.js +267 -0
  24. package/tasks/serve.js +15 -0
  25. package/tasks/templates.js +168 -0
  26. package/template.js +801 -0
  27. package/vite.config.js +56 -0
  28. package/.eslintrc.yml +0 -59
  29. package/src/data/common.js +0 -704
  30. package/src/data/components/qs-footer.js +0 -55
  31. package/src/data/components/quote-footer.js +0 -73
  32. package/src/scripts/apt-block.js +0 -919
  33. package/src/scripts/components/custom-selects.js +0 -48
  34. package/src/scripts/components/radio-panels.js +0 -45
  35. package/src/scripts/es6-1.js +0 -6
  36. package/src/scripts/es6-2.js +0 -2
  37. package/src/scripts/qs-form.js +0 -839
  38. package/src/scripts/vendor/maxmind-geoip2.js +0 -2
  39. package/src/scripts/vendor/swiper.min.js +0 -13
  40. package/src/styles/apt-block.scss +0 -888
  41. package/src/templates/_partials/apt-block.html +0 -30
  42. package/src/templates/_partials/scripts/analytics.html +0 -4
  43. package/src/templates/_partials/scripts/go-page-hiding-snippet.html +0 -8
  44. package/src/templates/_partials/scripts/google-maps.html +0 -1
  45. package/src/templates/_partials/scripts/google-optimize.html +0 -12
  46. package/src/templates/_partials/scripts/gtm-editorials/body/google-tag-manager-body.html +0 -5
  47. package/src/templates/_partials/scripts/gtm-editorials/head/google-tag-manager-head.html +0 -10
  48. package/src/templates/_partials/scripts/gtm-hil/body/google-tag-manager-body.html +0 -5
  49. package/src/templates/_partials/scripts/gtm-hil/head/google-tag-manager-head.html +0 -10
  50. package/src/templates/_partials/scripts/gtm-pro/body/google-tag-manager-body.html +0 -5
  51. package/src/templates/_partials/scripts/gtm-pro/head/google-tag-manager-head.html +0 -10
  52. package/src/templates/_partials/scripts/gtm-quote/body/google-tag-manager-body.html +0 -5
  53. package/src/templates/_partials/scripts/gtm-quote/head/google-tag-manager-head.html +0 -9
  54. package/src/templates/_partials/scripts/gtm-whitelabel/body/mod-google-tag-manager-body.html +0 -5
  55. package/src/templates/_partials/scripts/gtm-whitelabel/body/non-mod-google-tag-manager-body.html +0 -5
  56. package/src/templates/_partials/scripts/gtm-whitelabel/head/mod-google-tag-manager-head.html +0 -10
  57. package/src/templates/_partials/scripts/gtm-whitelabel/head/non-mod-google-tag-manager-head.html +0 -9
  58. package/src/templates/_partials/scripts/gtm-wordpress/body/google-tag-manager-body.html +0 -5
  59. package/src/templates/_partials/scripts/gtm-wordpress/head/google-tag-manager-head.html +0 -9
  60. package/src/templates/_partials/scripts/visual-website-optimizer.html +0 -5
  61. package/src/templates/index.html +0 -46
  62. /package/{src → public}/favicon.ico +0 -0
package/vite.config.js ADDED
@@ -0,0 +1,56 @@
1
+ import handlebars from 'vite-plugin-handlebars'
2
+ import inject from '@rollup/plugin-inject'
3
+ import { defaultSettings, siteData } from './siteconfig.js'
4
+ import { defineConfig } from 'vite'
5
+ import serve from './tasks/serve.js'
6
+ import { templateData } from './template.js'
7
+ import { handlebarsHelpers } from './src/scripts/utils.js'
8
+ import eslint from 'vite-plugin-eslint'
9
+ import { resolve } from 'path'
10
+
11
+ const { page } = templateData()
12
+
13
+ export default defineConfig(({ command }) => ({
14
+ root: defaultSettings.srcFolder,
15
+ build: {
16
+ outDir: `../${defaultSettings.distFolder}`,
17
+ emptyOutDir: true
18
+ },
19
+ publicDir: '../public',
20
+ plugins: [
21
+ inject({
22
+ $: 'jquery',
23
+ }),
24
+ {
25
+ ...handlebars({
26
+ partialDirectory: resolve(__dirname, 'src', 'templates', 'partials'),
27
+ context: { ...page, ...templateData() },
28
+ helpers: handlebarsHelpers
29
+ }),
30
+ enforce: 'pre',
31
+ },
32
+ {
33
+ name: 'test-gulp',
34
+ buildStart() {
35
+ if (command === 'serve') {
36
+ serve(siteData);
37
+ }
38
+ }
39
+ },
40
+ {
41
+ ...eslint(),
42
+ apply: 'build',
43
+ },
44
+ {
45
+ ...eslint({
46
+ failOnWarning: false,
47
+ failOnError: false,
48
+ }),
49
+ apply: 'serve',
50
+ enforce: 'post'
51
+ }
52
+ ],
53
+ define: {
54
+ 'process.env': process.env
55
+ }
56
+ }))
package/.eslintrc.yml DELETED
@@ -1,59 +0,0 @@
1
- parserOptions:
2
- ecmaVersion: 2018
3
- sourceType: 'module'
4
- env:
5
- browser: true
6
- jquery: true
7
-
8
- globals:
9
- require: true
10
- module: true
11
-
12
- rules:
13
- indent: [1, 'tab']
14
- brace-style: [2, "1tbs"]
15
- comma-style: [1, "last"]
16
- default-case: 2
17
- no-floating-decimal: 2
18
- no-nested-ternary: 2
19
- no-undefined: 2
20
- space-before-function-paren: [1, "never"]
21
- keyword-spacing: [2, {before: true, after: true}]
22
- space-before-blocks: 1
23
- spaced-comment: [2, "always", { exceptions: ["-"]}]
24
- valid-jsdoc: [1, { requireReturn: false, prefer: { return: "returns" }}]
25
- wrap-iife: [2, "inside", { functionPrototypeMethods: true }]
26
- guard-for-in: 2
27
- strict: [2, "never"]
28
- camelcase: 1
29
- curly: [2, "all"]
30
- eqeqeq: [2, "allow-null"]
31
- no-empty: 2
32
- no-use-before-define: 2
33
- no-obj-calls: 2
34
- no-unused-vars: [1, {vars: "local", args: "after-used"}]
35
- new-cap: 2
36
- no-shadow: 1
37
- no-invalid-regexp: 2
38
- comma-dangle: [1, "never"]
39
- no-undef: 2
40
- no-new: 2
41
- no-extra-semi: 2
42
- no-debugger: 2
43
- no-caller: 1
44
- semi: 2
45
- quotes: [1, "single", "avoid-escape"]
46
- no-unreachable: 2
47
- eol-last: 1
48
- operator-linebreak: [1, "before", {overrides: {"?": "after", ":": "after"}}]
49
- no-multi-str: 1
50
- no-mixed-spaces-and-tabs: 1
51
- no-trailing-spaces: 1
52
- space-infix-ops: 1
53
- space-unary-ops: 0
54
- no-with: 2
55
- dot-notation: 1
56
- semi-spacing: 1
57
- key-spacing: [1, {beforeColon: false, afterColon: true, mode: "minimum"}]
58
- space-in-parens: [1, "never"]
59
- prefer-const: 2