77 Commits

Author SHA1 Message Date
Sara Arjona
f0a20c0a76 MDL-76802 core: Create a grunt task to get upgradable libs
A new grunt task, upgradablelibs, has been added in order to get the
list of libraries that have a newer version in their repositories.

Co-author: Andrew Lyons <andrew@moodle.com>
2023-03-13 11:53:23 +01:00
Andrew Nicols
fa073102d3 MDL-61460 Grunt: Add Component Library tasks
This new task handles building of component library documentation,
including the markdown to HTML, an index of the generated content used
for searching, and the CSS for the component library.
2021-07-08 09:51:02 +08:00
Andrew Nicols
2f2ecdae4a MDL-61460 Grunt: Make startup tasks configurable by tasks 2021-07-08 09:51:02 +08:00
Andrew Nicols
32638b3a45 MDL-68496 Grunt: Stylelint should only lint relevant component files
Prior to this change the Grunt stylelint command was too greedy when
determining which files hsould be linted.

This change modifies the watch command to only watch relevant files and
subdirectories of each component directories. This means that unrelated
CSS and SCSS files are no longer watched for changes, and has the added
benefit of significantly increaseing the startup speed of grunt.

Without this patch applied the watch tasks were checking for matches in
the node_modules, and vendor directories.
2021-03-22 15:18:47 +08:00
Andrew Nicols
61fca0e05c MDL-68496 grunt: Restructure grunt tasks into subdirectories
Prior to this change all Grunt features were in a single Gruntfile.js
but this has become difficult to manage and maintain.

This commit moves the existing dependencies for component calculation
and babel moduel definition into a new .grunt directory, and
restructures the existing tasks in Gruntfile.js into separate task
configuration files.

This improves the maintainability of the Grunt build system and allows
for easier future expansion.
2021-03-19 12:56:35 +08:00
Andrew Nicols
5b4debd2b0 MDL-66109 js: Upgrade Node dependencies
This change updates most libraries used in our Grunt build stack and
applies necessary changes to Grunt and Gherkin-lint configuration to
ensure that they continue to work.

The grunt-sass plugin has been updated to support alternative
'implementations' of sass compilers, and the chosen sass compiler must
now be specified in the grunt configuration. We continue to use the
`node-sass` package for this.

Our gherkin-lintrc included two rules which were renamed from
'no-unamed-*' to 'no-unnamed-*'. This change occurred in version 2.0.0
of Gherkin-lint and has no other effect.
2020-05-11 10:53:35 +08:00
Eloy Lafuente (stronk7)
2347ab5a3b Merge branch 'MDL-68323-master' of git://github.com/marinaglancy/moodle 2020-04-16 00:47:20 +02:00
Andrew Nicols
57b1653a37 MDL-68405 js: Ensure correct exit code for gherkinlint 2020-04-14 15:09:13 +08:00
Marina Glancy
749a38a7a9 MDL-68323 core: add --max-lint-warnings option to grunt 2020-04-02 13:42:28 +02:00
Eloy Lafuente (stronk7)
aced9967cc Merge branch 'MDL-67953-master' of git://github.com/andrewnicols/moodle 2020-02-18 17:09:17 +01:00
Andrew Nicols
d1a7806094 MDL-67949 grunt: normalise component paths 2020-02-18 08:10:24 +08:00
Andrew Nicols
843cf97bf6 MDL-67949 grunt: Add debugging information 2020-02-16 11:31:12 +08:00
Andrew Nicols
48b5817e88 MDL-67953 grunt: Work around spawn length limits 2020-02-13 13:29:28 +08:00
Tim Hunt
35e1470e06 MDL-67878 grunt: make it works on Windows
To be honest, all the real skill here is Andrew Nicols, but I made the patch, so the credit is mine! All mine!
2020-02-12 15:03:25 +00:00
Andrew Nicols
d7678ab3ce MDL-67449 grunt: Build ignorefiles from component list 2020-01-06 09:29:11 +08:00
Andrew Nicols
093be5c6e2 MDL-67449 grunt: Refactor CSS generation 2020-01-06 09:29:11 +08:00
Andrew Nicols
ba8a53d030 MDL-67449 grunt: Refactor gherkinlint 2020-01-06 09:29:11 +08:00
Andrew Nicols
b86930457f MDL-67449 grunt: Refactor YUI commands 2020-01-06 09:29:11 +08:00
Andrew Nicols
a84d52363b MDL-67449 grunt: Refactor watch to use component list 2020-01-06 09:29:11 +08:00
Andrew Nicols
a8109e759d MDL-67449 grunt: Refactor path calculation for AMD 2020-01-06 09:29:11 +08:00
Andrew Nicols
78b0a0c201 MDL-66653 javascript: Support ES6 dynamic imports 2019-09-11 14:06:32 +08:00
Andrew Nicols
9ec0cbe9ee MDL-66265 javascript: Ignore camelcase in Gruntfile 2019-09-04 06:48:11 +08:00
Andrew Nicols
f59ac4166c MDL-66265 javascript: Add jshint ignore for ES6 files in root dir 2019-09-04 06:48:11 +08:00
Andrew Nicols
9ea892d216 MDL-66192 javascript: Allow subdirs in AMD module names 2019-07-26 07:04:08 +08:00
Ryan Wyllie
38d4f754ca MDL-62497 javascript: add watchman support to grunt watch command 2019-07-19 14:12:49 +08:00
Ryan Wyllie
c53f86d408 MDL-62497 javascript: add babel transpiling to Grunt for ES6 support 2019-07-19 14:12:48 +08:00
Mathew May
cf89ac3d1a MDL-64506 Grunt: Remove old Bootstrapbase tasks 2019-04-03 19:34:20 +08:00
Bas Brands
de213bf079 MDL-64505 theme_classic: Created the classic theme
The Classic theme is being introduced as a Bootstrap 4 replacement
for the older themes based on Bootstrap 2, such as Bootstrapbase,
Clean and More. It is a child theme of Boost, with a navigation
structure similar to the Clean theme.

Co-authored-by: Bas Brands <bmbrands@gmail.com>
Co-authored-by: Michael Hawkins <michaelh@moodle.com>
2019-03-18 18:59:23 +08:00
Andrew Nicols
3951d50a89 MDL-51177 core: Ignore built files in stylelint 2018-09-12 12:36:19 +08:00
Joby Harding
fbd1877f20 MDL-63012 grunt: Update Node version check message 2018-07-29 21:06:52 +01:00
Bas Brands
af9edb2e6a MDL-59261 theme_boost: compiled css fallback 2018-07-03 14:14:52 +08:00
Dan Poltawski
6f601313f0 MDL-59761 eslint: support glob-based configuration
Since ESlint 4.1.0 [1], it's possible to support glob-based
configuration, this means we can move glob configuration out of grunt
and into the config file, which means tools will respect the glob rules
now too. :)

[1] http://eslint.org/blog/2017/06/eslint-v4.1.0-released
2017-09-06 08:53:50 +01:00
Dan Poltawski
09074c91d0 MDL-57945 stylelint: Upgrade 7.12.0
This stylelint is consolodating and focusing the project
so there are some rule deprecations without real alternatives yet.
2017-07-19 13:45:47 +01:00
Mark Nielsen
58923606e4 MDL-59091 behat: Properly propagate gherkinlint exit code 2017-06-02 09:27:48 -07:00
Rajesh Taneja
d44f7e4623
MDL-56519 behat: Add gherkin lint to watch and startup 2017-01-05 16:02:00 +08:00
Dan Poltawski
8b02e2d98c
MDL-56519 behat: Lint gherkin files 2017-01-03 09:12:54 +08:00
Dan Poltawski
36650f11d3 MDL-56423 stylelint: ignore custom.css files
The files have non-standard css syntax and with stylelint 7.4.1
it can no longer cope with it.
2016-10-13 10:01:31 +01:00
Dan Poltawski
d5dff6316a MDL-55168 grunt: Add plain css linting 2016-09-30 09:25:23 +01:00
Dan Poltawski
07482105c1 MDL-55165 less: use lowercase hex codes for colours
And use shorthand where possible.

Detected by
http://stylelint.io/user-guide/rules/color-hex-case/
http://stylelint.io/user-guide/rules/color-hex-length/

When reviewing this change, you can hide the case changes by
reviewing with:
GIT_EXTERNAL_DIFF='diff -ipu   #' git diff --ext-diff
2016-09-29 16:39:30 +01:00
Dan Poltawski
65f9a71fbd MDL-55165 less: ensure no units on 0 length things
Detected by http://stylelint.io/user-guide/rules/length-zero-no-unit/
2016-09-29 16:39:30 +01:00
Dan Poltawski
62ce522cde MDL-55165 less: fix various errors in less
Detected by stylelint rules:

http://stylelint.io/user-guide/rules/declaration-block-no-ignored-properties/
http://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties/
http://stylelint.io/user-guide/rules/declaration-block-no-shorthand-property-overrides/
http://stylelint.io/user-guide/rules/value-keyword-case/
http://stylelint.io/user-guide/rules/selector-type-no-unknown/
http://stylelint.io/user-guide/rules/selector-type-no-unknown/
2016-09-29 16:39:30 +01:00
Frédéric Massart
5142f56402 MDL-56063 theme_boost: Check and remove extraneous !important rules
Progress bar styling has been removed as they do not appear to
be used anywhere, though MDL-56095 has been created to style them
as (with or without the styles) they remain unstyled.

The file responsive.scss has been removed, it was not used.

Part of MDL-55071
2016-09-23 11:04:33 +01:00
Dan Poltawski
5cb8ca8610 MDL-55071 theme_boost: fixup bootswatch thirdpartylibs
Allow longhand colour codes for asthetics..
2016-09-23 10:57:54 +01:00
Dan Poltawski
46c1713c40 MDL-55071 theme_boost: fix stylelint detected issues in scss
Duplicate properties, star hacks
2016-09-23 10:57:36 +01:00
Dan Poltawski
841d25a984 MDL-55071 grunt: add stylelint:scss to default css task
Part of MDL-55071
2016-09-23 10:57:36 +01:00
Dan Poltawski
773e68b0f8 MDL-55071 stylelint: Config & grunt task for scss
Part of MDL-55071
2016-09-23 10:57:36 +01:00
Frederic Massart
d99949ab66 MDL-55377 theme_bootstrapbase: Adapt for RTL auto flipping
Part of MDL-55071
2016-09-23 10:53:08 +01:00
Dan Poltawski
d2c7175a34 MDL-55856 grunt: fail gracefully when node version too old
Unfortunately the engine requirement in packages.json is not a fatal
error, so you can get unhelpful errors with grunt if using an
unsupported version.
2016-09-15 15:32:32 +01:00
Dan Poltawski
70db37ba78 MDL-55465 grunt: ensure gruntfile is lint free
Not related to this patch, but fixed it while I was here..
2016-08-05 17:48:24 +01:00
Dan Poltawski
a26d36738a MDL-55465 grunt: Add .stylelintignore
Allow it to be generated by grunt ignorefiles
Make grunt use it rather than ignoring things manually
2016-08-05 17:48:24 +01:00