Merge branch 'ethdoc-plugin' of https://github.com/ethereum/remix-project into testethdoc

pull/3542/head
filip mertens 2 years ago
commit 0e81fb87e9
  1. 17
      apps/doc-gen/profile.json
  2. 6
      apps/doc-gen/src/app/docgen-client.ts
  3. 32
      apps/doc-gen/webpack.config.js
  4. 16
      apps/doc-viewer/profile.json
  5. 36
      apps/doc-viewer/webpack.config.js

@ -0,0 +1,17 @@
{
"name": "doc-gen",
"displayName": "Docgen - Documentation Generator",
"description": "Generate Solidity documentation (as md)",
"version": "0.1.0",
"events": [],
"methods": ["generateDocs", "openDocs"],
"kind": "none",
"icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxMDI0IiB3aWR0aD0iMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOTUwLjE1NCAxOTJINzMuODQ2QzMzLjEyNyAxOTIgMCAyMjUuMTI2OTk5OTk5OTk5OTUgMCAyNjUuODQ2djQ5Mi4zMDhDMCA3OTguODc1IDMzLjEyNyA4MzIgNzMuODQ2IDgzMmg4NzYuMzA4YzQwLjcyMSAwIDczLjg0Ni0zMy4xMjUgNzMuODQ2LTczLjg0NlYyNjUuODQ2QzEwMjQgMjI1LjEyNjk5OTk5OTk5OTk1IDk5MC44NzUgMTkyIDk1MC4xNTQgMTkyek01NzYgNzAzLjg3NUw0NDggNzA0VjUxMmwtOTYgMTIzLjA3N0wyNTYgNTEydjE5MkgxMjhWMzIwaDEyOGw5NiAxMjggOTYtMTI4IDEyOC0wLjEyNVY3MDMuODc1ek03NjcuMDkxIDczNS44NzVMNjA4IDUxMmg5NlYzMjBoMTI4djE5Mmg5Nkw3NjcuMDkxIDczNS44NzV6Ii8+PC9zdmc+",
"location": "sidePanel",
"documentation": "",
"repo": "https://github.com/ethereum/remix-project/",
"maintainedBy": "",
"authorContact": "",
"url": "",
"targets":["remix"]
}

@ -18,7 +18,7 @@ export class DocGenClient extends PluginClient {
constructor() {
super()
this.eventEmitter = new EventEmitter()
this.methods = ['generateDocs', 'opendDocs']
this.methods = ['generateDocs', 'openDocs']
createClient(this)
this.onload().then(async () => {
await this.setListeners()
@ -65,10 +65,10 @@ export class DocGenClient extends PluginClient {
this.eventEmitter.emit('docsGenerated', docs)
this.emit('docgen' as any, 'docsGenerated', docs)
this.docs = docs
await this.opendDocs(docs)
await this.openDocs(docs)
}
async opendDocs(docs: string[]) {
async openDocs(docs: string[]) {
await this.call('manager', 'activatePlugin', 'doc-viewer')
await this.call('tabs' as any, 'focus', 'doc-viewer')
await this.call('doc-viewer' as any, 'viewDocs', docs)

@ -11,24 +11,24 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
// add fallback for node modules
config.resolve.fallback = {
...config.resolve.fallback,
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
// ...config.resolve.fallback,
// "crypto": require.resolve("crypto-browserify"),
// "stream": require.resolve("stream-browserify"),
"path": require.resolve("path-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"constants": require.resolve("constants-browserify"),
"os": false, //require.resolve("os-browserify/browser"),
"timers": false, // require.resolve("timers-browserify"),
"zlib": require.resolve("browserify-zlib"),
// "http": require.resolve("stream-http"),
// "https": require.resolve("https-browserify"),
// "constants": require.resolve("constants-browserify"),
// "os": false, //require.resolve("os-browserify/browser"),
// "timers": false, // require.resolve("timers-browserify"),
// "zlib": require.resolve("browserify-zlib"),
"fs": false,
"module": false,
"tls": false,
"net": false,
"readline": false,
"child_process": false,
"buffer": require.resolve("buffer/"),
"vm": require.resolve('vm-browserify'),
// "module": false,
// "tls": false,
// "net": false,
// "readline": false,
// "child_process": false,
// "buffer": require.resolve("buffer/"),
// "vm": require.resolve('vm-browserify'),
}
// add externals

@ -0,0 +1,16 @@
{
"name": "doc-viewer",
"displayName": "Docgen Viewer",
"description": "Visualize Solidity documentation from Docgen Plugin",
"version": "0.1.0",
"events": [],
"methods": ["viewDoc"],
"kind": "none",
"icon": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSIxMDI0IiB3aWR0aD0iMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNOTUwLjE1NCAxOTJINzMuODQ2QzMzLjEyNyAxOTIgMCAyMjUuMTI2OTk5OTk5OTk5OTUgMCAyNjUuODQ2djQ5Mi4zMDhDMCA3OTguODc1IDMzLjEyNyA4MzIgNzMuODQ2IDgzMmg4NzYuMzA4YzQwLjcyMSAwIDczLjg0Ni0zMy4xMjUgNzMuODQ2LTczLjg0NlYyNjUuODQ2QzEwMjQgMjI1LjEyNjk5OTk5OTk5OTk1IDk5MC44NzUgMTkyIDk1MC4xNTQgMTkyek01NzYgNzAzLjg3NUw0NDggNzA0VjUxMmwtOTYgMTIzLjA3N0wyNTYgNTEydjE5MkgxMjhWMzIwaDEyOGw5NiAxMjggOTYtMTI4IDEyOC0wLjEyNVY3MDMuODc1ek03NjcuMDkxIDczNS44NzVMNjA4IDUxMmg5NlYzMjBoMTI4djE5Mmg5Nkw3NjcuMDkxIDczNS44NzV6Ii8+PC9zdmc+",
"location": "mainPanel",
"url": "",
"documentation": "https://remix-plugins.readthedocs.io/en/latest/",
"repo": "https://github.com/Machinalabs/remix-ethdoc-plugin/",
"maintainedBy": "Remix",
"authorContact": "remix@ethereum.org"
}

@ -11,24 +11,24 @@ module.exports = composePlugins(withNx(), withReact(), (config) => {
// add fallback for node modules
config.resolve.fallback = {
...config.resolve.fallback,
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"path": require.resolve("path-browserify"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"constants": require.resolve("constants-browserify"),
"os": false, //require.resolve("os-browserify/browser"),
"timers": false, // require.resolve("timers-browserify"),
"zlib": require.resolve("browserify-zlib"),
"fs": false,
"module": false,
"tls": false,
"net": false,
"readline": false,
"child_process": false,
"buffer": require.resolve("buffer/"),
"vm": require.resolve('vm-browserify'),
// ...config.resolve.fallback,
// "crypto": require.resolve("crypto-browserify"),
// "stream": require.resolve("stream-browserify"),
// "path": require.resolve("path-browserify"),
// "http": require.resolve("stream-http"),
// "https": require.resolve("https-browserify"),
// "constants": require.resolve("constants-browserify"),
// "os": false, //require.resolve("os-browserify/browser"),
// "timers": false, // require.resolve("timers-browserify"),
// "zlib": require.resolve("browserify-zlib"),
// "fs": false,
// "module": false,
// "tls": false,
// "net": false,
// "readline": false,
// "child_process": false,
// "buffer": require.resolve("buffer/"),
// "vm": require.resolve('vm-browserify'),
}
// add externals

Loading…
Cancel
Save