maven - bowerInstall task alternative for Java? -
maven - bowerInstall task alternative for Java? -
i'm working on springmvc project , i'm organising project construction "client" module. i'm using webjars , wro4j projects great, organise javascript dependencies , concatenate , minimise css/js code.
what miss exists in "javascript" world allows utilize html code depending on environment. i'm talking bowerinstall task. have in jsp code: * includes js files 1 one, when working in "development" profile * single file, concatenation , minification, when working in "production" profile.
next lines html file in yeoman based project:
... <!-- build:css styles/vendor.css --> <!-- bower:css --> <link rel="stylesheet" href="../bower_components/bootstrap/dist/css/bootstrap.css" /> <link rel="stylesheet" href="../bower_components/highlightjs/styles/monokai.css" /> <link rel="stylesheet" href="../bower_components/seiyria-bootstrap-slider/dist/css/bootstrap-slider.css" /> <!-- endbower --> <!-- endbuild --> ...
when grunt task runner executed, if i'm working in dev mode not much if in "prod" mode previous css substituted line like:
<link rel="stylesheet" href="styles/vendor.css" />
is possible in java??
is possible in java?? no.
however, may seek couple of options.
google pagespeed - check filter-css-combine documentation. quick , dirty option, if have old project running on production.
grunt task - search grunt-concat-css. if using bower , yeoman, know grunt. hook on grunt task maven ( search allegro/grunt-maven-plugin) or gradle (search com.moowork.grunt) before war task.
this not comprehensive answer. pointers in right direction.
maven spring-mvc gruntjs
Comments
Post a Comment