I create a default yeoman project. yeoman server works great.
yeoman build results in files put in the dist folder.
when i push to a folder on a staging server that is not at the root i get 404s. This is to be expected ( i think ), but does anyone know how to modify the grunt file or pass in something to the compiler argument to allow the behavior i want?
Which is to run yeoman build and then be able to push the content of the dist folder to a non root location and not have the website choke on the image paths and js paths etc?
thanks for your time cp
My bug was caused by confusion about yeoman.
I was having problems with the build process and paths and the renaming of images.
So my bad.
I think this is the solution to my issue.
Not the best but what I have learned is that …
If you define an image path in the .scss as “../” Yeoman will not modify the path or image name.
Problem: it still renames all the images and compresses them, so the .css can’t find the correct image.
The unmodified image does not exist in dist / images
So the work around is
1.Keep the ../ in the .scss file.
2.Run yeoman build
3.And then use optiPng on all the images we want to compress. This will result in compressed images that are not renamed.
4.Then drop those images in your images folder on staging.
And the. css will be able to target them.
FYI yeoman uses optiPng. (i think)