mirror of
https://github.com/cirosantilli/china-dictatorship.git
synced 2025-09-02 11:12:39 +02:00
make nodejs package programtaically usable
This commit is contained in:
9
index.js
Normal file
9
index.js
Normal file
@@ -0,0 +1,9 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const PACKAGE_PATH = path.dirname(require.resolve(path.join('china-dictatorship', 'package.json')));
|
||||
const README_PATH = path.join(PACKAGE_PATH, 'README.html');
|
||||
|
||||
function get_data() {
|
||||
return fs.readFileSync(README_PATH, 'utf8');
|
||||
}
|
||||
exports.get_data = get_data;
|
Reference in New Issue
Block a user