Skip to content

Commit 556d2a7

Browse files
committed
Replace JSON data w/ JS data
1 parent fc38477 commit 556d2a7

File tree

11 files changed

+661
-661
lines changed

11 files changed

+661
-661
lines changed

packages/franc-all/data.js

+399
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/franc-all/data.json

-399
This file was deleted.

packages/franc-all/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"guess"
1414
],
1515
"files": [
16-
"data.json",
16+
"data.js",
1717
"expressions.js",
1818
"index.js"
1919
],

packages/franc-min/data.js

+76
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/franc-min/data.json

-76
This file was deleted.

packages/franc-min/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"guess"
1414
],
1515
"files": [
16-
"data.json",
16+
"data.js",
1717
"expressions.js",
1818
"index.js"
1919
],

packages/franc/data.js

+180
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/franc/data.json

-180
This file was deleted.

packages/franc/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var expressions = require('./expressions.js')
99

1010
/* Load `data` (trigram information per language,
1111
* per script). */
12-
var data = require('./data.json')
12+
var data = require('./data.js')
1313

1414
/* Expose `detectAll` on `detect`. */
1515
detect.all = detectAll

packages/franc/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"trigram-utils": "^1.0.0"
1717
},
1818
"files": [
19-
"data.json",
19+
"data.js",
2020
"expressions.js",
2121
"index.js"
2222
],

script/build.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ function generate(basename) {
142142
)
143143

144144
fs.writeFileSync(
145-
path.join(base, 'data.json'),
146-
JSON.stringify(data, null, 2) + '\n'
145+
path.join(base, 'data.js'),
146+
'module.exports = ' + JSON.stringify(data, null, 2) + '\n'
147147
)
148148

149149
fs.writeFileSync(path.join(base, 'readme.md'), generateReadme(pack, support))

0 commit comments

Comments
 (0)