[init]
This commit is contained in:
7
test_src/arithmetic.cjs
Normal file
7
test_src/arithmetic.cjs
Normal file
@@ -0,0 +1,7 @@
|
||||
module.exports.sum = function sum(a, b) {
|
||||
return a + b;
|
||||
}
|
||||
module.exports.div = function div(a, b) {
|
||||
if (b == 0) return NaN;
|
||||
return a / b;
|
||||
}
|
24
test_src/index.cjs
Normal file
24
test_src/index.cjs
Normal file
@@ -0,0 +1,24 @@
|
||||
var {existsSync,readFile} = require('node:fs');
|
||||
// const {cwd} = require('process');
|
||||
var _var = require('process');
|
||||
var {sum, div} = require('./arithmetic.cjs');
|
||||
var {sum, div} = require('../output/lodash.bundle.js');
|
||||
var {ceil} = require('./lodash.js')
|
||||
let cwd = process.cwd;
|
||||
console.log('a')
|
||||
|
||||
function x(){
|
||||
return {x:3};
|
||||
}
|
||||
|
||||
// readFile('./package.json',(data)=>{
|
||||
|
||||
// });
|
||||
let newLocal = existsSync("./package.json");
|
||||
|
||||
console.log(`Read some data`,newLocal,sum(2,34));
|
||||
console.log(`Read some data`,newLocal,
|
||||
div(7,0),
|
||||
div(32,3),
|
||||
ceil(10.24)
|
||||
);
|
17112
test_src/lodash.js
Normal file
17112
test_src/lodash.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user