Skip to content

Commit

Permalink
Use ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 8, 2021
1 parent cebcb7a commit 44bc9c1
Show file tree
Hide file tree
Showing 8 changed files with 1,480 additions and 1,468 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.DS_Store
*.log
coverage/
node_modules/
iso-15924.js
iso-15924.min.js
yarn.lock
archive.zip
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
iso-15924.js
iso-15924.min.js
*.json
coverage/
*.md
24 changes: 12 additions & 12 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
'use strict'

var fs = require('fs')
var URL = require('url').URL
var https = require('https')
var concat = require('concat-stream')
var yauzl = require('yauzl')
var dsv = require('d3-dsv')
var bail = require('bail')
var not = require('not')
import fs from 'fs'
import https from 'https'
import concat from 'concat-stream'
import yauzl from 'yauzl'
import dsv from 'd3-dsv'
import bail from 'bail'
import not from 'not'

var headers = ['code', 'numeric', 'english', 'french', 'pva', 'age', 'date']

var other = []
var found = false

Expand Down Expand Up @@ -83,7 +79,11 @@ function onconcat(body) {
}
})

fs.writeFile('index.json', JSON.stringify(data, null, 2) + '\n', bail)
fs.writeFile(
'index.js',
'export var iso15924 = ' + JSON.stringify(data, null, 2) + '\n',
bail
)
}

function comment(line) {
Expand Down
Loading

0 comments on commit 44bc9c1

Please sign in to comment.