2 Revize a5f564fc0c ... 9a25e144bb

Autor SHA1 Zpráva Datum
  Michael Zitzmann 9a25e144bb Initial commit před 5 roky
  Michael Zitzmann a5f564fc0c Initial commit před 5 roky
4 změnil soubory, kde provedl 14 přidání a 9 odebrání
  1. 11 3
      bin/prepareData.js
  2. 2 3
      bin/preprocess.js
  3. 1 1
      build.json
  4. 0 2
      rollup.config.js

+ 11 - 3
bin/prepareData.js

@@ -113,9 +113,17 @@ function transformData() {
         entry.similar.forEach(s => {delete s.distance;});
     });
 
-    fs.writeFileSync(path.join('../', config.path.build, 'data_' + lang + '.json'), JSON.stringify(result, null, '\t'), 'utf8');
+    // Resultat als JSON speichern
+    fs.writeFileSync(
+        path.join(
+            '../',
+            config.path.output,
+            config.path.data,
+            'data_' + lang + '.json'),
+        JSON.stringify(result, null, '\t'),
+        'utf8'
+    );
 }
 
-createDirectory(path.join('../', config.path.build));
-createDirectory(path.join('../', config.path.output));
+createDirectory(path.join('../', config.path.output, config.path.data));
 transformData();

+ 2 - 3
bin/preprocess.js

@@ -53,7 +53,7 @@ function createVisualisationHtml() {
             fs.writeFileSync(
                 path.join(
                     '../',
-                    config.path.build,
+                    config.path.output,
                     config.html.visualisation.name
                 ), result.html
             );
@@ -103,7 +103,7 @@ function createContextHtml() {
                 fs.writeFileSync(
                     path.join(
                         '../',
-                        config.path.build,
+                        config.path.output,
                         config.html.index.name
                     ), result.html
                 );
@@ -115,6 +115,5 @@ function createHtml() {
     createContextHtml();
 }
 
-createDirectory(path.join('../', config.path.build));
 createDirectory(path.join('../', config.path.output));
 createHtml();

+ 1 - 1
build.json

@@ -22,7 +22,7 @@
             "skeleton": "main.html"
         },
         "visualisation": {
-            "name": "jobloss.html",
+            "name": "multi-level-bar-chart-array.html",
             "skeleton": "visualisation.html"
         }
     },

+ 0 - 2
rollup.config.js

@@ -68,8 +68,6 @@ const generateConfiguration = (target, option) => {
                 targets: [
                     { src: path.join(config.path.build, '/*.css'), dest: path.join(config.path.output, config.path.css) },
                     { src: path.join(config.path.build, '/*.js*'), dest: path.join(config.path.output, config.path.js) },
-                    { src: path.join(config.path.build,'/*.json'), dest:  path.join(config.path.output, config.path.data) },
-                    { src: path.join(config.path.build, '/*.html'), dest: config.path.output },
                     { src: path.join(config.path.assets, config.path.js), dest: config.path.output },
                     { src: path.join(config.path.assets, config.path.css), dest: config.path.output },
                     { src: path.join(config.path.assets, config.path.img), dest: config.path.output },