fix(core): update
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
import { Feed, IFeedOptions } from './smartfeed.classes.feed';
|
||||
import * as plugins from './smartfeed.plugins';
|
||||
|
||||
export let standardExport = 'Hi there! :) This is an exported string';
|
||||
export class Smartfeed {
|
||||
public createFeed(optionsArg: IFeedOptions) {
|
||||
const feedVersion = new Feed(optionsArg);
|
||||
return feedVersion;
|
||||
}
|
||||
}
|
40
ts/smartfeed.classes.feed.ts
Normal file
40
ts/smartfeed.classes.feed.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import * as plugins from './smartfeed.plugins';
|
||||
|
||||
export interface IFeedOptions {
|
||||
domain: string;
|
||||
title: string;
|
||||
description: string;
|
||||
company: string;
|
||||
companyEmail: string;
|
||||
companyDomain: string;
|
||||
}
|
||||
|
||||
export interface IFeedItem {}
|
||||
|
||||
export class Feed {
|
||||
options: IFeedOptions;
|
||||
items: IFeedOptions[];
|
||||
constructor(optionsArg: IFeedOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
|
||||
public addItem() {
|
||||
|
||||
}
|
||||
|
||||
public exportRssFeed() {
|
||||
const feed = new plugins.feed.Feed({
|
||||
copyright: `All rights reserved, ${this.options.company}`,
|
||||
id: this.options.domain,
|
||||
title: this.options.title,
|
||||
author: {
|
||||
name: this.options.company,
|
||||
email: this.options.companyEmail,
|
||||
link: this.options.companyEmail
|
||||
},
|
||||
description: this.options.description,
|
||||
generator: '@pushrocks/smartfeed',
|
||||
language: "en"
|
||||
});
|
||||
}
|
||||
}
|
@ -1,2 +1,6 @@
|
||||
const removeme = {};
|
||||
export { removeme };
|
||||
// third party scope
|
||||
import * as feed from 'feed';
|
||||
|
||||
export {
|
||||
feed
|
||||
};
|
||||
|
Reference in New Issue
Block a user