change linter to standard

This commit is contained in:
Unknown
2018-11-12 10:28:59 +00:00
parent 19f3edf55a
commit 04d80c7c2f
19 changed files with 837 additions and 691 deletions

View File

@@ -1,33 +1,32 @@
import path from "path";
import fs from "fs";
import path from 'path'
import fs from 'fs'
export const defaultBlueprint = {
name: null,
id: null,
dialects: ["rest"], // supported dialects, can (eventually) be multiple
dialects: ['rest'], // supported dialects, can (eventually) be multiple
routes: {}
};
}
export const defaultRoute = {
options: {
fragment: true
},
data: []
};
}
// import all default exports from 'blueprinters' folder
const allBps = {};
const REL_PATH_TO_BPS = "../blueprinters";
const normalizedPath = path.join(__dirname, REL_PATH_TO_BPS);
const allBps = {}
const REL_PATH_TO_BPS = '../blueprinters'
const normalizedPath = path.join(__dirname, REL_PATH_TO_BPS)
fs.readdirSync(normalizedPath).forEach(file => {
const bpName = file.replace(".js", "");
allBps[bpName] = require(`${REL_PATH_TO_BPS}/${file}`).default;
});
const bpName = file.replace('.js', '')
allBps[bpName] = require(`${REL_PATH_TO_BPS}/${file}`).default
})
// NB: revert to ES5 'module.exports' required to make blueprinters from
// each file in blueprinters folder available for granular import from here.
module.exports = {
module.exports = Object.assign({
defaultBlueprint,
defaultRoute,
...allBps
}
defaultRoute
}, allBps)