mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:36:18 +08:00
DEV: introduces prettier for es6 files
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
import Store from "discourse/models/store";
|
||||
import RestAdapter from 'discourse/adapters/rest';
|
||||
import KeyValueStore from 'discourse/lib/key-value-store';
|
||||
import TopicTrackingState from 'discourse/models/topic-tracking-state';
|
||||
import { buildResolver } from 'discourse-common/resolver';
|
||||
import RestAdapter from "discourse/adapters/rest";
|
||||
import KeyValueStore from "discourse/lib/key-value-store";
|
||||
import TopicTrackingState from "discourse/models/topic-tracking-state";
|
||||
import { buildResolver } from "discourse-common/resolver";
|
||||
|
||||
export default function() {
|
||||
const resolver = buildResolver('discourse').create();
|
||||
const resolver = buildResolver("discourse").create();
|
||||
|
||||
return Store.create({
|
||||
register: {
|
||||
@ -18,22 +18,25 @@ export default function() {
|
||||
}
|
||||
if (type === "key-value-store:main") {
|
||||
this._kvs = this._kvs || new KeyValueStore();
|
||||
return (this._kvs);
|
||||
return this._kvs;
|
||||
}
|
||||
if (type === "topic-tracking-state:main") {
|
||||
this._tracker = this._tracker || TopicTrackingState.create();
|
||||
return (this._tracker);
|
||||
return this._tracker;
|
||||
}
|
||||
if (type === "site-settings:main") {
|
||||
this._settings = this._settings || Discourse.SiteSettings;
|
||||
return (this._settings);
|
||||
return this._settings;
|
||||
}
|
||||
},
|
||||
|
||||
lookupFactory(type) {
|
||||
const split = type.split(':');
|
||||
return resolver.customResolve({type: split[0], fullNameWithoutType: split[1]});
|
||||
},
|
||||
const split = type.split(":");
|
||||
return resolver.customResolve({
|
||||
type: split[0],
|
||||
fullNameWithoutType: split[1]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user