Use js-beautify instead of pretty
This commit is contained in:
parent
cd83b7b6c1
commit
5fc325d2e1
@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable array-callback-return */
|
/* eslint-disable array-callback-return */
|
||||||
// Modules
|
// Modules
|
||||||
const pretty = require('pretty');
|
import { html as beautify } from 'js-beautify';
|
||||||
|
|
||||||
const csv = require('csvtojson');
|
const csv = require('csvtojson');
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
@ -90,7 +91,7 @@ function generateTableBody(table, data) {
|
|||||||
function displayMarkup() {
|
function displayMarkup() {
|
||||||
const tableCode = document.querySelector('table').outerHTML;
|
const tableCode = document.querySelector('table').outerHTML;
|
||||||
const markup = document.getElementById('markup');
|
const markup = document.getElementById('markup');
|
||||||
markup.innerText = pretty(tableCode);
|
markup.innerText = beautify(tableCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeTable(csvString) {
|
function makeTable(csvString) {
|
||||||
|
@ -31,6 +31,6 @@
|
|||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script src="bundle.js" defer></script>
|
<script src="./bom2table.js" defer></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user