mirror of
https://github.com/cirosantilli/china-dictatorship.git
synced 2025-09-03 11:43:07 +02:00
make nodejs package programtaically usable
This commit is contained in:
@@ -1,5 +1,3 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const fs = require('fs');
|
const china_dictatorship = require('china-dictatorship');
|
||||||
const path = require('path');
|
console.log(china_dictatorship.get_data());
|
||||||
const PACKAGE_PATH = path.dirname(require.resolve(path.join('china-dictatorship', 'package.json')));
|
|
||||||
console.log(fs.readFileSync(path.join(PACKAGE_PATH, 'README.html'), 'utf8'));
|
|
||||||
|
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;
|
@@ -6,6 +6,7 @@
|
|||||||
"description": "2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱",
|
"description": "2018新疆改造中心,1989六四事件,1999法轮功 ,2019 996.ICU, 2018包子露宪,2015 710律师劫,2015巴拿马文件 邓家贵,2017低端人口,2008西藏骚乱",
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"files": [
|
"files": [
|
||||||
|
"index.js",
|
||||||
"china-dictatorship",
|
"china-dictatorship",
|
||||||
"README",
|
"README",
|
||||||
"README.adoc",
|
"README.adoc",
|
||||||
@@ -21,5 +22,5 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublishOnly": "cp README.adoc README;make"
|
"prepublishOnly": "cp README.adoc README;make"
|
||||||
},
|
},
|
||||||
"version": "0.0.52"
|
"version": "0.0.54"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user