Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Problems with paths and rev #627

Open
aldo-jr opened this issue Sep 20, 2016 · 0 comments
Open

Problems with paths and rev #627

aldo-jr opened this issue Sep 20, 2016 · 0 comments

Comments

@aldo-jr
Copy link

aldo-jr commented Sep 20, 2016

Using Grunt with plugins: - grunt-contrib-copy - grunt-contrib-clean - grunt-contrib-concat - grunt-contrib-uglify - grunt-contrib-cssmin - grunt-usemin - grunt-contrib-imagemin - grunt -Rev

In my architecture, I have an index.html in the root public an index.html in a folder firstapp within thepublicand otherindex.htmlinside the foldersecondappalso within thepublic`.

My images folder is in the public root public/images my CSS files are in public/css and js files are in public/js/lib.

When I run the Grunt tasks, the index.html that is at the root, which indicates the css files with the simple way css/---.css the js files with the ways js/lib/---.js and a picture with the path images/---.jpg is correctly configured, it creates the file raiz.bundle.min.css inside the css folder, creates the version and insert the HTML page correctly, creates the file raiz.bundle.min.js within the js folder, creates version and insert the HTML page correctly, compresses the image, creates the version and correctly inserted in my HTML page, perfectly as I wanted and how it was configured.

But when I run the Grunt tasks in index.html that is in public/firstapp, which indicates the CSS files with the path ../css/---.css the js files ../ js/lib/---.js and an image of the way ../images/---.jpg, instead of creating the css and js folder with .bundle.min and versioned files within the folder dist set in grunt. It creates out of the folder, the root of teste-versionamento and without versioning, only .bundle.min, and the outcome of index.html, the call to the file is ../css/app.bundle.min.css and ../js/app.bundle.min.js which do not exist. The image he pressed, versioned and includes the HTML correctly.

Also, when I run the Grunt tasks in index.html that is in public/secondapp, which indicates the CSS files with the path /css/---.css the js file /js/lib/---.js and an image of the way, /images/---.jpg, it creates the folder dist properly creates the file app.bundle.min.css but this bundle file is empty, and creates version of this empty file, but the file called index.html continues /css/app.bundle.min.css without versioning, resulting 404 error because these files don't exist. But if html calls the versioned files, it would be blank. The same goes for js and image.

https://github.com/aldo-jr/teste-versionamento

  • This GitHub reposiroty is in portuguese-brazil.
  • Sorry for any english mistakes, i'm brazilian.

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant