Skip to content

Commit 8635c2f

Browse files
Merge pull request #287 from pavinduLakshan/copy_readme
Copy README into SDK build artifact
2 parents dd3a34e + c7ec8e5 commit 8635c2f

File tree

4 files changed

+136
-71
lines changed

4 files changed

+136
-71
lines changed

.changeset/wild-pillows-sort.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@asgardeo/auth-react": patch
3+
---
4+
5+
Copy README into SDK build artifact

lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"@typescript-eslint/eslint-plugin": "^5.47.0",
6464
"@typescript-eslint/parser": "^5.47.0",
6565
"babel-loader": "^9.1.0",
66+
"copy-webpack-plugin": "^13.0.0",
6667
"core-js": "^3.26.1",
6768
"eslint": "^8.30.0",
6869
"eslint-plugin-import": "^2.26.0",

lib/webpack.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
const path = require("path");
2020
const ESLintPlugin = require("eslint-webpack-plugin");
21+
const CopyWebpackPlugin = require("copy-webpack-plugin");
2122

2223
// Name of the UMD bundle.
2324
const LIBRARY_NAME = "AsgardeoAuth";
@@ -86,7 +87,16 @@ module.exports = (env) => {
8687
libraryTarget: "umd",
8788
path: path.resolve(__dirname, "dist")
8889
},
89-
plugins: [ new ESLintPlugin()],
90+
plugins: [
91+
new CopyWebpackPlugin({
92+
patterns: [
93+
{
94+
from: path.resolve(__dirname, "../README.md"), // Source file
95+
to: path.resolve(__dirname, "dist/"), // Destination in build artifact
96+
},
97+
],
98+
}),
99+
new ESLintPlugin()],
90100
resolve: {
91101
extensions: [".tsx", ".ts", ".js"]
92102
}

0 commit comments

Comments
 (0)