Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize manager template build workflow #15793

Merged
merged 3 commits into from
Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
566 changes: 266 additions & 300 deletions _build/templates/default/gruntfile.js

Large diffs are not rendered by default.

9,432 changes: 5,525 additions & 3,907 deletions _build/templates/default/package-lock.json

Large diffs are not rendered by default.

67 changes: 38 additions & 29 deletions _build/templates/default/package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
{
"name": "revolution-theme-default",
"title": "MODX Revolution",
"version": "3.0.0",
"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-imageoptim": "^1.4.4",
"grunt-notify": "^0.4.5",
"grunt-sass": "^3.1.0",
"node": "^14.15.0",
"node-sass": "^5.0.0"
},
"dependencies": {
"bourbon": "^5.1.0",
"bourbon-neat": "^3.0.0",
"@fortawesome/fontawesome-free": "^5.7.0",
"normalize-scss": "^7.0.1"
},
"scripts": {
"build": "grunt build"
}
"name": "revolution-theme-default",
"title": "MODX Revolution",
"version": "3.0.0",
"license": "GPL-2.0+",
"repository": "https://github.com/modxcms/revolution",
"devDependencies": {
"@lodder/grunt-postcss": "^3.0.1",
"autoprefixer": "^10.3.3",
"bourbon": "^5.1.0",
"bourbon-neat": "^3.0.0",
"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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

windows 7 is not supported by node.js 14 :( Windows 7 still be more popular than 8, at least in Russia.
Is this dependency is necessary?

Copy link
Collaborator Author

@smg6511 smg6511 Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows 7, as you probably know, has been unsupported by Microsoft for more that a year and a half now. That said, I've seen that people on 7 have been able to get node 14+ running. See nodejs/node#33000 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for link, I'll try it.
Anyway, I would ask again: for what purpose is this dependency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the base software needed to use npm and the modules it manages. Are you intending on doing some development on the manager interface? Note that this same dependency has existed in 2.x for quite a while now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's very strange to have the npm installed and not have the nodejs installed, isn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mishantrop yes it is. I assume you're running Windows 7?

Copy link
Contributor

@mishanthrop mishanthrop Oct 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, including. Also I use Fedora and Mac OS. Dependings on tasks.

Copy link
Contributor

@mishanthrop mishanthrop Oct 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also there are better ways to limit the version of the application (anyway, I dont see any reasons for it in MODX):

package.json

{
  "name": "modx",
  "version": "3.0.0",
  "engines": {
   "node": ">=12.0.0"
  }
}

.npmrc

engine-strict=true

I have not personally tested it as it was never necessary.

Source: https://stackoverflow.com/a/68653111

"normalize-scss": "^7.0.1",
"postcss": "^8.3.6"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you use postcss and sass both?

Copy link
Collaborator Author

@smg6511 smg6511 Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

postcss is being used as a base for cssnano and autoprefixer. I'm not using the postcss scss plugin to parse scss because it's not entirely standard sass.

},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4"
},
"scripts": {
"build": "grunt build"
},
"browserslist": [
"Chrome >= 64",
"Firefox >= 78",
"Safari >= 12",
"Edge >= 79",
"iOS >= 11",
"ChromeAndroid >= 92",
"last 2 Android versions",
"not dead"
]
smg6511 marked this conversation as resolved.
Show resolved Hide resolved
}
51 changes: 26 additions & 25 deletions _build/templates/default/sass/_colors-and-vars.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Main colors */
// Main colors
$colorSplash: #234368;
$colorSplashLight: lighten($colorSplash, 50%);
$colorSplashMedium: lighten($colorSplash, 75%);
$colorSplashDark: darken($colorSplash, 20%);
$colorSplashContrast: #FFFFFF; /* needs much more adaption, should be used as text color for elements with $colorSplash background */
$colorSplashContrast: #FFFFFF; // needs much more adaption, should be used as text color for elements with $colorSplash background
$silver: #CCCCCC;
$gallery: #EEEEEE;
$wildSand: #F4F4F4;
Expand All @@ -13,7 +13,7 @@ $lightGray: #E4E4E4;
$softGray: #DCDCDC;
$mediumGray: #999999;
$darkGray: #515151;
$darkestGray: #53595F; /* a blueish dark gray */
$darkestGray: #53595F; // a blueish dark gray
$osloGray: #868B8F;
$doveGray: #686868; ;
$alabastersolid: #FAFAFA;
Expand All @@ -22,7 +22,7 @@ $scorpion: #606060;
$mineShaft: #343434;
$alto: #DFDFDF;
$white: #FFF;
$black: darken($colorSplash, 42.5%); /* generate the black from the $colorSplash */
$black: darken($colorSplash, 42.5%); // generate the black from the $colorSplash
$darkBlack: #000;
$lighterRed: #FFEEEE;
$green: #6CB24A;
Expand All @@ -32,27 +32,27 @@ $lighterGreen: #EFFCF6;
$yellow: #FCE588;
$orange: #F0B429;
$red: #CF1124;
$blue: #4A90E2; /* default theme $colorSplash */
$blue: #4A90E2; // default theme $colorSplash

/* Status Message */
// Status Message
$statusMessageBg: $green;
$statusMessageText: $white;
$statusMessageIconBg: $white;
$statusMessageIconText: $green;

/* Brand colors */
// Brand colors
$brandBg: $white;
$brandHover: $lightGray;
$brandSelectedBg: darken($brandHover, 3%);
$brandSelectedColor: $colorSplash;

/* Backgrounds */
// Backgrounds
$mainBg: #F1F1F1;
$lightBg: $lighterGray;
$mediumBg: $lighterGray;
$darkBg: $darkestGray;

