Skip to content

Commit

Permalink
Moodle 4.3 code style
Browse files Browse the repository at this point in the history
  • Loading branch information
davidherney committed Oct 5, 2024
1 parent df519ef commit 557aa1d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
31 changes: 0 additions & 31 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,43 +47,12 @@ module.exports = function(grunt) {
// Load all grunt tasks.
grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-eslint");
grunt.loadNpmTasks("grunt-contrib-uglify");

/**
* Function to generate the destination for the uglify task
* (e.g. build/file.min.js). This function will be passed to
* the rename property of files array when building dynamically:
* http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically
*
* @param {String} destPath the current destination
* @param {String} srcPath the matched src path
* @return {String} The rewritten destination path.
*/
var uglifyRename = function(destPath, srcPath) {
destPath = srcPath.replace("src", "build");
destPath = destPath.replace(".js", ".min.js");
destPath = path.resolve(PWD, destPath);
return destPath;
};

grunt.initConfig({
eslint: {
options: {quiet: !grunt.option("show-lint-warnings")},
amd: {src: amdSrc}
},
uglify: {
amd: {
files: [{
expand: true,
src: amdSrc,
rename: uglifyRename
}],
options: {
report: "min",
sourceMap: true
}
}
},
watch: {
options: {
nospawn: true,
Expand Down
2 changes: 1 addition & 1 deletion classes/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ public static function get_views_icons(): array {
'topbycourse' => 't/sort_by',
'topbysite' => 't/award',
'lastmonth' => 'e/insert_date',
'dynamichelps' => 'docs'
'dynamichelps' => 'docs',
];

return $icons;
Expand Down
1 change: 0 additions & 1 deletion db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.


/**
* Block caps.
*
Expand Down

0 comments on commit 557aa1d

Please sign in to comment.