Skip to content

Commit

Permalink
Update Template Build Process (#16540)
Browse files Browse the repository at this point in the history
### 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 <jason@opengeek.com>
  • Loading branch information
smg6511 and opengeek authored Mar 21, 2024
1 parent 7f12966 commit f7974d1
Show file tree
Hide file tree
Showing 8 changed files with 10,725 additions and 9,425 deletions.
530 changes: 253 additions & 277 deletions _build/templates/default/gruntfile.js

Large diffs are not rendered by default.

5,974 changes: 2,548 additions & 3,426 deletions _build/templates/default/package-lock.json

Large diffs are not rendered by default.

55 changes: 35 additions & 20 deletions _build/templates/default/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
{
"name": "revolution-theme-default",
"title": "MODX Revolution",
"version": "2.7.0",
"version": "2.8.7",
"license": "GPL-2.0+",
"repository": "https://github.com/modxcms/revolution",
"devDependencies": {
"grunt": "^1.3.0",
"grunt-autoprefixer": "^3.0.4",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-csslint": "^2.0.0",
"grunt-contrib-cssmin": "^3.0.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-contrib-watch": "^1.1.0",
"grunt-growl": "^0.1.5",
"grunt-imageoptim": "^1.4.4",
"grunt-rename": "^0.1.4",
"grunt-sass": "^3.1.0",
"node": "^14.15.0",
"node-sass": "^5.0.0"
"@lodder/grunt-postcss": "^3.0.1",
"autoprefixer": "^10.3.3",
"bourbon": "^4.3.4",
"cssnano": "^5.0.8",
"grunt": "^1.4.1",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-watch": "^1.1.0",
"grunt-dart-sass": "^2.0.1",
"grunt-notify": "^0.4.5",
"grunt-terser": "^2.0.0",
"node": "^14.15.0",
"node-neat": "^1.7.2",
"normalize-scss": "^7.0.1",
"postcss": "^8.3.6",
"sass": "^1.42.1",
"terser": "^5.9.0"
},
"dependencies": {
"bourbon": "^4.3.4",
"font-awesome": "^4.7.0",
"node-neat": "^1.7.2"
}
}
"font-awesome": "^4.7.0"
},
"scripts": {
"build": "grunt build"
},
"browserslist": [
"Chrome >= 64",
"Firefox >= 78",
"Safari >= 12",
"Edge >= 79",
"iOS >= 11",
"ChromeAndroid >= 92",
"last 2 Android versions",
"not dead"
]
}
52 changes: 50 additions & 2 deletions manager/assets/modext/modx.jsgrps-min.js

Large diffs are not rendered by default.

21 changes: 19 additions & 2 deletions manager/templates/default/css/index-min.css

Large diffs are not rendered by default.

Loading

0 comments on commit f7974d1

Please sign in to comment.