/* Borders */
// Borders
$borderColor: $lightGray;
$borderColorHover: $colorSplash;
$borderColorGrayHover: $mediumGray;
Expand All @@ -62,7 +62,7 @@ $borderColorGrayActive: darken($mediumGray, 6%);
$borderColorDisabled: $borderColor;
$borderRadius: 3px;

/* Shadows */
// Shadows
$boxShadow: 0 4px 6px rgba(0, 0, 0, 0.15);
$boxShadowBig: 0 0 15px 0 rgba(0,0,0,0.2);
$shadowBorder: 0 0 0 1px $borderColor;
Expand All @@ -75,7 +75,7 @@ $shadowBorderActive: 0 0 0 1px $borderColorActive;
$shadowBorderGrayActive: 0 0 0 1px $borderColorGrayActive;
$shadowBorderDisabled: 0 0 0 1px $borderColorDisabled;

/* Grids */
// Grids
$gridsorted: $white;
$griddivider: $white;
$gridrowalt: #F5F6F9;
Expand All @@ -86,12 +86,12 @@ $gridHeaderBtnBgColor: $white;
$gridHeaderBtnColor: #77899F;
$gridHeaderBtnBgHoverColor: $white;

/* Form field colors */
// Form field colors
$coreFieldBg: $white;
$coreFieldLabelColor: $darkGray;
$coreFieldDescColor: $mediumGray;

/* Buttons */
// Buttons
$buttonBg: $white;
$buttonBgHover: $colorSplash;
$buttonBgActive: darken($colorSplash, 6%);
Expand All @@ -106,7 +106,7 @@ $buttonColorPrimaryActive: $white;
$buttonColorPrimaryDisabled: $white;
$buttonPrimaryBgActive: darken($greener, 12%);

/* Context menus */
// Context menus
$menuBg: $brandBg;
$menuBorder: 1px solid $borderColor;
$menuBorderRadius: $borderRadius;
Expand All @@ -116,13 +116,13 @@ $menuSelectedColor: $brandBg;
$menuTextColor: $darkGray;
$menuSeparatorColor: $borderColor;

/* ComboBox dropdown menus */
// ComboBox dropdown menus
$dropdownBg: $white;
$dropdownSelectedBg: #E1ECF1;
$dropdownTextColor: $darkGray;
$dropdownBorder: $lightGray;

/* Tree menus */
// Tree menus
$treeText: $mediumGray;
$tipText: $lighterGray;
$mainText: $black;
Expand Down Expand Up @@ -153,9 +153,9 @@ $unpublished: lighten($treeText, 10%) !important;
$hidden: $treeText;
$unpubText: normal;
$hiddenText: italic;
/* locked is already signaled with lock-icon, no need to use other semantic style here
as italic is used for "unpublished" */
$lockedText: inherit; //italic;
// locked is already signaled with lock-icon, no need to use other semantic style here
// as italic is used for "unpublished"
$lockedText: inherit; // italic;

$delTextColor: fade-out(darken(lighten(desaturate($red,50%), 33%), 25%), 0.5) !important;
$delTextStyle: normal;
Expand All @@ -164,7 +164,8 @@ $delTextDeco: line-through;
$treeDivider: #404040;

$navbarWidth: 70px;
/* Top navigation colors */

// Top navigation colors
$navbarText: $white;
$navbarBorder: rgba(255, 255, 255, .1);
$subnavBg: $white;
Expand All @@ -179,7 +180,7 @@ $searchResultsBgHover: $subnavBgHover;
$searchResultsHeadingColor: $darkestGray;
$searchResultsColor: $subnavTitleColor;

/* Tabs */
// Tabs
$tabStripBg: transparent;
$tabActiveBg: $white;
$tabActiveBgHover: $white;
Expand All @@ -192,14 +193,14 @@ $tabText: $colorSplash;
$tabTextHover: $darkestGray;
$leftbarTabActiveBg: $mainBg;

/* Windows */
// Windows
$winHeaderBg: $wildSand;
$winHeaderBorderColor: $wildSand;
$winBodyBg: $white;
$winFooterBg: $white;
$winFooterBorderColor: $white;

/* Font stacks */
// Font stacks
$bodyfonts: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
$bodyFontSize: 13px;
$headfonts: $bodyfonts;
Expand All @@ -217,7 +218,7 @@ $fontNavbar: normal $bodyFontSize $headfonts;
$fontH2: normal 25px $headfonts;
$fontH3: 550 15px $headfonts;

/* Responsive breakpoints */
// Responsive breakpoints
$mobile: (media: "screen and (max-width: 640px)", columns: 4);
$tabletP: (media: "screen and (max-width: 768px)", columns: 12);
$desktop: (media: "screen and (max-width: 960px)", columns: 12);
Expand All @@ -232,5 +233,5 @@ $gtTabletM: (media: "screen and (min-width: 1025px)", columns: 12);
$gtTabletL: (media: "screen and (min-width: 1141px)", columns: 12);
$gtCinema: (media: "screen and (min-width: 1401px)", columns: 12);

/* Path for background-images */
// Path for background-images
$imgPath: '../images/';
1 change: 0 additions & 1 deletion manager/assets/lib/popper.min.js

Large diffs are not rendered by default.

52 changes: 50 additions & 2 deletions manager/assets/modext/modx.jsgrps-min.js

Large diffs are not rendered by default.

74 changes: 55 additions & 19 deletions manager/templates/default/css/index-min.css

Large diffs are not rendered by default.

Loading