-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load plugins from parameters #2514
Conversation
e21c899
to
034f028
Compare
034f028
to
0a876d5
Compare
src/remixAppManager.js
Outdated
localStorage.setItem('workspace', JSON.stringify(actives)) | ||
} | ||
}, | ||
get: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use inline arrow function: get: () => JSON.parse(localStorage.getItem('workspace'))
src/remixAppManager.js
Outdated
this.loaders['queryParams'] = { | ||
set: () => {}, | ||
get: () => { | ||
let plugins = queryParams.get()['plugins'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use const
& destructuration here: const { plugins } = queryParams.get()
src/remixAppManager.js
Outdated
} | ||
|
||
set (plugin, actives) { | ||
this.loaders[this.current].set(plugin, actives) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worthy to have a getter method in the class for that :
get currentLoader() {
return this.loaders[this.current]
}
test-browser/tests/workspace.js
Outdated
@@ -0,0 +1,17 @@ | |||
'use strict' | |||
var init = require('../helpers/init') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use const for new code
@@ -232,3 +231,40 @@ export class RemixAppManager extends PluginEngine { | |||
] | |||
} | |||
} | |||
|
|||
class PluginLoader { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment to explain what this class is about.
6cd8a2d
to
a242047
Compare
This PR: