Skip to content

Commit

Permalink
PATCH: Commit vendor files and omit copying
Browse files Browse the repository at this point in the history
  • Loading branch information
ttacon committed Feb 27, 2019
1 parent 55986c3 commit 1168822
Show file tree
Hide file tree
Showing 7 changed files with 824 additions and 16 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,3 @@ package-lock.json
*.DS_Store
.vscode
*.tern-port

# Ignore checking in public assets.
public/vendor/*.js
public/vendor/*.css
public/vendor/img/*.svg
11 changes: 0 additions & 11 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ function run(config, listenOpts = {}) {
app.listen(port, host, () => console.log(`Arena is running on port ${port} at host ${host}`));
}

function copyVendorAssets(filePath, targetFileName) {
targetFileName = targetFileName || path.basename(filePath);
fs.createReadStream(path.join('./node_modules', filePath)).pipe(fs.createWriteStream(path.join(__dirname, './public/vendor', targetFileName)));
}

copyVendorAssets("tablesort/dist/tablesort.min.js");
copyVendorAssets("jsoneditor/dist/jsoneditor.min.js");
copyVendorAssets("jsoneditor/dist/jsoneditor.min.css");
copyVendorAssets("jsoneditor/dist/img/jsoneditor-icons.svg", "img/jsoneditor-icons.svg");
copyVendorAssets("tablesort/tablesort.css");

return app;
}

Expand Down
Loading

0 comments on commit 1168822

Please sign in to comment.