grunt-usemin

How should I configure grunt-usemin to work with relative path

百般思念 提交于 2019-12-20 08:38:52
问题 I have a grunt project backed by a yeoman-generator that I've built based on the generator-webapp, if it's of any help, you can find it on GitHub The grunt project makes us of the grunt-usemin task. My project involve building a multilingual website, and to keep things clean, I've decided to put all the pages written in a language in a folder name after the 2-letter shortcode of the said language. | project/ |--dist/ |----en/ |------index.html |------404.html |------... |----fr/ |------index

How should I configure grunt-usemin to work with relative path

眉间皱痕 提交于 2019-12-20 08:38:33
问题 I have a grunt project backed by a yeoman-generator that I've built based on the generator-webapp, if it's of any help, you can find it on GitHub The grunt project makes us of the grunt-usemin task. My project involve building a multilingual website, and to keep things clean, I've decided to put all the pages written in a language in a folder name after the 2-letter shortcode of the said language. | project/ |--dist/ |----en/ |------index.html |------404.html |------... |----fr/ |------index

Grunt cssmin rebasing a relative URI?

大城市里の小女人 提交于 2019-12-19 02:39:40
问题 I'm currently setting up grunt-usemin for our project but I'm running in a small issue with the cssmin task. Our project depends on a few external libraries, some which bring a long some extra assets (like images or fonts). The problem is these libraries do not have the same folder structure. This is an example of the different folder structures lib |--lib1 | |--style1.css | +--image1.png +--lib2 |--styles | +--style2.css +--images +--image2.png In the index.html all the stylesheets are

Grunt build not populate scripts.js with bower_components

為{幸葍}努か 提交于 2019-12-10 21:30:04
问题 I have a problem with the command "grunt build" in my angular application scaffolded using angular-generator 0.10.0, the generated scripts/scripts.xxxx.js does not contain all the js I have in "build:js" block in index.html. This is my current block: <!-- build:js({.tmp,app}) scripts/scripts.js --> <script src="bower_components/handlebars/handlebars.js"></script> <script src="bower_components/alpaca/dist/alpaca/bootstrap/alpaca.js"></script> <script src="bower_components/ace-builds/src

uglified files are not rewritten in html file using gulp-usemin

最后都变了- 提交于 2019-12-09 19:56:08
问题 I am facing a problem with gulp-usemin plugin. when usemin task is running it is concating and uglifying css and js files, but the uglified js files are not rewritten in html file though it is generated. I am sharing my gulpfile.js and index.html code . index.html before conversion <html> <head> <!-- build:css build/css --> <link rel="stylesheet" href="css/blue.css"> <link rel="stylesheet" href="css/green.css"> <link rel="stylesheet" href="css/orange.css"> <!-- endbuild --> <!-- build:js

how to use grunt-usemin with font awesome

谁说胖子不能爱 提交于 2019-12-07 06:50:44
问题 I am trying to use grunt-usemin to minify my css. I am using Font Awesome like this within my index.html <link rel="stylesheet" href="components/font-awesome/css/font-awesome.min.css"> When I run usemin, I get all the styles combined. However, when I try to use the minified version, the Font Awesome icons show up as unicode squares (not as the intended icons). Any ideas on how to fix this? I can include more information if needed. 回答1: The problem was that font-awesome.min.css is referencing

How to let grunt usemin update the JS to reference our revved images?

我的梦境 提交于 2019-12-06 07:28:04
问题 How to let grunt usemin update the JS to reference our revved images ? from the yeoman web app generator, it only rewrite links for css and html, but no js. What if my JS file have some images need to be compressed, but cannot link :( Here is my current parts of grunt.js useminPrepare: { options: { dest: '<%= config.dist %>' }, html: ['<%= config.app %>/*.php', '<%= config.app %>/*.html'] }, // Performs rewrites based on rev and the useminPrepare configuration usemin: { options: { assetsDirs:

HTML comments causing an issue exporting CSS files with Grunt-usemin

余生长醉 提交于 2019-12-06 05:29:50
I'm using yeoman/grunt to for my build process and I'm running into an issue. I'm trying to build two .css files, one for IE8 and one for everything else. If I place the IE conditional on the outside of the build block, an error is thrown because of the comment within a comment. If I put the IE conditional on the inside it gets stripped out. <!--[if lte IE 8]> <!-- build:css({.tmp,app}) styles/main-old-ie.css --> <link rel="stylesheet" href="styles/main-old-ie.css"> <!-- endbuild --> <![endif]--> <!--[if gt IE 8]><!--> <!-- build:css({.tmp,app}) styles/main.css --> <link rel="stylesheet" href=

How to let grunt usemin update the JS to reference our revved images?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 14:42:59
How to let grunt usemin update the JS to reference our revved images ? from the yeoman web app generator, it only rewrite links for css and html, but no js. What if my JS file have some images need to be compressed, but cannot link :( Here is my current parts of grunt.js useminPrepare: { options: { dest: '<%= config.dist %>' }, html: ['<%= config.app %>/*.php', '<%= config.app %>/*.html'] }, // Performs rewrites based on rev and the useminPrepare configuration usemin: { options: { assetsDirs: ['<%= config.dist %>', '<%= config.dist %>/images'] }, html: ['<%= config.dist %>/{,*/}*.php','<%=

grunt-bower-install: exclude certain components

我的未来我决定 提交于 2019-12-04 02:15:41
I just created a new webapp using the angular-fullstack yeoman generator. I noticed that grunt-bower-install is generating the JS bower components in my index.html files between the <!-- bower:js --> tags. <!-- bower:js --> <script src="bower_components/jquery/dist/jquery.js"></script> <script src="bower_components/angular/angular.js"></script> <script src="bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/affix.js"></script> <script src="bower_components/bootstrap-sass-official/vendor/assets/javascripts/bootstrap/alert.js"></script> <script src="bower_components