Skip to content

Commit 92bf8fd

Browse files
committed
Replaced Grunt with NPM scripts in demo theme.
1 parent c9339d0 commit 92bf8fd

99 files changed

Lines changed: 2964 additions & 2594 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,30 @@ drush/contrib/
2828
!.docker/config
2929
!.docker/scripts
3030
!.env
31-
!.eslintrc.json
3231
!.eslintignore
32+
!.eslintrc.json
33+
!.prettierignore
34+
!.prettierrc.json
3335
!.sass-lint.yml
3436
!.stylelintrc.js
3537
!.twig-cs-fixer.php
36-
!gherkinlint.json
37-
!Gruntfile.js
3838
!auth.json
3939
!behat.yml
4040
!composer.json
4141
!composer.lock
42-
!yarn.lock
43-
!package.json
42+
!gherkinlint.json
4443
!package-lock.json
45-
!.prettierignore
46-
!.prettierrc.json
44+
!package.json
4745
!patches
4846
!phpcs.xml
4947
!phpmd.xml
5048
!phpstan.neon
5149
!phpunit.xml
50+
!postcss.config.js
5251
!rector.php
5352
!scripts
5453
!tests
54+
!yarn.lock
5555

5656
#;< HOSTING_ACQUIA
5757
!hooks

.gitignore.artifact

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ web/sites/default/files
1717
web/sites/simpletest
1818

1919
# Ignore non-production Drupal Scaffold files.
20-
web/sites/default/example.services.local.yml
21-
web/sites/default/example.settings.local.php
2220
web/sites/default/default.services.local.yml
2321
web/sites/default/default.settings.local.php
22+
web/sites/default/example.services.local.yml
23+
web/sites/default/example.settings.local.php
2424

2525
# Ignore custom theme asset sources.
26+
web/themes/custom/your_site_theme/.eslintrc.json
2627
web/themes/custom/your_site_theme/fonts
2728
web/themes/custom/your_site_theme/images
2829
web/themes/custom/your_site_theme/js
29-
web/themes/custom/your_site_theme/scss
30-
web/themes/custom/your_site_theme/Gruntfile.js
30+
web/themes/custom/your_site_theme/node_modules
3131
web/themes/custom/your_site_theme/package.json
32+
web/themes/custom/your_site_theme/postcss.config.js
33+
web/themes/custom/your_site_theme/scss
3234
web/themes/custom/your_site_theme/yarn.lock
33-
web/themes/custom/your_site_theme/.eslintrc.json
34-
web/themes/custom/your_site_theme/node_modules
3535

3636
#;< HOSTING_ACQUIA
3737
# Do not ignore Acquia hooks.

