Skip to content

Commit 6ade453

Browse files
authored
Add instructions on how to unminify main.js for easier browser debugging (#3055)
* Add instructions on how to unminify main.js for easier browser debugging * Fixed Markdown style like sggested by @iBug
1 parent bd46e0a commit 6ade453

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/_docs/17-javascript.md

+15
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,18 @@ To get started:
6464
{: .notice--warning}
6565

6666
If all goes well, running `npm run build:js` will compress/concatenate `_main.js` and all plugin scripts into `main.min.js`.
67+
68+
## Debugging
69+
The minified Javascript is harder to debug in the browser than the raw source. To stop the minification and just bundle all the Javascript as-is; open up `package.json` and edit the value `scripts.uglify` from:
70+
71+
```json
72+
"scripts": {
73+
"uglify": "uglifyjs [...] -c -m -o assets/js/main.min.js",
74+
```
75+
76+
to simply concatenating the files:
77+
78+
```json
79+
"scripts": {
80+
"uglify": "cat [...] > assets/js/main.min.js",
81+
```

0 commit comments

Comments
 (0)