Skip to content

Commit f7974d1

Browse files
smg6511opengeek
andauthored
Update Template Build Process (#16540)
### What does it do? Replaces most legacy dependencies with current versions—with the exception of bourbon, neat, and fontawesome—and drops others that are no longer relevant (such as imageoptim). ### Why is it needed? Bring 2.x more in line with 3.x, mainly allow use of modern js features. ### How to test 1. Run the rebuild processes, including `npm update` within the `_build/templates/default` directory. 2. Run `grunt build`. 3. Clear your manager and browser cache, then browse around the manager with your console open to verify all works as expected and no errors are being reported. Note that grunt build will spit out some warnings, as the versions of bourbon and neat we need to stick with here (for now at least) are ancient and contain some long-deprecated code. I attempted to bring these dependencies up to date (including fontawesome) but there are many breaking changes that make it difficult to unwind and get everything working. Might try that later if there's enough "life" left in the 2.x line and it's deemed beneficial to do so. ### Related issue(s)/PR(s) Resolves issues with building after including the following PRs: #16493 and #16467. --------- Co-authored-by: Jason Coward <[email protected]>
1 parent 7f12966 commit f7974d1

File tree

8 files changed

+10725
-9425
lines changed

8 files changed

+10725
-9425
lines changed

_build/templates/default/gruntfile.js

Lines changed: 253 additions & 277 deletions
Large diffs are not rendered by default.

_build/templates/default/package-lock.json

Lines changed: 2548 additions & 3426 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_build/templates/default/package.json

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,42 @@
11
{
22
"name": "revolution-theme-default",
33
"title": "MODX Revolution",
4-
"version": "2.7.0",
4+
"version": "2.8.7",
5+
"license": "GPL-2.0+",
56
"repository": "https://github.com/modxcms/revolution",
67
"devDependencies": {
7-
"grunt": "^1.3.0",
8-
"grunt-autoprefixer": "^3.0.4",
9-
"grunt-contrib-concat": "^1.0.1",
10-
"grunt-contrib-copy": "^1.0.0",
11-
"grunt-contrib-csslint": "^2.0.0",
12-
"grunt-contrib-cssmin": "^3.0.0",
13-
"grunt-contrib-uglify": "^4.0.1",
14-
"grunt-contrib-watch": "^1.1.0",
15-
"grunt-growl": "^0.1.5",
16-
"grunt-imageoptim": "^1.4.4",
17-
"grunt-rename": "^0.1.4",
18-
"grunt-sass": "^3.1.0",
19-
"node": "^14.15.0",
20-
"node-sass": "^5.0.0"
8+
"@lodder/grunt-postcss": "^3.0.1",
9+
"autoprefixer": "^10.3.3",
10+
"bourbon": "^4.3.4",
11+
"cssnano": "^5.0.8",
12+
"grunt": "^1.4.1",
13+
"grunt-contrib-concat": "^1.0.1",
14+
"grunt-contrib-copy": "^1.0.0",
15+
"grunt-contrib-watch": "^1.1.0",
16+
"grunt-dart-sass": "^2.0.1",
17+
"grunt-notify": "^0.4.5",
18+
"grunt-terser": "^2.0.0",
19+
"node": "^14.15.0",
20+
"node-neat": "^1.7.2",
21+
"normalize-scss": "^7.0.1",
22+
"postcss": "^8.3.6",
23+
"sass": "^1.42.1",
24+
"terser": "^5.9.0"
2125
},
2226
"dependencies": {
23-
"bourbon": "^4.3.4",
24-
"font-awesome": "^4.7.0",
25-
"node-neat": "^1.7.2"
26-
}
27-
}
27+
"font-awesome": "^4.7.0"
28+
},
29+
"scripts": {
30+
"build": "grunt build"
31+
},
32+
"browserslist": [
33+
"Chrome >= 64",
34+
"Firefox >= 78",
35+
"Safari >= 12",
36+
"Edge >= 79",
37+
"iOS >= 11",
38+
"ChromeAndroid >= 92",
39+
"last 2 Android versions",
40+
"not dead"
41+
]
42+
}

manager/assets/modext/modx.jsgrps-min.js

Lines changed: 50 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

manager/templates/default/css/index-min.css

Lines changed: 19 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)