Skip to content

Commit

Permalink
feat: copy webpack plugin
Browse files Browse the repository at this point in the history
fix: theme version on style.css matching tag
  • Loading branch information
sarahcssiqueira committed Jul 31, 2023
1 parent 389b288 commit 6e1a7e6
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 18 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# Changelog

## [1.0.1] - 2023/07/24
## [1.0.2](https://github.com/sarahcssiqueira/base-wp-theme/releases/tag/v1.0.2) - 2023/07/31

### Added

- CI/CD improvements:
- copy-webpack-plugin, to automatically copy assets from **/assets/src** folder to the **/build** folder.

### Minor Fix

- Theme version on style.css

## [1.0.1](https://github.com/sarahcssiqueira/base-wp-theme/releases/tag/v1.0.1) - 2023/07/24

### Added

- **CI/CD improvements:**
Deploy - Workflow now deploys to an environment target as 'production'
Releases - New workflow to generate the latest release when a new tag is added to the master branch

## [1.0.0] - 2023/07/19
## [1.0.0](https://github.com/sarahcssiqueira/base-wp-theme/releases/tag/v1.0.0) - 2023/07/19

- Initial Release
Empty file added build/img/.gitkeep
Empty file.
92 changes: 78 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@wordpress/stylelint-config": "^21.20.0",
"babel-loader": "^9.1.2",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^11.0.0",
"cross-env": "^7.0.3",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Theme URI: https://sarahjobs.com/wordpress/themes/base-wp-theme
* Description: Skeleton WordPress theme to use as a base to build WordPress themes from scratch..
* Tags: one-column
* Version: 1.0.0
* Version: 1.0.2
* Author: Sarah Siqueira
* Author URI: https://sarahjobs.com/about
* License: GPLv2 or later
Expand Down
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const TerserJsPlugin = require("terser-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");

const JS_DIR = path.resolve(__dirname, "assets/js");
const IMG_DIR = path.resolve(__dirname, "assets/img");
Expand All @@ -28,6 +29,9 @@ const plugins = (argv) => [
new MiniCssExtractPlugin({
filename: "css/[name].css",
}),
new CopyPlugin({
patterns: [{ from: IMG_DIR, to: BUILD_DIR + "/img" }],
}),
];

const rules = [
Expand Down

0 comments on commit 6e1a7e6

Please sign in to comment.