-
Notifications
You must be signed in to change notification settings - Fork 30
Check 05 merge styles
Description of the cross-check process 05-merge-styles:
Video with the example of cross-check
-
Check the code for the presence of synchronous methods of the fs module (you can use the
ctrl/cmd + f
key combination and enterSync
in the search field that appears) and setTimeout().
If synchronous methods or a timer are used, the task is considered not completed - 0 points. -
Ensure that only the
index.html
file is present in theproject-dist
folder. If there are any extraneous files, delete them. -
In the root directory of the repository, execute the command
node 05-merge-styles
. For a better understanding of the script's operation, you can open theindex.html
file using the Live Server extension.
If there are errors during the script's execution, the task is considered not completed - 0 points. -
Check the content of the
bundle.css
file. The content of the file and the styling format in it should match the source files, and styles should not be merged. The sequence of styles is not checked!
Ifbundle.css
contains incorrect styles, the task is considered not completed - 0 points. -
Change the content of the
styles
folder by removing one or more style files, or replace thestyles
folder andproject-dist/index.html
with the content of thetest-files
folder (the previously generatedbundle.css
file should remain inproject-dist
). -
In the
styles
folder, add a file with an extension other thancss
and content likeext-test-string
(or any other string of your choice). -
Run the script and ensure that the
bundle.css
file is overwritten and contains up-to-date and correct styles.
If this does not happen, the task is considered not completed - 0 points. -
Search for the string
ext-test-string
(or the string written in a file with an extension other thancss
) in thebundle.css
file using thectrl/cmd + f
key combination.
If the string is present in the file, the task is considered not completed - 0 points.
If all points are successfully checked, 20 points are awarded for the task.