forked from trustification/trustification
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ESM Patternfly generator to Spog UI
Signed-off-by: carlosthe19916 <[email protected]>
- Loading branch information
1 parent
74476f3
commit 0256051
Showing
14 changed files
with
18,924 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GENERATE_SOURCEMAP=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/** | ||
build/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"arrowParens": "always", | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"jsxSingleQuote": false, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Patternfly charts | ||
|
||
This folder contains the code for creating `spog/ui/crates/donut/js/main.js` which allows us to create Patternfly Charts | ||
|
||
## Make changes | ||
|
||
- Install dependencies: | ||
|
||
``` | ||
npm ci | ||
``` | ||
|
||
- Make the changes needed | ||
- Generate the bundle ESM files: | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
> The command `npm run build` should automatically overwrite the file `spog/ui/crates/donut/js/main.js` with the new value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
module.exports = { | ||
webpack: { | ||
configure: (webpackConfig) => { | ||
webpackConfig.output = { | ||
...webpackConfig.output, | ||
filename: 'static/js/main.js', | ||
|
||
library: { | ||
type: 'module', | ||
}, | ||
libraryTarget: 'module', | ||
}; | ||
webpackConfig.experiments = { | ||
outputModule: true, | ||
}; | ||
webpackConfig.optimization = { | ||
...webpackConfig.optimization, | ||
runtimeChunk: false, // For single main.js | ||
splitChunks: { | ||
cacheGroups: { | ||
default: false, | ||
vendors: false, | ||
}, | ||
}, | ||
}; | ||
|
||
// inline all assets into the JS bundle | ||
webpackConfig.module.rules[0].oneOf.unshift({ | ||
test: /\.(png|jpg|jpeg|woff|woff2|eot|ttf|svg)$/, | ||
type: 'asset/inline', | ||
}); | ||
|
||
return webpackConfig; | ||
}, | ||
}, | ||
plugins: [ | ||
{ | ||
plugin: { | ||
overrideWebpackConfig: ({ webpackConfig }) => { | ||
webpackConfig.plugins[5].options.filename = 'static/css/[name].css'; | ||
return webpackConfig; | ||
}, | ||
}, | ||
options: {}, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.