Skip to content

Commit

Permalink
mitigation for NAL-i5K#307, NAL-i5K#312
Browse files Browse the repository at this point in the history
and NAL-i5K#257 the removed file was desired and was done wile testing the clean.js script
  • Loading branch information
VernonChapman-USDA committed Nov 25, 2020
1 parent 0defb98 commit 0f72aaf
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 144 deletions.
125 changes: 0 additions & 125 deletions blast/static/blast/scripts/dragscrollable.js

This file was deleted.

39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"name": "genomics-workspace",
"version": "1.0.0",
"scripts": {
"build": "npm install && webpack-cli && /usr/local/i5k/bin/python3 setup.py"
"build": "npm install && webpack",
"clean": "node util/clean.js"
},
"private": true,
"repository": {
Expand All @@ -16,33 +17,33 @@
},
"homepage": "https://github.com/NAL-i5K/genomics-workspace#readme",
"devDependencies": {
"jshint": "^2.9.6",
"jshint": "^2.12.0",
"prettier": "1.13.0"
},
"dependencies": {
"Respond.js": "https://github.com/scottjehl/Respond/archive/1.4.0.tar.gz",
"backbone": "^1.1.2",
"backbone": "^1.4.0",
"bootstrap": "^3.4.1",
"bootstrap-select": "^1.6.3",
"bootstrap-switch": "^3.0.2",
"bootstrap-select": "^1.13.6",
"bootstrap-switch": "^3.4.0",
"chroma-js": "https://github.com/gka/chroma.js/archive/v0.6.1.tar.gz",
"codemirror": "^4.5.0",
"copy-webpack-plugin": "^4.5.1",
"d3": "^3.5.12",
"codemirror": "^4.13.0",
"copy-webpack-plugin": "^4.6.0",
"d3": "^3.5.17",
"datatables-tabletools": "^2.2.2",
"datatables.net-bs": "^1.10.9",
"datatables.net-colreorder": "^1.5.1",
"datatables.net-colreorder-dt": "^1.5.1",
"datatables.net-dt": "^1.10.16",
"datatables.net-bs": "^1.10.22",
"datatables.net-colreorder": "^1.5.2",
"datatables.net-colreorder-dt": "^1.5.2",
"datatables.net-dt": "^1.10.22",
"disable-output-webpack-plugin": "^1.0.1",
"jquery": "^3.4.0",
"jquery-hoverintent": "^1.9.0",
"jquery-ui-dist": "^1.12.0",
"jquery": "^3.5.1",
"jquery-hoverintent": "^1.10.1",
"jquery-ui-dist": "^1.12.1",
"jquery-ui-themes": "^1.12.0",
"jquery-validation": "^1.14.0",
"jquery-validation": "^1.19.2",
"jquery.dragscrollable": "^1.0.0",
"underscore": "^1.7.0",
"webpack": "^4.20.2",
"webpack-cli": "^3.1.1"
"underscore": "^1.12.0",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
}
}
48 changes: 48 additions & 0 deletions util/clean.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const fs = require('fs');
const path = require('path');

const deleteFolderRecursive = function(path) {
fs.readdirSync(path).forEach(function(file, index){
let curPath = path + "/" + file;
if (fs.lstatSync(curPath).isDirectory()) { // recurse
deleteFolderRecursive(curPath);
} else { // delete file
fs.unlinkSync(curPath);
}
});
fs.rmdirSync(path);
};

const projectRootPath = path.resolve(__dirname, '..');
const gitIgnorePath = path.resolve(projectRootPath, '.gitignore');

let files = fs.readFileSync(gitIgnorePath)
.toString()
.split('\n')
.filter(function(data){
if (
data !== '' &&
!data.startsWith('#') &&
!data.startsWith('*') &&
!data.startsWith('.')
) {
if (
data.startsWith('/app/static') ||
data.startsWith('/blast/static') ||
data.startsWith('/clustal/static') ||
data.startsWith('/hmmer/static')
)
return true;
}
});

for (let f of files) {
f = path.resolve(projectRootPath, '.' + f);
if (fs.existsSync(f)) {
if (fs.lstatSync(f).isDirectory()) {
deleteFolderRecursive(f);
} else {
fs.unlinkSync(f);
}
}
}

0 comments on commit 0f72aaf

Please sign in to comment.