mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Refactor all Less to manage import order itself
This commit is contained in:
17
awx/ui/grunt-tasks/concat.js
Normal file
17
awx/ui/grunt-tasks/concat.js
Normal file
@@ -0,0 +1,17 @@
|
||||
module.exports = {
|
||||
css: {
|
||||
src: [
|
||||
'static/assets/custom-theme/jquery-ui-1.10.3.custom.min.css',
|
||||
'static/assets/ansible-bootstrap.min.css',
|
||||
'static/assets/fontcustom/fontcustom.css',
|
||||
'static/lib/components-font-awesome/css/font-awesome.min.css',
|
||||
'static/lib/select2/dist/css/select2.css',
|
||||
'static/lib/codemirror/lib/codemirror.css',
|
||||
'static/lib/codemirror/theme/elegant.css',
|
||||
'static/lib/codemirror/addon/lint/lint.css',
|
||||
'static/lib/nvd3/build/nv.d3.css',
|
||||
'static/lib/ng-toast/dist/ngToast.min.css'
|
||||
],
|
||||
dest: 'static/css/tower.vendor.css'
|
||||
}
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
module.exports = {
|
||||
dev: {
|
||||
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config', 'less:dev'],
|
||||
tasks: ['copy:vendor', 'copy:assets', 'copy:partials', 'copy:views', 'copy:languages', 'copy:config'],
|
||||
},
|
||||
// This concurrent target is intended for development ui builds that do not require raising browser-sync or filesystem polling
|
||||
devNoSync: {
|
||||
|
||||
@@ -14,6 +14,33 @@ var staticFiles = ['angular-tz-extensions/tz/data/*',
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
fonts: {
|
||||
files: [{
|
||||
cwd: 'client/',
|
||||
expand: true,
|
||||
flatten: true,
|
||||
filter: 'isFile',
|
||||
src: [
|
||||
'assets/fontcustom/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.woff',
|
||||
'assets/fontcustom/fontcustom_3dfbafd778b214fc5df2a64fe14fbfb3.ttf'
|
||||
],
|
||||
dest: 'static/css/'
|
||||
}]
|
||||
},
|
||||
icons: {
|
||||
files: [{
|
||||
cwd: 'node_modules/',
|
||||
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'
|
||||
],
|
||||
dest: 'static/fonts/'
|
||||
}]
|
||||
},
|
||||
assets: {
|
||||
files: [{
|
||||
cwd: 'client/',
|
||||
|
||||
22
awx/ui/grunt-tasks/cssmin.js
Normal file
22
awx/ui/grunt-tasks/cssmin.js
Normal file
@@ -0,0 +1,22 @@
|
||||
module.exports = {
|
||||
vendor: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
src: 'static/css/tower.vendor.css',
|
||||
dest: '.',
|
||||
ext: '.vendor.min.css'
|
||||
}
|
||||
]
|
||||
},
|
||||
source: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
src: 'static/css/tower.css',
|
||||
dest: '.',
|
||||
ext: '.min.css'
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
@@ -1,32 +1,27 @@
|
||||
var AutoPrefixer = require('less-plugin-autoprefix');
|
||||
|
||||
var autoPrefixer = new AutoPrefixer({
|
||||
browsers: [ 'last 2 versions' ]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
options: {
|
||||
options : {
|
||||
plugins : [ new (require('less-plugin-autoprefix'))({browsers : [ "last 2 versions" ]}) ]
|
||||
}
|
||||
},
|
||||
dev: {
|
||||
files: [{
|
||||
dest: 'static/tower.min.css',
|
||||
src: [
|
||||
'client/legacy-styles/*.less',
|
||||
'client/src/**/*.less',
|
||||
'client/lib/theme/index.less'
|
||||
]
|
||||
}],
|
||||
files: {
|
||||
'static/css/tower.css': 'client/lib/theme/index.less'
|
||||
},
|
||||
options: {
|
||||
sourceMap: true
|
||||
sourceMap: true,
|
||||
plugins: [ autoPrefixer ]
|
||||
}
|
||||
},
|
||||
prod: {
|
||||
files: {
|
||||
'static/tower.min.css': [
|
||||
'client/legacy-styles/*.less',
|
||||
'client/src/**/*.less',
|
||||
'client/lib/theme/index.less'
|
||||
]
|
||||
'static/css/tower.css': 'client/lib/theme/index.less'
|
||||
},
|
||||
options: {
|
||||
compress: true,
|
||||
sourceMap: false,
|
||||
plugins: [ autoPrefixer ]
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user