Skip to content

Commit

Permalink
chore: auto update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 26, 2024
1 parent 49a48aa commit 6caae83
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 5 deletions.
6 changes: 5 additions & 1 deletion HOW-TO.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ For `liferay-sample-etc-cron` and `liferay-sample-etc-spring-boot` the third typ

Build a custom filter in a frontend data set.

- *liferay-sample-global-css*
- *liferay-sample-global-css-1*

Add a global CSS to a company.

- *liferay-sample-global-css-2*

Add a global CSS to a page.

Expand Down
6 changes: 6 additions & 0 deletions liferay-sample-global-css-1/assets/global.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
body::before {
color: #0054f0;
content: 'Liferay Sample Global CSS 1';
display: block;
margin-left: 2rem;
}
7 changes: 7 additions & 0 deletions liferay-sample-global-css-1/client-extension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
assemble:
- include: static/*.css
liferay-sample-global-css-1:
name: Liferay Sample Global CSS 1
scope: company
type: globalCSS
url: global.*.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"webpack": "5.90.1",
"webpack-cli": "5.1.4"
},
"name": "@liferay/liferay-sample-global-css",
"name": "@liferay/liferay-sample-global-css-1",
"private": true,
"scripts": {
"build": "webpack"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.logo::after {
color: #0054f0;
content: 'Liferay Sample Global CSS';
content: 'Liferay Sample Global CSS 2';
margin-left: 2rem;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
assemble:
- include: static/*.css
liferay-sample-global-css:
name: Liferay Sample Global CSS
liferay-sample-global-css-2:
name: Liferay Sample Global CSS 2
type: globalCSS
url: global.*.css
15 changes: 15 additions & 0 deletions liferay-sample-global-css-2/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"devDependencies": {
"css-loader": "6.10.0",
"mini-css-extract-plugin": "^2.8.0",
"style-loader": "3.3.4",
"webpack": "5.90.1",
"webpack-cli": "5.1.4"
},
"name": "@liferay/liferay-sample-global-css-2",
"private": true,
"scripts": {
"build": "webpack"
},
"version": "0.0.0"
}
41 changes: 41 additions & 0 deletions liferay-sample-global-css-2/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
const webpack = require('webpack');

const DEVELOPMENT = process.env.NODE_ENV === 'development';

module.exports = {
devtool: DEVELOPMENT ? 'source-map' : false,
entry: {
global: './assets/global.css',
},
mode: DEVELOPMENT ? 'development' : 'production',
module: {
rules: [
{
test: /\.css$/i,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
],
},
optimization: {
minimize: !DEVELOPMENT,
},
output: {
clean: true,
path: path.resolve('static'),
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].[contenthash].css',
}),
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
};

0 comments on commit 6caae83

Please sign in to comment.