-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a2ae7d6
Showing
6 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"globals": { | ||
"$" : true, | ||
"window" : true, | ||
"document": true | ||
}, | ||
"strict" : false, | ||
"curly" : true, | ||
"eqeqeq" : true, | ||
"noarg" : true, | ||
"noempty" : true, | ||
"undef" : true, | ||
"unused" : true, | ||
"esversion": 6, | ||
"jquery" : true, | ||
"asi" : true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"name": "ui", | ||
"version": "1.0.0", | ||
"description": "\"A UI for samrt door\"", | ||
"main": "src/js/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.4", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-react": "^6.24.1", | ||
"jquery": "^3.3.1", | ||
"webpack": "^4.5.0", | ||
"webpack-cli": "^2.0.14" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
html{ | ||
width: 100%; height: 100%; | ||
} | ||
|
||
body{ | ||
width: 100%; height: 100%; | ||
} | ||
|
||
.open_button{ | ||
width: 30%; | ||
|
||
border-radius: 50%; | ||
background-color: red; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>UI</title> | ||
<link rel="stylesheet" href="index.css"> | ||
<script src="jquery.js"></script> | ||
<script src="index.js"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="open_button"></div> | ||
<div class="manage_button"></div> | ||
<div class="password_button"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import 'jquery'; | ||
|
||
$(document).ready(()=>{ | ||
let buttons = { | ||
open_button : $(".open_button"), | ||
manage_button : $(".manage_button"), | ||
password_button: $(".password_button") | ||
} | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
module.exports = { | ||
entry: __dirname + "src/js/index.js",//已多次提及的唯一入口文件 | ||
output: { | ||
path: __dirname + "assets/js",//打包后的文件存放的地方 | ||
filename: "bundle.js"//打包后输出文件的文件名 | ||
}, | ||
devtool: 'eval-source-map', | ||
devServer: { | ||
contentBase: "./assets",//本地服务器所加载的页面所在的目录 | ||
historyApiFallback: true,//不跳转 | ||
inline: true//实时刷新 | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /(\.jsx|\.js)$/, | ||
use: { | ||
loader: "babel-loader", | ||
options: { | ||
presets: [ | ||
"env" | ||
] | ||
} | ||
}, | ||
exclude: /node_modules/ | ||
} | ||
] | ||
} | ||
}; |