1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Update asset paths and task execution

This commit is contained in:
gconsidine 2017-07-21 16:01:14 -04:00
parent 86fb6116a0
commit f2e132f3fe
11 changed files with 119 additions and 73 deletions

View File

@ -30,12 +30,8 @@ module.exports = function(grunt) {
'clean:tmp',
'clean:static',
'concurrent:dev',
'copy:icons',
'copy:fonts',
'concat:css',
'cssmin:vendor',
'less:dev',
'cssmin:source',
'webpack:dev',
'sync'
]);
@ -43,12 +39,16 @@ module.exports = function(grunt) {
'clean:tmp',
'clean:static',
'concurrent:devNoSync',
'concat:css'
]);
grunt.registerTask('release', [
'clean:tmp',
'clean:static',
'webpack:prod',
'concurrent:prod',
'webpack:prod',
'concat:css',
'cssmin:vendor',
'cssmin:source'
]);
};

View File

@ -608,7 +608,7 @@ button.ui-button::-moz-focus-inner {
height: 100%;
}
.ui-progressbar .ui-progressbar-overlay {
background: url("images/animated-overlay.gif");
background: url("/static/images/animated-overlay.gif");
height: 100%;
filter: alpha(opacity=25);
opacity: 0.25;
@ -806,7 +806,7 @@ body .ui-tooltip {
}
.ui-widget-content {
border: 1px solid #a6c9e2;
background: #fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;
background: #fcfdfd url(/static/images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;
color: #36454F;
font-weight: normal;
}
@ -815,7 +815,7 @@ body .ui-tooltip {
}
.ui-widget-header {
border: 1px solid #a6c9e2;
background: #ffffff url(images/ui-bg_flat_50_ffffff_40x100.png) 50% 50% repeat-x;
background: #ffffff url(/static/images/ui-bg_flat_50_ffffff_40x100.png) 50% 50% repeat-x;
color: #36454F;
font-weight: bold;
}
@ -829,7 +829,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #a6c9e2;
background: #ffffff url(images/ui-bg_flat_100_ffffff_40x100.png) 50% 50% repeat-x;
background: #ffffff url(/static/images/ui-bg_flat_100_ffffff_40x100.png) 50% 50% repeat-x;
font-weight: bold;
color: #0088cc;
}
@ -846,7 +846,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #e3e3e3;
background: #e5e3e3 url(images/ui-bg_flat_75_e5e3e3_40x100.png) 50% 50% repeat-x;
background: #e5e3e3 url(/static/images/ui-bg_flat_75_e5e3e3_40x100.png) 50% 50% repeat-x;
font-weight: bold;
color: #005580;
}
@ -861,7 +861,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #e3e3e3;
background: #f5f5f5 url(images/ui-bg_inset-hard_100_f5f5f5_1x100.png) 50% 50% repeat-x;
background: #f5f5f5 url(/static/images/ui-bg_inset-hard_100_f5f5f5_1x100.png) 50% 50% repeat-x;
font-weight: bold;
color: #36454F;
}
@ -878,7 +878,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fad42e;
background: #fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;
background: #fbec88 url(/static/images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;
color: #363636;
}
.ui-state-highlight a,
@ -890,7 +890,7 @@ body .ui-tooltip {
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
background: #fef1ec url(/static/images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;
color: #cd0a0a;
}
.ui-state-error a,
@ -936,27 +936,27 @@ body .ui-tooltip {
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url(images/ui-icons_469bdd_256x240.png);
background-image: url(/static/images/ui-icons_469bdd_256x240.png);
}
.ui-widget-header .ui-icon {
background-image: url(images/ui-icons_36454F_256x240.png);
background-image: url(/static/images/ui-icons_36454F_256x240.png);
}
.ui-state-default .ui-icon {
background-image: url(images/ui-icons_0088cc_256x240.png);
background-image: url(/static/images/ui-icons_0088cc_256x240.png);
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url(images/ui-icons_217bc0_256x240.png);
background-image: url(/static/images/ui-icons_217bc0_256x240.png);
}
.ui-state-active .ui-icon {
background-image: url(images/ui-icons_36454F_256x240.png);
background-image: url(/static/images/ui-icons_36454F_256x240.png);
}
.ui-state-highlight .ui-icon {
background-image: url(images/ui-icons_2e83ff_256x240.png);
background-image: url(/static/images/ui-icons_2e83ff_256x240.png);
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url(images/ui-icons_cd0a0a_256x240.png);
background-image: url(/static/images/ui-icons_cd0a0a_256x240.png);
}
/* positioning */
@ -1169,14 +1169,14 @@ body .ui-tooltip {
/* Overlays */
.ui-widget-overlay {
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
background: #aaaaaa url(/static/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
opacity: .3;
filter: Alpha(Opacity=30);
}
.ui-widget-shadow {
margin: -8px 0 0 -8px;
padding: 8px;
background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
background: #aaaaaa url(/static/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;
opacity: .3;
filter: Alpha(Opacity=30);
border-radius: 8px;

View File

@ -111,7 +111,7 @@ input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;pa
.ui-menu .ui-menu-icon{position:static;float:right;}
.ui-progressbar{height:2em;text-align:left;overflow:hidden;}
.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%;}
.ui-progressbar .ui-progressbar-overlay{background:url("images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25;}
.ui-progressbar .ui-progressbar-overlay{background:url("/static/images/animated-overlay.gif");height:100%;filter:alpha(opacity=25);opacity:0.25;}
.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none;}
.ui-slider{position:relative;text-align:left;}
.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;}
@ -148,19 +148,19 @@ body .ui-tooltip{border-width:2px;}
.ui-widget{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;}
.ui-widget .ui-widget{font-size:1em;}
.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{}
.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#36454F;font-weight:normal;}
.ui-widget-content{border:1px solid #a6c9e2;background:#fcfdfd url(/static/images/ui-bg_inset-hard_100_fcfdfd_1x100.png) 50% bottom repeat-x;color:#36454F;font-weight:normal;}
.ui-widget-content a{color:#0088cc;}
.ui-widget-header{border:1px solid #a6c9e2;background:#ffffff url(images/ui-bg_flat_50_ffffff_40x100.png) 50% 50% repeat-x;color:#36454F;font-weight:bold;}
.ui-widget-header{border:1px solid #a6c9e2;background:#ffffff url(/static/images/ui-bg_flat_50_ffffff_40x100.png) 50% 50% repeat-x;color:#36454F;font-weight:bold;}
.ui-widget-header a{color:#36454F;}
.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #a6c9e2;background:#ffffff url(images/ui-bg_flat_100_ffffff_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#0088cc;}
.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #a6c9e2;background:#ffffff url(/static/images/ui-bg_flat_100_ffffff_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#0088cc;}
.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#0088cc;text-decoration:none;}
.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #e3e3e3;background:#e5e3e3 url(images/ui-bg_flat_75_e5e3e3_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#005580;}
.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #e3e3e3;background:#e5e3e3 url(/static/images/ui-bg_flat_75_e5e3e3_40x100.png) 50% 50% repeat-x;font-weight:bold;color:#005580;}
.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited{color:#005580;text-decoration:none;}
.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #e3e3e3;background:#f5f5f5 url(images/ui-bg_inset-hard_100_f5f5f5_1x100.png) 50% 50% repeat-x;font-weight:bold;color:#36454F;}
.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #e3e3e3;background:#f5f5f5 url(/static/images/ui-bg_inset-hard_100_f5f5f5_1x100.png) 50% 50% repeat-x;font-weight:bold;color:#36454F;}
.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#36454F;text-decoration:none;}
.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fad42e;background:#fbec88 url(images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;color:#363636;}
.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fad42e;background:#fbec88 url(/static/images/ui-bg_flat_55_fbec88_40x100.png) 50% 50% repeat-x;color:#363636;}
.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636;}
.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a;}
.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(/static/images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a;}
.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a;}
.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a;}
.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:normal;}
@ -168,13 +168,13 @@ body .ui-tooltip{border-width:2px;}
.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:alpha(opacity=35);background-image:none;}
.ui-state-disabled .ui-icon{filter:alpha(opacity=35);}
.ui-icon{width:16px;height:16px;}
.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_469bdd_256x240.png);}
.ui-widget-header .ui-icon{background-image:url(images/ui-icons_36454F_256x240.png);}
.ui-state-default .ui-icon{background-image:url(images/ui-icons_0088cc_256x240.png);}
.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_217bc0_256x240.png);}
.ui-state-active .ui-icon{background-image:url(images/ui-icons_36454F_256x240.png);}
.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png);}
.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png);}
.ui-icon,.ui-widget-content .ui-icon{background-image:url(/static/images/ui-icons_469bdd_256x240.png);}
.ui-widget-header .ui-icon{background-image:url(/static/images/ui-icons_36454F_256x240.png);}
.ui-state-default .ui-icon{background-image:url(/static/images/ui-icons_0088cc_256x240.png);}
.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(/static/images/ui-icons_217bc0_256x240.png);}
.ui-state-active .ui-icon{background-image:url(/static/images/ui-icons_36454F_256x240.png);}
.ui-state-highlight .ui-icon{background-image:url(/static/images/ui-icons_2e83ff_256x240.png);}
.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(/static/images/ui-icons_cd0a0a_256x240.png);}
.ui-icon-blank{background-position:16px 16px;}
.ui-icon-carat-1-n{background-position:0 0;}
.ui-icon-carat-1-ne{background-position:-16px 0;}
@ -354,5 +354,5 @@ body .ui-tooltip{border-width:2px;}
.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:5px;}
.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:5px;}
.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:5px;}
.ui-widget-overlay{background:#aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30);}
.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30);border-radius:8px;}
.ui-widget-overlay{background:#aaaaaa url(/static/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30);}
.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaaaaa url(/static/images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:alpha(opacity=30);border-radius:8px;}

View File

@ -4,11 +4,11 @@
@font-face {
font-family: "fontcustom";
src: url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.eot");
src: url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.eot?#iefix") format("embedded-opentype"),
url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.woff") format("woff"),
url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.ttf") format("truetype"),
url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.svg#fontcustom") format("svg");
src: url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.eot");
src: url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.eot?#iefix") format("embedded-opentype"),
url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.woff") format("woff"),
url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.ttf") format("truetype"),
url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.svg#fontcustom") format("svg");
font-weight: normal;
font-style: normal;
}
@ -16,7 +16,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "fontcustom";
src: url("./fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.svg#fontcustom") format("svg");
src: url("/static/fonts/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.svg#fontcustom") format("svg");
}
}

