first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
function a() {
console.log("assss")
}
function b() {}
function c() {}
function d() {}
module.exports = { a,b,c,d }
// module.exports = {
// test: '111'
// }

View File

@@ -0,0 +1,6 @@
const http = require('http');
http.createServer({}, (req, res) => {
res.writeHead(200);
res.end('hello');
}).listen(8000);

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h2>测试</h2>
</body>
</html>

View File

@@ -0,0 +1,3 @@
var a = require("./config")
console.log(a)

View File

@@ -0,0 +1,27 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
})
win.loadFile('index.html')
}
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})

View File

@@ -0,0 +1,28 @@
{
"name": "2021-03-19",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/node": {
"version": "14.14.35",
"resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-14.14.35.tgz?cache=0&sync_timestamp=1615835662835&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.14.35.tgz",
"integrity": "sha1-QslTpOKxirkx9yR35wEhcvT/oxM="
},
"axios": {
"version": "0.21.1",
"resolved": "https://registry.npm.taobao.org/axios/download/axios-0.21.1.tgz?cache=0&sync_timestamp=1608609170235&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faxios%2Fdownload%2Faxios-0.21.1.tgz",
"integrity": "sha1-IlY0gZYvTWvemnbVFu8OXTwJsrg=",
"dev": true,
"requires": {
"follow-redirects": "^1.10.0"
}
},
"follow-redirects": {
"version": "1.13.3",
"resolved": "https://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.13.3.tgz?cache=0&sync_timestamp=1614436920073&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.13.3.tgz",
"integrity": "sha1-5VmK1QF0wbxOhyMB6CrCzZf5Amc=",
"dev": true
}
}
}

View File

@@ -0,0 +1,18 @@
{
"name": "2021-03-19",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "/Applications/Electron.app/Contents/MacOS/Electron ."
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"axios": "^0.21.1"
},
"devDependencies": {
"@types/node": "^14.14.35"
}
}

View File

@@ -0,0 +1,55 @@
nodejs 是让js运行在后端的一个运行环境
js 运行在客户端浏览器
js 可以运行在后端
nodejs
c++
v8
nodejs 本意 是让 js 成为后端语言node_modules
typescript + nodejs ==== java
主要应用场景
开发前端
gulp webpack vue
模块
nodejs 内置模块
第三方模块 npm 包管理工具 https://www.npmjs.com/
java maven gradle
php com
python pip
nodejs
|
|
deno typescript(js) Rust(c++)
nodejs
package.json 文件 用来描述这个项目的配置和依赖等信息
npm init 初始化一个新的 package.json
npm init -y
npm install(i) 下载一个模块
--save-dev -D 将模块安装到开发环境下 devDependencies
--save -S 将模块安装到正式环境下 dependencies
-g 全局安装
npm run 命令名称 运行一个命令
nodejs nw.js electron.js