Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHEMH-264] | @jdwjdwjdw | Update webpack #87

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# [ChEM-H Subtheme](https://github.com/SU-SWS/chem_h_subtheme)
##### Version: 1.0.1
##### Version: 1.0.2

Changelog: [Changelog.txt](CHANGELOG.txt)

Expand Down
2 changes: 1 addition & 1 deletion chem_h_subtheme.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ChEM-H Subtheme
type: theme
description: 'ChEM-H Subtheme.'
package: Stanford
version: 1.0.1
version: 1.0.2
core_version_requirement: ^9 || ^10
base theme: stanford_basic
libraries:
Expand Down
2 changes: 0 additions & 2 deletions chem_h_subtheme.libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,3 @@ allpages:
css:
theme:
dist/css/chem_h_subtheme.css: {minified: true }
js:
src/js/chemhsubtheme.behaviors.js: { scope: footer }
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "chem_h_subtheme",
"version": "1.0.1",
"repository": "https://github.com/SU-SWS/chem_h_subtheme",
"version": "1.0.2",
"description": "Changelog: [CHANGELOG.md](CHANGELOG.md)",
"main": "webpack.config.js",
"scripts": {
Expand All @@ -17,7 +16,7 @@
"autoprefixer": "^10.4.16",
"babel-loader": "^9.1.2",
"css-loader": "^6.8.1",
"decanter": "^6.2.14",
"decanter": "^6.3.3",
"drupal-behaviors-loader": "^1.0.1",
"element-closest-polyfill": "^1.0.6",
"element-matches-polyfill": "^1.0.0",
Expand All @@ -35,4 +34,4 @@
"webpack-cli": "^5.1.1",
"webpack-fix-style-only-entries": "^0.6.1"
}
}
}
21 changes: 0 additions & 21 deletions src/js/chemhsubtheme.behaviors.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/js/scripts.js

This file was deleted.

19 changes: 9 additions & 10 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const Webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const FixStyleOnlyEntriesPlugin = require("webpack-fix-style-only-entries");
const autoprefixer = require('autoprefixer')({ grid: true });
const FileManagerPlugin = require('filemanager-webpack-plugin');
const autoprefixer = require('autoprefixer')({ grid: true });

const config = {
isProd: process.env.NODE_ENV === "production",
Expand All @@ -16,7 +16,7 @@ const config = {

var webpackConfig = {
entry: {
'chem_h_subtheme': path.resolve('src/scss/config/index.scss')
"chem_h_subtheme": "./src/scss/config/index.scss",
},
output: {
path: config.distFolder,
Expand Down Expand Up @@ -44,14 +44,6 @@ var webpackConfig = {
}
},
},
{
// test: /\.js$/,
exclude: /node_modules/,
options: {
enableHmr: false
},
loader: 'drupal-behaviors-loader'
},
{
test: /\.(sa|sc|c)ss$/,
use: [
Expand All @@ -72,6 +64,13 @@ var webpackConfig = {
{
test: /\.(png|jpg|gif|svg)$/i,
type: "asset"
},
{
test: /\.(woff|woff2|eot|ttf)$/i,
type: "asset",
generator: {
filename: '../assets/fonts/[name][ext][query]'
}
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2265,7 +2265,7 @@ decamelize@^1.1.0, decamelize@^1.2.0:
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==

decanter@^6.2.14:
decanter@^6.3.3:
version "6.3.3"
resolved "https://registry.yarnpkg.com/decanter/-/decanter-6.3.3.tgz#86a872b842642df2ebbe0eba5ec326eebaa46530"
integrity sha512-EubzQRguF79EDr4BHi4vQH6jSR3t1fIJNsjKv/cKDGmglF5JZpBmbraypdXDt3xkF64okCZcLViae2dN5Scl6w==
Expand Down
Loading