mirror of
https://gitlab.silvrtree.co.uk/martind2000/ft.git
synced 2025-03-13 03:50:01 +00:00
27 lines
913 B
JavaScript
27 lines
913 B
JavaScript
// linting configuration in is .eslintrc.json file in project root folder
|
|
|
|
import gulp from 'gulp';
|
|
//import project from '../aurelia.json';
|
|
import download from 'gulp-download';
|
|
import rename from 'gulp-rename';
|
|
import jsonFormat from 'gulp-json-format';
|
|
|
|
export default function getStubData() {
|
|
//let pageUrl = 'https://www.franklintempleton.com/en-us-retail/advisor/';
|
|
let pageUrl = 'http://rcovlnx0191:6205/en-us-retail/advisor/';
|
|
let fundId = '817';
|
|
let beans = [
|
|
'us.historical-cumulative-total-returns-labels',
|
|
'us.historical-after-tax-average-annual-total-returns-labels'
|
|
];
|
|
|
|
beans.forEach(bean => {
|
|
let url = fundId ? `${pageUrl}?FundID=${fundId}&bid=${bean}` : `${pageUrl}?bid=${bean}`;
|
|
let path = fundId ? `test/data/${fundId}` : 'test/data';
|
|
download(url)
|
|
.pipe(jsonFormat(2))
|
|
.pipe(rename(`${bean}.json`))
|
|
.pipe(gulp.dest(path));
|
|
});
|
|
}
|