-
Notifications
You must be signed in to change notification settings - Fork 43
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 + fkey combination and enterSyncin 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.htmlfile is present in theproject-distfolder. 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.htmlfile 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.cssfile. 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.csscontains incorrect styles, the task is considered not completed - 0 points. -
Change the content of the
stylesfolder by removing one or more style files, or replace thestylesfolder andproject-dist/index.htmlwith the content of thetest-filesfolder (the previously generatedbundle.cssfile should remain inproject-dist). -
In the
stylesfolder, add a file with an extension other thancssand content likeext-test-string(or any other string of your choice). -
Run the script and ensure that the
bundle.cssfile 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.cssfile using thectrl/cmd + fkey 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.