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 Mar 7, 2024
1 parent 7855d30 commit e6dafcd
Show file tree
Hide file tree
Showing 10 changed files with 106 additions and 7 deletions.
2 changes: 1 addition & 1 deletion liferay-sample-commerce-checkout-step/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"serve": "^14.2.0"
},
"description": "Liferay Sample Commerce Checkout Step",
"name": "liferay-sample-commerce-checkout-step",
"name": "@liferay/liferay-sample-commerce-checkout-step",
"type": "module",
"version": "1.0.0",
"workspaces": [
Expand Down
3 changes: 2 additions & 1 deletion liferay-sample-custom-element-vanilla-js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const DEVELOPMENT = process.env.NODE_ENV === 'development';
module.exports = {
devtool: DEVELOPMENT ? 'source-map' : false,
entry: {
'index.js': './assets/index.js',
index: './assets/index.js',
},
mode: DEVELOPMENT ? 'development' : 'production',
module: {
Expand All @@ -26,6 +26,7 @@ module.exports = {
minimize: !DEVELOPMENT,
},
output: {
clean: true,
filename: '[name].[contenthash].js',
path: path.resolve('build', 'static'),
},
Expand Down
1 change: 1 addition & 0 deletions liferay-sample-fds-cell-renderer/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
minimize: !DEVELOPMENT,
},
output: {
clean: true,
environment: {
dynamicImport: true,
module: true,
Expand Down
1 change: 1 addition & 0 deletions liferay-sample-fds-filter/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
minimize: !DEVELOPMENT,
},
output: {
clean: true,
environment: {
dynamicImport: true,
module: true,
Expand Down
5 changes: 2 additions & 3 deletions liferay-sample-global-css/client-extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
assemble:
- from: assets
into: static
- include: static/*.css
liferay-sample-global-css:
name: Liferay Sample Global CSS
type: globalCSS
url: global.css
url: global.*.css
15 changes: 15 additions & 0 deletions liferay-sample-global-css/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",
"private": true,
"scripts": {
"build": "webpack"
},
"version": "0.1.0"
}
41 changes: 41 additions & 0 deletions liferay-sample-global-css/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,
}),
],
};
4 changes: 2 additions & 2 deletions liferay-sample-global-js/client-extension.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
assemble:
- from: assets
- from: build/static
into: static
liferay-sample-global-js:
name: Liferay Sample Global JS
type: globalJS
url: global.js
url: global.*.js
12 changes: 12 additions & 0 deletions liferay-sample-global-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"devDependencies": {
"webpack": "5.90.1",
"webpack-cli": "5.1.4"
},
"name": "@liferay/liferay-sample-global-js",
"private": true,
"scripts": {
"build": "webpack"
},
"version": "0.1.0"
}
29 changes: 29 additions & 0 deletions liferay-sample-global-js/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* 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 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.js',
},
mode: DEVELOPMENT ? 'development' : 'production',
optimization: {
minimize: !DEVELOPMENT,
},
output: {
filename: '[name].[contenthash].js',
path: path.resolve('build', 'static'),
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
],
};

0 comments on commit e6dafcd

Please sign in to comment.