Skip to content

Commit 905afca

Browse files
authored
refactor!: remove filters (#1226)
* chore: remove 3D function testcase * wip: add migration which removes filters and filter configuration options * wip: remove filter-related code and docs * wip: remove filters and their dependencies
1 parent e66637c commit 905afca

117 files changed

Lines changed: 689 additions & 10531 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The view file will contain information about the visualization in a JSON format
1818

1919
The data file contains the data to visualize in a JSON format. The user is responsible to generate that file according to a few guidelines.
2020

21-
The config file is typically common to your projects. It defines which modules are available (built-in or not), which buttons should be displayed in the header, which variable filters and action files should be available to the visualizer.
21+
The config file is typically common to your projects. It defines which modules are available (built-in or not), which buttons should be displayed in the header, which action files should be available to the visualizer.
2222

2323
## Variables and Actions
2424

bower.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"uri.js": "1.18.4",
4545
"web-animations-js": "2.2.2",
4646
"x2js": "1.2.0",
47-
"js-yaml": "^3.7.0",
4847
"canvg": "^1.3.0"
4948
},
5049
"resolutions": {

gruntfile.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,6 @@ module.exports = function (grunt) {
9595
}
9696
});
9797

98-
function mapPath(path) {
99-
// Map a relative application path to a relative build path
100-
var mapped;
101-
if (path.indexOf('usr/') === 0) mapped = usrPath + path.slice(3);
102-
else mapped = `./src/${path}`;
103-
if (!mapped.includes('.js')) mapped += '.js';
104-
return mapped;
105-
}
106-
10798
// Project configuration.
10899
grunt.initConfig({
109100
pkg: grunt.file.readJSON('package.json'),
@@ -234,7 +225,6 @@ module.exports = function (grunt) {
234225
'./flag-icon-css/flags/**',
235226
'./jquery-qrcode/jquery.qrcode.min.js',
236227
'./nmr-simulation/**',
237-
'./js-yaml/dist/**',
238228
'./canvg/dist/**',
239229
'./eventEmitter/*.js',
240230
],
@@ -259,7 +249,6 @@ module.exports = function (grunt) {
259249
'./leaflet/dist/**',
260250
'./@mapbox/leaflet-omnivore/leaflet-omnivore.min.js',
261251
],
262-
'./marked/lib/marked.js',
263252
'./mathjs/lib/browser/**',
264253
'./moment/moment.js',
265254
'./moment-duration-format/lib/moment-duration-format.js',
@@ -309,27 +298,10 @@ module.exports = function (grunt) {
309298

310299
buildUsr: {
311300
files: [
312-
{
313-
expand: true,
314-
cwd: `${usrPath}/filters/`,
315-
src: '**',
316-
filter(filePath) {
317-
var files = grunt.option('filterFiles');
318-
for (let i = 0, l = files.length; i < l; i++) {
319-
if (path.relative(mapPath(files[i]), filePath) === '') {
320-
return true;
321-
}
322-
}
323-
324-
return false;
325-
},
326-
dest: './build/usr/filters/',
327-
},
328-
329301
{
330302
expand: true,
331303
cwd: usrPath,
332-
src: ['**', '!config/**', '!filters/**', '!modules/**'],
304+
src: ['**', '!config/**', '!modules/**'],
333305
dest: './build/usr/',
334306
},
335307
],
@@ -673,13 +645,6 @@ module.exports = function (grunt) {
673645
}
674646
}
675647

676-
/* Find filter files from the config.json and puts them in an option */
677-
const filterFiles = [];
678-
for (const i in cfg.filters) {
679-
filterFiles.push(cfg.filters[i].file);
680-
}
681-
grunt.option('filterFiles', filterFiles);
682-
683648
cfg.modules = modulesFinal;
684649

685650
mkpath.sync('./build/modules/types/');

package-lock.json

Lines changed: 0 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"jsoneditor": "^10.4.2",
9191
"katex": "^0.16.33",
9292
"leaflet": "^1.9.4",
93-
"marked": "^0.3.19",
9493
"mathjs": "^15.1.1",
9594
"mf-parser": "^3.7.0",
9695
"mime-types": "^3.0.2",

src/init.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ require.config({
1616
eventEmitter: 'components/eventEmitter/EventEmitter.min',
1717
'file-saver': 'components/file-saver.js/FileSaver',
1818
forms: 'lib/forms',
19-
highlightjs: 'lib/highlight.js/highlight.pack',
2019
jcampconverter: 'lib/jcampconverter/jcampconverter.7.3.1.min',
2120
jsbarcode: 'node_modules/jsbarcode/dist/JsBarcode.all.min',
2221
jquery: 'node_modules/jquery/dist/jquery',
@@ -26,12 +25,10 @@ require.config({
2625
jsgraph: 'components/jsgraph/dist/jsgraph-es6',
2726
'json-chart': 'browserified/json-chart/json-chart',
2827
jszip: 'components/jszip/dist/jszip.min',
29-
'js-yaml': 'components/js-yaml/dist/js-yaml.min',
3028
katex: 'node_modules/katex/dist/katex.min',
3129
lodash: 'components/lodash/dist/lodash.min',
3230
loglevel: 'components/loglevel/dist/loglevel',
3331
'markdown-js': 'components/markdown-js/lib/markdown',
34-
marked: 'node_modules/marked/lib/marked',
3532
// mathjax: 'components/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML&amp;delayStartupUntil=configured',
3633
mathjs: 'node_modules/mathjs/lib/browser/math',
3734
'mime-types': 'browserified/mime-types/index',
@@ -128,10 +125,6 @@ require.config({
128125
exports: 'Slick',
129126
},
130127
'libs/jsmol/js/JSmolApplet': ['libs/jsmol/JSmol.min.nojq'],
131-
'lib/pixastic/pixastic': {
132-
deps: ['lib/pixastic/pixastic/pixastic.core'],
133-
exports: 'Pixastic',
134-
},
135128
},
136129
map: {
137130
'*': {

src/lib/chemistry/gc-generator.js

Lines changed: 0 additions & 118 deletions
This file was deleted.

src/lib/highlight.js/README.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/lib/highlight.js/highlight.pack.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)