Upload files to "tools"
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// Copies the WordNet database files the thesaurus needs from the wordnet-db package into ./wordnet.
|
||||
// Run once after npm install: npm run setup
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const src = path.join(require.resolve('wordnet-db/package.json'), '..', 'dict');
|
||||
const dst = path.join(__dirname, '..', 'wordnet');
|
||||
fs.mkdirSync(dst, { recursive: true });
|
||||
['data.adj', 'data.adv', 'data.noun', 'data.verb', 'index.adj', 'index.adv', 'index.noun', 'index.verb'].forEach((f) => {
|
||||
fs.copyFileSync(path.join(src, f), path.join(dst, f));
|
||||
});
|
||||
fs.copyFileSync(path.join(src, '..', 'LICENSE'), path.join(dst, 'LICENSE'));
|
||||
console.log('WordNet files copied to ' + dst);
|
||||
Reference in New Issue
Block a user