fix(core): update

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

19
package-lock.json generated
View File

@ -5171,6 +5171,14 @@
"pend": "~1.2.0"
}
},
"feed": {
"version": "4.2.1",
"resolved": "https://verdaccio.lossless.one/feed/-/feed-4.2.1.tgz",
"integrity": "sha512-l28KKcK1J/u3iq5dRDmmoB2p7dtBfACC2NqJh4dI2kFptxH0asfjmOfcxqh5Sv8suAlVa73gZJ4REY5RrafVvg==",
"requires": {
"xml-js": "^1.6.11"
}
},
"figures": {
"version": "3.2.0",
"resolved": "https://verdaccio.lossless.one/figures/-/figures-3.2.0.tgz",
@ -9430,8 +9438,7 @@
"sax": {
"version": "1.2.4",
"resolved": "https://verdaccio.lossless.one/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
},
"saxes": {
"version": "3.1.11",
@ -10931,6 +10938,14 @@
"async-limiter": "~1.0.0"
}
},
"xml-js": {
"version": "1.6.11",
"resolved": "https://verdaccio.lossless.one/xml-js/-/xml-js-1.6.11.tgz",
"integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==",
"requires": {
"sax": "^1.2.4"
}
},
"xml-name-validator": {
"version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/xml-name-validator/-/xml-name-validator-3.0.0.tgz",

View File

@ -20,7 +20,9 @@
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {},
"dependencies": {
"feed": "^4.2.1"
},
"browserslist": [
"last 1 chrome versions"
],

View File

@ -1,8 +1,11 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartfeed from '../ts/index';
tap.test('first test', async () => {
console.log(smartfeed.standardExport);
let testSmartFeed: smartfeed.Smartfeed;
tap.test('should create a feedVersion', async () => {
testSmartFeed = new smartfeed.Smartfeed();
expect(testSmartFeed).to.be.instanceOf(smartfeed.Smartfeed);
});
tap.start();

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