Closed mariusmateoc closed 8 years ago
Are you sure this isn't a cache problem or something? I can't reproduce this locally following your steps, running gulp
after gulp --prod
just produces the dev site without the cache busted and so on assets on my end.
I have cleared the npm cache, browser cache, also removed dist
and .tmp
then run the gulp
again but didn't work for me.
More information about my system:
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.11.4
BuildVersion: 15E65
$ node -v
v6.0.0
$ npm -v
3.8.6
$ gulp --version
[10:06:47] Requiring external module babel-core/register
[10:06:47] CLI version 0.4.0
[10:06:47] Local version 4.0.0-alpha.2
Steps:
yo jekyllized
gulp
command/src/assets/scss/style.scss
then stop the gulp
commandgulp --prod
command —> Everything ok —> then stop the commandgulp
again.Now in dist
and .tmp
I have the right files /assets/javascript/index.js
and /assets/stylesheets/style.css
but in the /dist/index.html
links to the old css that doesen't exist:
<!-- CSS -->
<!-- inject:css -->
<link rel="stylesheet" href="/assets/stylesheets/style-eb1e1d9904.min.css">
<!-- endinject -->
Now the /assets/javascript/index.js
point to the right file:
<!-- JS -->
<!-- inject:js -->
<script src="/assets/javascript/index.js"></script>
<!-- endinject -->
In /src/_includes/head.html
I have:
<!-- CSS -->
<!-- inject:css -->
<link rel="stylesheet" href="/assets/stylesheets/style-eb1e1d9904.min.css">
<!-- endinject -->
and /src/_layouts/default.html
:
<!-- JS -->
<!-- inject:js -->
<script src="/assets/javascript/index-7c3ad1fdd9.min.js"></script>
<!-- endinject -->
Since didn't work so much with gulp the temp workaround that I find is to manually remove the style link from /src/_includes/head.html
and script source from /src/_layouts/default.html
between <!-- inject:css/js -->
and <!-- endinject -->
before run gulp
command.
May this be related to #127 ?
Check for modifications in footer.html
and head.html
under src
directory after running gulp --prod
. In my case I spotted the issue because git status
kept signalling changes in both files.
Yes I think is related to #127 . gulp --prod
modify footer.html
and head.html
under src
directory but just gulp
didn't change it back to point to the right files, still points to old files.
I submitted a PR to solve this.
I'll look into both these when I'm on my computer during the weekend :) thanks to both of you
Steps to reproduce error:
gulp
command and make some changes tostyles.scss
gulp --prod
to see how it will look in productiongulp
command without--prod
will not work.Even with
gulp
command it will try to load the minified and concatenated files