Skip to content

Commit

Permalink
add configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Caio-Bessa committed Nov 16, 2020
1 parent 4e216af commit 67622b9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
5 changes: 5 additions & 0 deletions build/configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ejbServerComponents" : "/Users/caiobessa/sources/streams/HCR/8000/HCR/EJBServer/components",
"webClientComponents" : "/Users/caiobessa/sources/streams/HCR/8000/HCR/webclient/components",
"skipComponents" : ["core","AdvancedEvidenceSharing"]
}
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ let configurations;

async function getConfigurations() {
const configurations = await fs.readJSON(
path.join(".", "configuration.json")
path.join(__dirname, "configuration.json")
);
return configurations;
}




// Nice to have - Add a blacklist of components we don't want.

const CSS_FILES_PATTERN = "/**/*.css";
Expand Down Expand Up @@ -115,16 +118,15 @@ function createZipFile() {
}

function createResultsDirectory() {
console.log("dirfile",__dirname);
const resultsFolder = path.join(__dirname, "results","temp");
if (!fs.pathExistsSync(resultsFolder)) {
fs.pathExistsSync(resultsFolder);
fs.mkdirSync(resultsFolder, { recursive: true });
}

}


function createFiles(){

}

const run = async () => {
configurations = await getConfigurations();
Expand Down
16 changes: 10 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
const path = require('path');
const path = require("path");

module.exports = {
entry: './index.js',
target: 'node',
entry: "./index.js",
target: "node",
output: {
filename: 'index.js',
path: path.resolve(__dirname, 'build'),
filename: "index.js",
path: path.resolve(__dirname, "build"),
},
};
node: {
__dirname: false,
__filename: true,
}
};

0 comments on commit 67622b9

Please sign in to comment.