Add/implement Webpack plugin to minify CSS files on-compile (#11564)

This commit is contained in:
Ryan Hamilton 2020-10-16 03:59:09 -04:00 коммит произвёл GitHub
Родитель 7ab62100af
Коммит 8372ab1375
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
23 изменённых файлов: 838 добавлений и 29 удалений

Просмотреть файл

@ -63,7 +63,7 @@ repos:
exclude: ^\.github/.*$
args:
- --comment-style
- "/**| *| */"
- "/*!| *| */"
- --license-filepath
- license-templates/LICENSE.txt
- --fuzzy-match-generates-todo

Просмотреть файл

@ -50,6 +50,7 @@
"lodash": "^4.17.20",
"mini-css-extract-plugin": "0.9.0",
"moment-locales-webpack-plugin": "^1.2.0",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"style-loader": "^1.2.1",
"stylelint": "^13.6.1",
"stylelint-config-standard": "^20.0.0",

2
airflow/www/static/css/bootstrap-theme.css поставляемый
Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
const webpack = require('webpack');
const path = require('path');
const ManifestPlugin = require('webpack-manifest-plugin');
@ -23,6 +24,7 @@ const cwplg = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
// Input Directory (airflow/www)
// noinspection JSUnresolvedVariable
@ -188,6 +190,9 @@ const config = {
],
}),
],
optimization: {
minimizer: [new OptimizeCSSAssetsPlugin({})],
},
};
module.exports = config;

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

2
docs/static/exampleinclude.css поставляемый
Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information

2
docs/static/jira-links.js поставляемый
Просмотреть файл

@ -1,4 +1,4 @@
/**
/*!
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information