address comments from @lianahus and @bunsentraat

pull/3542/head
Joseph Izang 2 years ago
parent 74fa09e1f4
commit 55c08d273b
  1. 4
      .gitignore
  2. 5
      apps/doc-gen/src/app/App.tsx
  3. 2
      apps/doc-gen/src/app/docgen-client.ts
  4. 11
      apps/doc-gen/src/app/docgen/templates.ts
  5. 1
      apps/doc-gen/src/index.html
  6. 5
      apps/doc-gen/webpack.config.js
  7. 1
      apps/doc-viewer/src/index.html
  8. 5
      apps/doc-viewer/webpack.config.js
  9. 3
      tsconfig.paths.json

4
.gitignore vendored

@ -57,7 +57,3 @@ testem.log
.DS_Store .DS_Store
.vscode/settings.json .vscode/settings.json
.vscode/launch.json .vscode/launch.json
libs/remix-node/
libs/remix-niks/
apps/remix-react

@ -35,9 +35,8 @@ const App = () => {
<h1>Remix Docgen</h1> <h1>Remix Docgen</h1>
{fileName && <h4>File: {fileName.split('/')[1].split('.')[0].concat('.sol')}</h4>} {fileName && <h4>File: {fileName.split('/')[1].split('.')[0].concat('.sol')}</h4>}
{hasBuild && <button className="btn btn-primary btn-block mt-4 rounded" onClick={() => client.generateDocs()}>Generate doc</button>} {hasBuild && <button className="btn btn-primary btn-block mt-4 rounded" onClick={() => client.generateDocs()}>Generate doc</button>}
</div> </div>
) )
}; }
export default App; export default App

@ -47,7 +47,6 @@ export class DocGenClient extends PluginClient {
} }
this.fileName = fileName this.fileName = fileName
this.eventEmitter.emit('compilationFinished', this.build, fileName) this.eventEmitter.emit('compilationFinished', this.build, fileName)
}) })
} }
@ -78,5 +77,4 @@ export class DocGenClient extends PluginClient {
async generateDocs() { async generateDocs() {
this.docgen([this.build]) this.docgen([this.build])
} }
} }

@ -84,12 +84,7 @@ async function readHelpers(name: string) {
* can't be imported directly. * can't be imported directly.
*/ */
async function readThemes(): Promise<Record<string, Required<Templates>>> { async function readThemes(): Promise<Record<string, Required<Templates>>> {
const themes: Record<string, Required<Templates>> = {}; const themes: Record<string, Required<Templates>> = {}
themes['markdown'] = await readTemplates()
return themes
themes['markdown'] = await readTemplates();
return themes;
} }

@ -4,7 +4,6 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Remix Docgen</title> <title>Remix Docgen</title>
<base href="/" /> <base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />
</head> </head>

@ -40,8 +40,6 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
// add public path // add public path
config.output.publicPath = '/' config.output.publicPath = '/'
// add copy & provide plugin // add copy & provide plugin
config.plugins.push( config.plugins.push(
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
@ -63,7 +61,6 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings
// set minimizer // set minimizer
config.optimization.minimizer = [ config.optimization.minimizer = [
new TerserPlugin({ new TerserPlugin({
@ -82,4 +79,4 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
]; ];
return config; return config;
}); })

@ -4,7 +4,6 @@
<meta charset="utf-8" /> <meta charset="utf-8" />
<title>Doc Viewer</title> <title>Doc Viewer</title>
<base href="/" /> <base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" /> <link rel="icon" type="image/x-icon" href="favicon.ico" />
</head> </head>

@ -40,8 +40,6 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
// add public path // add public path
config.output.publicPath = '/' config.output.publicPath = '/'
// add copy & provide plugin // add copy & provide plugin
config.plugins.push( config.plugins.push(
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
@ -63,7 +61,6 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings config.ignoreWarnings = [/Failed to parse source map/] // ignore source-map-loader warnings
// set minimizer // set minimizer
config.optimization.minimizer = [ config.optimization.minimizer = [
new TerserPlugin({ new TerserPlugin({
@ -82,4 +79,4 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
]; ];
return config; return config;
}); })

@ -148,9 +148,6 @@
"@remix-ui/solidity-uml-gen": [ "@remix-ui/solidity-uml-gen": [
"libs/remix-ui/solidity-uml-gen/src/index.ts" "libs/remix-ui/solidity-uml-gen/src/index.ts"
], ],
"@remix-ui/docgenclient-ui": [
"libs/remix-ui/docgenclient-ui/src/index.ts"
],
"@remix-project/ghaction-helper": [ "@remix-project/ghaction-helper": [
"libs/ghaction-helper/src/index.ts" "libs/ghaction-helper/src/index.ts"
], ],

Loading…
Cancel
Save