fix(core): update

This commit is contained in:
2020-10-25 14:02:03 +00:00
parent 1875949e99
commit 3485bebc1e
6 changed files with 78 additions and 8 deletions

View File

@ -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;
}
}

View 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"
});
}
}

View File

@ -1,2 +1,6 @@
const removeme = {};
export { removeme };
// third party scope
import * as feed from 'feed';
export {
feed
};