Skip to content

Commit

Permalink
Merge branch 'MDL-77559-master-2' of https://github.com/andrewnicols/…
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Mar 9, 2023
2 parents edc4d51 + 511401f commit 8441270
Show file tree
Hide file tree
Showing 744 changed files with 18,092 additions and 5,202 deletions.
22 changes: 13 additions & 9 deletions .grunt/tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

/**
* Function to generate the destination for the minification task
* 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
Expand Down Expand Up @@ -61,6 +61,7 @@ module.exports = grunt => {
grunt.registerTask('js', ['amd', 'yui']);

// Register NPM tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-rollup');

Expand Down Expand Up @@ -127,7 +128,7 @@ module.exports = grunt => {
};
};

const terser = require('@rollup/plugin-terser');
const terser = require('rollup-plugin-terser').terser;
grunt.config.merge({
rollup: {
options: {
Expand All @@ -136,13 +137,6 @@ module.exports = grunt => {
sourcemap: true,
treeshake: false,
context: 'window',

// Treat all modules as external and do not try to resolve them.
// https://rollupjs.org/configuration-options/#external
// We do not need to resolve them as each module is transpiled individually and there is no tree shaking
// or combining of dependencies.
external: true,

plugins: [
rateLimit(),
babel({
Expand All @@ -166,6 +160,16 @@ module.exports = grunt => {
],
presets: [
['@babel/preset-env', {
targets: {
browsers: [
">0.3%",
"last 2 versions",
"not ie >= 0",
"not op_mini all",
"not Opera > 0",
"not dead"
]
},
modules: false,
useBuiltIns: false
}]
Expand Down
40 changes: 12 additions & 28 deletions .grunt/tasks/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,17 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

module.exports = (grunt) => {
const path = require('path');

grunt.registerTask('jsdoc', 'Generate JavaScript documentation using jsdoc', function() {
const done = this.async();
const configuration = path.resolve('.grunt/jsdoc/jsdoc.conf.js');

grunt.util.spawn({
cmd: 'jsdoc',
args: [
'--configure',
configuration,
]
}, function(error, result, code) {
if (result.stdout) {
grunt.log.write(result.stdout);
}

if (result.stderr) {
grunt.log.error(result.stderr);
}
if (error) {
grunt.fail.fatal(`JSDoc failed with error code ${code}`);
} else {
grunt.log.write('JSDoc completed successfully'.green);
}
done();
});
module.exports = grunt => {
// Project configuration.
grunt.config.merge({
jsdoc: {
dist: {
options: {
configure: ".grunt/jsdoc/jsdoc.conf.js",
},
},
},
});

grunt.loadNpmTasks('grunt-jsdoc');
};
4 changes: 1 addition & 3 deletions .grunt/tasks/stylelint.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ module.exports = grunt => {
return {
stylelint: {
scss: {
options: {
customSyntax: 'postcss-scss',
},
options: {syntax: 'scss'},
src: files,
},
},
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/hydrogen
lts/gallium
20 changes: 4 additions & 16 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"customSyntax": "postcss-scss",
"plugins": [
"stylelint-csstree-validator"
],
"rules": {
"csstree/validator": {
"syntaxExtensions": [
"sass"
]
},
"csstree/validator": true,
"at-rule-empty-line-before": [ "always",
{"except": [ "blockless-after-blockless"], ignore: ["after-comment", "inside-block"]}
],
Expand Down Expand Up @@ -50,7 +45,7 @@
"function-name-case": "lower",
"function-parentheses-newline-inside": "always-multi-line",
"function-parentheses-space-inside": "never-single-line",
"function-url-scheme-disallowed-list": ["data"],
"function-url-scheme-blacklist": ["data"],
"function-whitespace-after": "always",
"indentation": 4,
"keyframe-declaration-no-important": true,
Expand Down Expand Up @@ -89,19 +84,12 @@
"selector-type-no-unknown": true,
"string-no-newline": true,
"time-min-milliseconds": 100,
"unit-disallowed-list": ["pt"],
"unit-blacklist": ["pt"],
"unit-case": "lower",
"unit-no-unknown": true,
"value-keyword-case": ["lower", {"ignoreKeywords": ["/(@|$)/"]}],
"value-list-comma-newline-after": "always-multi-line",
"value-list-comma-space-after": "always-single-line",
"value-list-comma-space-before": "never",
},
"overrides": [
{
"files": ["**/yui/**/*.css"],
"rules": {
}
}
]
}
}
2 changes: 1 addition & 1 deletion admin/tool/analytics/amd/build/log_info.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8441270

Please sign in to comment.