Skip to content

Commit da06225

Browse files
[TASK] Adapt JS+CSS build to patch #106501 (#380)
* [TASK] Adapt JS+CSS build to patch #106501 With https://review.typo3.org/c/Packages/TYPO3.CMS/+/88921 the 'buildJavascript' and 'buildCss' methods were aliased to 'build', which does the same but combined and quickly enough. Adjust all references to this. * Update Documentation/Testing/Index.rst Co-authored-by: Stefan Bürk <[email protected]> * Update Documentation/Testing/Index.rst Co-authored-by: Stefan Bürk <[email protected]> --------- Co-authored-by: Stefan Bürk <[email protected]>
1 parent 19b4bfa commit da06225

File tree

8 files changed

+25
-21
lines changed

8 files changed

+25
-21
lines changed

Documentation/Appendix/OSX/InstallGrunt.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In your Terminal app navigate to the folder that you cloned the TYPO3 source int
2121

2222
.. code-block:: bash
2323
24-
npm ci
24+
npm install
2525
2626
This will install Grunt as well a s couple of Task plugins we use in the TYPO3 core.
2727
To make sure grunt is running, run

Documentation/Appendix/SettingUpTypo3Ddev.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,28 @@ now:
147147

148148
.. tabs::
149149

150+
.. group-tab:: locally
151+
152+
.. code-block:: bash
153+
154+
cd Build
155+
nvm use
156+
npm install
157+
npm run build
158+
// or: npm run watch:build
159+
150160
.. group-tab:: DDEV
151161

152162
.. code-block:: bash
153163
154-
ddev exec "cd Build && npm ci"
164+
ddev exec "cd Build && npm install"
155165
ddev exec "cd Build && npm run build"
156166
157167
.. group-tab:: runTests.sh
158168

159169
.. code-block:: bash
160170
161-
Build/Scripts/runTests.sh -s buildCss
162-
Build/Scripts/runTests.sh -s buildJavascript
171+
Build/Scripts/runTests.sh -s build
163172
164173
165174

Documentation/Build/Index.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ If you make changes to the source files, you can build locally using
2626

2727
.. code-block:: bash
2828
29-
Build/Scripts/runTests.sh -s buildCss
30-
Build/Scripts/runTests.sh -s buildJavascript
29+
Build/Scripts/runTests.sh -s build
30+
31+
Note you can also use `npm` + `nvm` locally, if you are proficient with setting this up locally.
3132

3233
It is also possible to lint the files locally:
3334

@@ -37,4 +38,4 @@ It is also possible to lint the files locally:
3738
Build/Scripts/runTests.sh -s lintTypescript
3839
3940
Remember to commit the compiled files alongside any patches, they are part
40-
of the monorepo.
41+
of the monorepo.

Documentation/HandlingAPatch/CleanupTypo3.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ Also you may need to create the JS/CSS assets:
5757

5858
.. code-block:: bash
5959
60-
./Build/Scripts/runTests.sh -s buildCss && \
61-
./Build/Scripts/runTests.sh -s buildJavascript
60+
./Build/Scripts/runTests.sh -s build
6261
6362
**Changes in DB schema (ext_tables.sql)**:
6463

Documentation/HandlingAPatch/ResolveMergeConflicts.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,7 @@ JavaScript and CSS assets are build from sources in the monorepo, with the comma
240240
# optionally, reset state
241241
Build/Scripts/runTests.sh -s clean
242242
243-
Build/Scripts/runTests.sh -s buildCss
244-
Build/Scripts/runTests.sh -s buildJavascript
243+
Build/Scripts/runTests.sh -s build
245244
246245
This "compiles" files with ".scss" and ".ts" extensions to their bundled ".css" and
247246
".js" variants. TYPO3 also versions these files inside the monorepo.
@@ -254,7 +253,7 @@ will occur, if your patch works on anything CSS/JS related and other changes
254253
have been introduced meanwhile.
255254

256255
The solution to resolve merge conflicts in these files is actually vers easy. Just
257-
re-perform the commands from above (`...buildCss/buildJavascript`), which will re-create
256+
re-perform the commands from above (`... build`), which will re-create
258257
the assets from your cherry-picked patchset. You may need to resolve conflicts in the
259258
`.ts/.scss` files beforehand, if there are any due to rebasing.
260259

Documentation/Testing/CoreTesting.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ Luckily, `runTests.sh` also helps us to build JavaScript and CSS assets:
255255

256256
.. code-block:: shell
257257
258-
Build/Scripts/runTests.sh -s buildJavascript
259-
Build/Scripts/runTests.sh -s buildCss
258+
Build/Scripts/runTests.sh -s build
260259
261260
Again, this utilizes all the needed containers for the proper NodeJS environment, so you have
262261
zero local dependencies on properly building.

Documentation/Testing/Index.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ Output example:
8484
Specifies which test suite to run
8585
- acceptance: main application acceptance tests
8686
- acceptanceInstall: installation acceptance tests, only with -d mariadb|postgres|sqlite
87-
- buildCss: execute scss to css builder
88-
- buildJavascript: execute typescript to javascript builder
87+
- build: execute frontend build (TypeScript, Sass, Contrib, Assets)
8988
- cgl: test and fix all core php files
9089
...
9190
@@ -99,9 +98,8 @@ which start with the same string.
9998

10099
Commands for building:
101100

102-
* -s composerInstall (composer*)
103-
* -s buildCss: build CSS assets
104-
* -s buildJavascript
101+
* `-s composerInstall`: install composer dependencies from `composer.lock`
102+
* `-s build`: build CSS+JS assets
105103
* ...
106104

107105
Checks and fixes, run static analyzer, lint etc:

Documentation/Troubleshooting/Index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,7 @@ re-create the assets using the following workflow:
293293
./Build/Scripts/runTests.sh -s clean
294294
295295
# Execute the build
296-
./Build/Scripts/runTests.sh -s buildCss
297-
./Build/Scripts/runTests.sh -s buildJavascript
296+
./Build/Scripts/runTests.sh -s build
298297
299298
# Now add all conflicting files as resolved:
300299
git add typo3/sysext/backend/Resources/Public/Css/backend.css

0 commit comments

Comments
 (0)