View File

@ -12,6 +12,6 @@ module.exports = {
'static/lib/nvd3/build/nv.d3.css',
'static/lib/ng-toast/dist/ngToast.min.css'
],
dest: 'static/css/tower.vendor.css'
dest: 'static/css/app.vendor.css'
}
};

View File

@ -1,18 +1,61 @@
module.exports = {
dev: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config'],
tasks: [
'copy:vendor',
'copy:assets',
'copy:icons',
'copy:fonts',
'copy:images',
'copy:partials',
'copy:views',
'copy:languages',
'copy:config',
'less:dev'
]
},
// This concurrent target is intended for development ui builds that do not require raising browser-sync or filesystem polling
devNoSync: {
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config', 'less:dev', 'webpack:dev'],
tasks: [
'copy:vendor',
'copy:assets',
'copy:icons',
'copy:fonts',
'copy:images',
'copy:partials',
'copy:views',
'copy:languages',
'copy:config',
'less:dev',
'webpack:dev'
]
},
prod: {
tasks: ['newer:copy:vendor', 'newer:copy:assets', 'newer:copy:partials', 'newer:copy:views', 'newer:copy:languages', 'newer:copy:config', 'newer:less:prod']
tasks: [
'newer:copy:vendor',
'newer:copy:assets',
'newer:copy:icons',
'newer:copy:fonts',
'newer:copy:images',
'newer:copy:partials',
'newer:copy:views',
'newer:copy:languages',
'newer:copy:config',
'newer:less:prod'
]
},
watch: {
tasks: ['watch:css', 'watch:partials', 'watch:views', 'watch:assets', ['webpack:dev', 'watch:config']],
tasks: [
'watch:css',
'watch:partials',
'watch:views',
'watch:assets',
[
'watch:config'
]
],
options: {
logConcurrentOutput: true
}
}
};

