Skip to content

Commit

Permalink
Use cuss as source of truth
Browse files Browse the repository at this point in the history
Related-to words/cuss#28.
Related-to GH-18.
Closes GH-19.

Reviewed-by: Merlijn Vos <[email protected]>
  • Loading branch information
wooorm authored Mar 13, 2019
1 parent 464a440 commit 9edf0e4
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 4,183 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
node_modules/
profanities.js
profanities.min.js
index.json
yarn.lock
index.json
ar-latn.json
es.json
fr.json
pt-br.json
249 changes: 0 additions & 249 deletions ar-latn.json

This file was deleted.

18 changes: 18 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict'

var fs = require('fs')
var path = require('path')
var pkg = require('cuss/package')

var root = require.resolve('cuss')

pkg.files.forEach(basename => {
var fp = path.join(root, '..', basename)
var doc = fs.readFileSync(fp)
var map = JSON.parse(doc)
var profanities = Object.keys(map)

fs.writeFileSync(basename, JSON.stringify(profanities, null, 2) + '\n')

console.log('✓ ' + basename + ' (' + profanities.length + ')')
})
Loading

0 comments on commit 9edf0e4

Please sign in to comment.