Skip to content

Commit

Permalink
fix: theme.min.js error
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed May 3, 2022
1 parent 2f86ca0 commit ab141e3
Show file tree
Hide file tree
Showing 8 changed files with 1,116 additions and 520 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
{
"targets": "> 0.25%, not dead"
}
],
"minify"
]
]
}
1,033 changes: 1,033 additions & 0 deletions assets/js/theme.js

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions assets/js/theme.min.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/theme.min.js.map

This file was deleted.

14 changes: 13 additions & 1 deletion assets/lib/lunr/lunr.segmentit.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@
{{- $config | jsonify | printf "window.config=%s;" | dict "Content" | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}

{{- /* Theme script */ -}}
{{- dict "Source" "js/theme.min.js" "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $_ := (resources.Get "js/theme.min.js.map").RelPermalink -}}
{{- dict "Source" "js/theme.js" "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}

{{- with (.Scratch.Get "this").scriptArr -}}
{{- delimit . "\n" | dict "Content" | dict "Scratch" $.Scratch "Data" | partial "scratch/script.html" -}}
Expand Down
559 changes: 60 additions & 499 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@
"version": "0.2.0",
"description": "LoveIt theme source file",
"private": true,
"dependencies": {},
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"babel-preset-minify": "^0.5.1",
"@babel/cli": "^7.17.10",
"@babel/core": "^7.17.10",
"@babel/preset-env": "^7.17.10",
"babelify": "^10.0.0",
"browserify": "^16.5.0",
"core-js": "^3.6.4",
"husky": "^4.2.3",
"minimist": "^1.2.6",
"segmentit": "^2.0.3",
"lodash": "^4.17.21"
"browserify": "^16.5.2",
"core-js": "^3.22.4",
"husky": "^4.3.8",
"segmentit": "^2.0.3"
},
"scripts": {
"preinstall": "npx npm-force-resolutions",
"babel": "npx babel src/js --out-file assets/js/theme.min.js --source-maps",
"babel": "npx babel src/js --out-file assets/js/theme.js",
"build": "npm run babel && hugo -v --source=exampleSite --themesDir ../.. --gc",
"build-lunr-segmentit": "browserify src/lib/lunr.segmentit.js -o assets/lib/lunr/lunr.segmentit.js -t babelify --presets @babel/preset-env --presets minify",
"start": "npm run babel && hugo server --source=exampleSite --themesDir ../.. -D --disableFastRender",
Expand Down

0 comments on commit ab141e3

Please sign in to comment.