mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 13:04:27 +01:00
start npm! data-files package
This commit is contained in:
8
npm/data-files/index.js
Normal file
8
npm/data-files/index.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
function myfunc() {
|
||||
const package_path = path.dirname(require.resolve(path.join('cirosantilli-data-files', 'package.json')));
|
||||
return fs.readFileSync(path.join(package_path, 'mydata.txt'), 'utf-8');
|
||||
}
|
||||
exports.myfunc = myfunc;
|
||||
Reference in New Issue
Block a user