.vortex/docs/content/drupal/theme-scaffold.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ your_site_theme/
113113
├── your_site_theme.libraries.yml # Asset libraries
114114
├── your_site_theme.theme # Theme functions
115115
├── package.json # Node.js dependencies
116-
├── Gruntfile.js # Build configuration
117116
└── logo.svg # Theme logo
118117
```
119118

.vortex/installer/src/Prompts/Handlers/Theme.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,10 @@ protected static function findThemeFile(string $dir, string $webroot, ?string $t
237237

238238
protected static function isVortexTheme(string $dir): bool {
239239
$c1 = file_exists($dir . '/scss/_variables.scss');
240-
$c2 = file_exists($dir . '/Gruntfile.js');
241-
$c3 = file_exists($dir . '/package.json');
242-
$c4 = File::contains($dir . '/package.json', 'build-dev');
240+
$c2 = file_exists($dir . '/package.json');
241+
$c3 = File::contains($dir . '/package.json', 'build-dev');
243242

244-
return $c1 && $c2 && $c3 && $c4;
243+
return $c1 && $c2 && $c3;
245244
}
246245

247246
}

.vortex/installer/tests/Fixtures/handler_process/_baseline/.dockerignore

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ drush/contrib/
2727
!.docker/config
2828
!.docker/scripts
2929
!.env
30-
!.eslintrc.json
3130
!.eslintignore
31+
!.eslintrc.json
32+
!.prettierignore
33+
!.prettierrc.json
3234
!.sass-lint.yml
3335
!.stylelintrc.js
3436
!.twig-cs-fixer.php
35-
!gherkinlint.json
36-
!Gruntfile.js
3737
!auth.json
3838
!behat.yml
3939
!composer.json
4040
!composer.lock
41-
!yarn.lock
42-
!package.json
41+
!gherkinlint.json
4342
!package-lock.json
44-
!.prettierignore
45-
!.prettierrc.json
43+
!package.json
4644
!patches
4745
!phpcs.xml
4846
!phpmd.xml
4947
!phpstan.neon
5048
!phpunit.xml
49+
!postcss.config.js
5150
!rector.php
5251
!scripts
5352
!tests
53+
!yarn.lock
Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,72 @@
11
{
2-
"extends": "../../../core/.eslintrc.legacy.json"
2+
"extends": [
3+
"airbnb-base",
4+
"plugin:prettier/recommended",
5+
"plugin:yml/recommended"
6+
],
7+
"root": true,
8+
"env": {
9+
"browser": true,
10+
"es6": true,
11+
"node": true
12+
},
13+
"parserOptions": {
14+
"ecmaVersion": 2020
15+
},
16+
"plugins": [
17+
"jsdoc"
18+
],
19+
"globals": {
20+
"Drupal": true,
21+
"drupalSettings": true,
22+
"drupalTranslations": true,
23+
"jQuery": true,
24+
"_": true,
25+
"Cookies": true,
26+
"Backbone": true,
27+
"htmx": true,
28+
"loadjs": true,
29+
"Shepherd": true,
30+
"Sortable": true,
31+
"once": true,
32+
"CKEditor5": true,
33+
"tabbable": true,
34+
"transliterate": true,
35+
"bodyScrollLock" : true,
36+
"FloatingUIDOM": true
37+
},
38+
"rules": {
39+
"prettier/prettier": "error",
40+
"consistent-return": ["off"],
41+
"no-underscore-dangle": ["off"],
42+
"max-nested-callbacks": ["warn", 3],
43+
"import/no-mutable-exports": ["warn"],
44+
"no-plusplus": ["warn", {
45+
"allowForLoopAfterthoughts": true
46+
}],
47+
"no-param-reassign": ["off"],
48+
"no-prototype-builtins": ["off"],
49+
"jsdoc/require-returns": ["off"],
50+
"jsdoc/require-returns-type": ["warn"],
51+
"jsdoc/require-returns-description": ["warn"],
52+
"jsdoc/require-returns-check": ["warn"],
53+
"jsdoc/require-param": ["warn"],
54+
"jsdoc/require-param-type": ["warn"],
55+
"jsdoc/require-param-description": ["warn"],
56+
"jsdoc/check-param-names": ["warn"],
57+
"jsdoc/valid-types": ["warn"],
58+
"jsdoc/require-param-name": ["warn"],
59+
"jsdoc/check-tag-names": ["warn"],
60+
"no-unused-vars": ["warn"],
61+
"operator-linebreak": ["error", "after", { "overrides": { "?": "ignore", ":": "ignore" } }],
62+
"yml/indent": ["error", 2]
63+
},
64+
"settings": {
65+
"jsdoc": {
66+
"tagNamePreference": {
67+
"returns": "return",
68+
"property": "prop"
69+
}
70+
}
71+
}
372
}

.vortex/installer/tests/Fixtures/handler_process/_baseline/web/themes/custom/star_wars/Gruntfile.js

Lines changed: 0 additions & 171 deletions
This file was deleted.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Your Site Theme
2+
3+
Custom Drupal theme for the project.
4+
5+
## Requirements
6+
7+
- Node.js (LTS version recommended)
8+
- Yarn
9+
10+
## Installation
11+
12+
```bash
13+
yarn install
14+
```
15+
16+
## Commands
17+
18+
| Command | Description |
19+
|----------------------|------------------------------------------------|
20+
| `yarn run build` | Production build (minified, no source maps) |
21+
| `yarn run build-dev` | Development build (expanded, with source maps) |
22+
| `yarn run watch` | Watch for changes and rebuild automatically |
23+
| `yarn run lint` | Check code style (JS and SCSS) |
24+
| `yarn run lint-fix` | Fix code style issues automatically |

0 commit comments

Comments
 (0)