View File

@ -20,11 +20,8 @@ module.exports = {
expand: true,
flatten: true,
filter: 'isFile',
src: [
'assets/fontcustom/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.woff',
'assets/fontcustom/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.ttf'
],
dest: 'static/css/'
src: 'assets/fontcustom/**/*',
dest: 'static/fonts/'
}]
},
icons: {
@ -33,14 +30,20 @@ module.exports = {
expand: true,
flatten: true,
filter: 'isFile',
src: [
'components-font-awesome/fonts/fontawesome-webfont.ttf',
'components-font-awesome/fonts/fontawesome-webfont.woff',
'components-font-awesome/fonts/fontawesome-webfont.woff2'
],
src: 'components-font-awesome/fonts/*',
dest: 'static/fonts/'
}]
},
images: {
files: [{
cwd: 'client/',
expand: true,
flatten: true,
filter: 'isFile',
src: 'assets/images/images.new/*',
dest: 'static/images/'
}]
},
assets: {
files: [{
cwd: 'client/',

View File

@ -3,9 +3,9 @@ module.exports = {
files: [
{
expand: true,
src: 'static/css/tower.vendor.css',
src: 'static/css/app.vendor.css',
dest: '.',
ext: '.vendor.min.css'
ext: '.vendor.css'
}
]
},
@ -13,9 +13,9 @@ module.exports = {
files: [
{
expand: true,
src: 'static/css/tower.css',
src: 'static/css/app.css',
dest: '.',
ext: '.min.css'
ext: '.css'
}
]
}

View File

@ -7,7 +7,7 @@ var autoPrefixer = new AutoPrefixer({
module.exports = {
dev: {
files: {
'static/css/tower.css': 'client/lib/theme/index.less'
'static/css/app.css': 'client/lib/theme/index.less'
},
options: {
sourceMap: true,
@ -16,7 +16,7 @@ module.exports = {
},
prod: {
files: {
'static/css/tower.css': 'client/lib/theme/index.less'
'static/css/app.css': 'client/lib/theme/index.less'
},
options: {
compress: true,

View File

@ -7,14 +7,14 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title ng-bind="tabTitle"></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/tower.vendor.min.css?v={{version}}" type="text/css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/tower.min.css?v={{version}}" type="text/css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/app.vendor.css?v={{version}}" type="text/css">
<link rel="stylesheet" href="{{ STATIC_URL }}css/app.css?v={{version}}" type="text/css">
<link rel="shortcut icon" href="{{ STATIC_URL }}assets/favicon.ico?v={{version}}" />
<script>
var $basePath = "{{ STATIC_URL }}";
</script>
<script src="{{ STATIC_URL }}tower.vendor.js?v={{version}}"></script>
<script src="{{ STATIC_URL }}tower.js?v={{version}}"></script>
<script src="{{ STATIC_URL }}app.vendor.js?v={{version}}"></script>
<script src="{{ STATIC_URL }}app.js?v={{version}}"></script>
</head>
<body data-user-agent="{{userAgent}}">

View File

@ -52,7 +52,7 @@ var baseConfig = function() {
},
output: {
path: './static/',
filename: 'tower.js'
filename: 'app.js'
},
plugins: [
// vendor shims:
@ -66,7 +66,7 @@ var baseConfig = function() {
'jsyaml': 'js-yaml',
'jsonlint': 'codemirror.jsonlint'
}),
new webpack.optimize.CommonsChunkPlugin('vendor', 'tower.vendor.js')
new webpack.optimize.CommonsChunkPlugin('vendor', 'app.vendor.js')
],
module: {
loaders: [