adding the non-webpack entry points to docs

This commit is contained in:
Ken
2019-02-20 12:25:38 -08:00
parent 9bce24d819
commit dce954c894
29 changed files with 770 additions and 59 deletions

View File

@@ -7,6 +7,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
const outPath = path.resolve(__dirname, 'docs');
const entries = {};
const nonWebpackedEntries = [];
function* getEntryPoint(step) {
if (step.includes('step') || step.includes('playground')) {
@@ -24,11 +25,18 @@ function* getEntryPoint(step) {
}
fs.readdirSync('./').filter(step => {
let isEntryPoint = false;
for (let entryPoint of getEntryPoint(step)) {
if (entryPoint) {
entries[entryPoint.replace(/\/src\/index.*/, '').replace(/^\.\//, '')] = entryPoint;
isEntryPoint = true;
}
}
if (!isEntryPoint && step.includes('step')) {
nonWebpackedEntries.push(step);
}
});
module.exports = function() {
@@ -75,7 +83,8 @@ module.exports = function() {
{
from: 'index.html',
to: outPath
}
},
...nonWebpackedEntries.map(entry => ({ from: `${entry}/**/*`, to: outPath }))
]),
new ForkTsCheckerWebpackPlugin({
silent: true,