Я использую grunt, чтобы посмотреть мои html и css-файлы и перезагрузить браузер, когда они меняются. Если я внес изменения в свой html, страница перезагружается почти мгновенно, но если я внес изменения в некоторый CSS, я получу следующую распечатку в командной строке.Почему задачи CSS grunt заканчиваются на 30 мс, а загрузка страницы занимает 7 секунд?
Execution Time (2015-03-10 16:02:07 UTC)
loading tasks 5ms █████████ 17%
newer:copy:styles 10ms █████████████████ 33%
copy:styles 8ms ██████████████ 27%
newer-postrun:copy:style...ules\grunt-newer\.cache 6ms ██████████ 20%
Total 30ms
Несмотря на это говорят, что завершает все связанные с CSS задачи в 30мс, страница занимает почти 7 секунд, чтобы перезагрузить новый CSS.
Может ли кто-нибудь объяснить, почему это так? Для записи я НЕ использую SASS или LESS, просто обычный CSS. Я могу связать свой Gruntfile.js, если это необходимо.
EDIT: Это полный подробный вывод моя командная строка дает мне на изменении CSS ...
>> File "app\styles\main.css" changed.
Running "newer:copy:styles" (newer) task
Options: cache="C:\\Users\\Code\\node_modules\\grunt-newer\\.cache", override=undefined
Files: app/styles/main.css -> .tmp/styles/main.css
Running "copy:styles" (copy) task
Verifying property copy.styles exists in config...OK
Files: app/styles/main.css -> .tmp/styles/main.css
Options: encoding="utf8", processContent=false, processContentExclude=[], timestamp=false, mode=false
Copying app/styles/main.css -> .tmp/styles/main.css
Reading app/styles/main.css...OK
Writing .tmp/styles/main.css...OK
Copied 1 file
Running "newer-postrun:copy:styles:7:C:\Users\Aaron\Dropbox\Projects\mPathway\Code\node_modules\grunt-newer\.cache" (newer-postrun) task
Writing C:\Users\Aaron\Dropbox\Projects\mPathway\Code\node_modules\grunt-newer\.cache\copy\styles\timestamp...OK
Running "watch" task
Verifying property watch exists in config...OK
Verifying property watch.bower.files exists in config...OK
Verifying property watch.js.files exists in config...OK
Verifying property watch.jsTest.files exists in config...OK
Verifying property watch.styles.files exists in config...OK
Verifying property watch.gruntfile.files exists in config...OK
Verifying property watch.livereload.files exists in config...OK
Completed in 0.047s at Thu Mar 12 2015 13:00:24 GMT+0000 (GMT Standard Time) - Waiting...
Watching bower.json for changes.
Watching .tmp for changes.
Watching app for changes.
Watching bower_components for changes.
Watching dist for changes.
Watching node_modules for changes.
Watching test for changes.
Watching app\scripts\app.js for changes.
Watching app\scripts\controllers for changes.
Watching app\scripts\controllers\main.js for changes.
Watching test\spec\controllers\main.js for changes.
Watching app\styles\main.css for changes.
Watching Gruntfile.js for changes.
Watching .tmp for changes.
Watching app for changes.
Watching bower_components for changes.
Watching dist for changes.
Watching node_modules for changes.
Watching test for changes.
Watching app\404.html for changes.
Watching app\images for changes.
Watching app\scripts for changes.
Watching app\styles for changes.
Watching app\views for changes.
Watching app\index.html for changes.
Watching app\views\main.html for changes.
Watching .tmp\styles\main.css for changes.
Watching app\images\yeoman.png for changes.
>> File ".tmp\styles\main.css" changed.
Running "watch" task
Verifying property watch exists in config...OK
Verifying property watch.bower.files exists in config...OK
Verifying property watch.js.files exists in config...OK
Verifying property watch.jsTest.files exists in config...OK
Verifying property watch.styles.files exists in config...OK
Verifying property watch.gruntfile.files exists in config...OK
Verifying property watch.livereload.files exists in config...OK
Live reloading .tmp\styles\main.css...
Completed in 0.030s at Thu Mar 12 2015 13:00:26 GMT+0000 (GMT Standard Time) - Waiting...
Watching bower.json for changes.
Watching .tmp for changes.
Watching app for changes.
Watching bower_components for changes.
Watching dist for changes.
Watching node_modules for changes.
Watching test for changes.
Watching app\scripts\app.js for changes.
Watching app\scripts\controllers for changes.
Watching app\scripts\controllers\main.js for changes.
Watching test\spec\controllers\main.js for changes.
Watching app\styles\main.css for changes.
Watching Gruntfile.js for changes.
Watching .tmp for changes.
Watching app for changes.
Watching bower_components for changes.
Watching dist for changes.
Watching node_modules for changes.
Watching test for changes.
Watching app\404.html for changes.
Watching app\images for changes.
Watching app\scripts for changes.
Watching app\styles for changes.
Watching app\views for changes.
Watching app\index.html for changes.
Watching app\views\main.html for changes.
Watching .tmp\styles\main.css for changes.
Watching app\images\yeoman.png for changes.
Это не строго проблема CSS, в частности проблема с хрюканьем. –
@Jack снял тег css – AzzyDude
как вы измеряете 7 секунд, чтобы загрузить css? –