Skip to content

Commit

Permalink
patch: build .js instead of .json for types. fixes #208.
Browse files Browse the repository at this point in the history
  • Loading branch information
marlon360 authored and broofa committed May 15, 2019
1 parent 30ba26d commit f348aba
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ for (var type in db) {
}

function writeTypesFile(types, path) {
fs.writeFileSync(path, JSON.stringify(types));
fs.writeFileSync(path, 'module.exports = ' + JSON.stringify(types) + ';');
}

// Segregate into standard and non-standard types based on facet per
Expand All @@ -67,5 +67,5 @@ Object.keys(db).sort().forEach(function(k) {
}
});

writeTypesFile(standard, path.join(__dirname, '../types', 'standard.json'));
writeTypesFile(other, path.join(__dirname, '../types', 'other.json'));
writeTypesFile(standard, path.join(__dirname, '../types', 'standard.js'));
writeTypesFile(other, path.join(__dirname, '../types', 'other.js'));
1 change: 1 addition & 0 deletions types/other.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion types/other.json

This file was deleted.

1 change: 1 addition & 0 deletions types/standard.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion types/standard.json

This file was deleted.

0 comments on commit f348aba

Please sign in to comment.