parent
e051013e9a
commit
2c122f66b5
3 changed files with 13 additions and 5 deletions
@ -1,5 +1,3 @@ |
||||
#!/usr/bin/env node |
||||
const fs = require('fs'); |
||||
const path = require('path'); |
||||
const PACKAGE_PATH = path.dirname(require.resolve(path.join('china-dictatorship', 'package.json'))); |
||||
console.log(fs.readFileSync(path.join(PACKAGE_PATH, 'README.html'), 'utf8')); |
||||
const china_dictatorship = require('china-dictatorship'); |
||||
console.log(china_dictatorship.get_data()); |
||||
|
@ -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; |
Loading…
Reference in new issue