farrux-2-oy-darslari 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/calc.js +5 -0
  2. package/dars_1.Node.js +31 -0
  3. package/package.json +14 -0
package/calc.js ADDED
@@ -0,0 +1,5 @@
1
+ function addNumber(num1, num2) {
2
+ return (num1 + num2)
3
+ }
4
+
5
+ module.exports = addNumber;
package/dars_1.Node.js ADDED
@@ -0,0 +1,31 @@
1
+ // Node.js Deno.js Bun.js
2
+
3
+ // node -v - orqali biz node.js ni versiyasini korishimiz mumkin
4
+
5
+ // node papka_nomi.js orqali biz bir marotaba natijani chiqarishimiz mumkin ammo bu xato
6
+
7
+ // npm install nodemon - deb biz faqatgina hozirgi papkamiz uchun live node ni yuklashimiz mumkin ammo global yuklash uchun esa npm install nodemon -g buyrugini berishimiz kerak.
8
+
9
+ // nodemon papka_nomi.js - live ishga tushadi
10
+
11
+ // npm init - orqali biz loyihamiz haqida qisqacha malumotlarni berib qoyishimiz mumkin.
12
+
13
+ // npm init -y - orqali esa hamma qiymatlariga default qiymatlarni berishimiz mumkin.
14
+
15
+ // package.json - ichidagi scripts ichiga qisqartmalar berishimiz mumkin misol : "go" : "nodemon dars_1.Node.js" va bu orqali biz endi
16
+ // npm run go desak kifoya live ishga tushadi.
17
+
18
+ // Biz papka ochib (calc.js) uning ichiga qandaydur vazifani bajaradigan funksiya yozsak uni boshqa papka (dars_1.Node.js)da ishlatish imkoni bor.
19
+
20
+ // module.exports = addNumber metodi orqali fayl ichidagi kerakli tanlangan funksiyani chaqirib olib boshqa joyda ishlatishimiz mumkin.
21
+
22
+ // npm publish orqali biz internetga faylni yuklashimiz mumkin.
23
+
24
+
25
+
26
+ console.log("Hello World");
27
+ console.log(1234);
28
+
29
+ const calc_fayl = require("./calc.js");
30
+
31
+ console.log(calc_fayl(121, 14));
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "farrux-2-oy-darslari",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "dars_1.Node.js",
6
+ "scripts": {
7
+ "go": "nodemon dars_1.Node.js",
8
+ "test": "echo \"Error: no test specified\" && exit 1"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "type": "commonjs"
14
+ }