-
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 af623bd
Showing
19 changed files
with
4,794 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,6 @@ | ||
{ | ||
"presets": [ | ||
"es2015" | ||
], | ||
"plugins": [] | ||
} |
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,2 @@ | ||
node_modules/ | ||
.idea/ |
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,69 @@ | ||
# 先锋网络中心 | ||
|
||
东北大学先锋网络中心介绍页&招新报名页面! | ||
|
||
## 开发指南 | ||
|
||
### 安装 | ||
|
||
``` | ||
yarn install | ||
``` | ||
|
||
### 调试 | ||
|
||
``` | ||
yarn run dev | ||
``` | ||
|
||
### 组建 | ||
|
||
``` | ||
yarn run build | ||
``` | ||
|
||
### 目录 | ||
|
||
``` | ||
. | ||
├── node_modules | ||
├── package.json | ||
├── public | ||
│ ├── dist | ||
│ │ └── bundle.e47e84525136281a3187.js | ||
│ ├── img | ||
│ │ ├── background.79d902a3fa19f9b8b7d44aa8d999a13f.png | ||
│ │ └── frontground.c735102255958d5ccf031f20038c0d7f.gif | ||
│ ├── index.html | ||
│ └── static | ||
│ └── hello.487deb0527aa4445bfa958e3dd999279.md | ||
├── README.md | ||
├── src | ||
│ ├── img | ||
│ │ ├── background.png | ||
│ │ └── frontground.gif | ||
│ ├── js | ||
│ │ └── index.js | ||
│ ├── main.js | ||
│ ├── md | ||
│ │ └── hello.md | ||
│ ├── scss | ||
│ │ └── index.scss | ||
│ └── tmpl | ||
│ └── index.html | ||
├── webpack.config.js | ||
└── yarn.lock | ||
``` | ||
|
||
+ JS文件请放在 src/js 目录下,SCSS 文件请放在 src/scss 目录下,HTML 文件请放在 src/tmpl 目录下,MARKDOWN 文件请放在 src/md 目录下。 | ||
+ SCSS 完全兼容 CSS 语法,请将所有样式表文件命名为 .scss 后缀。请充分按照模块化的原则创作 CSS 类。 | ||
+ 请使用 ECMAScript6 的风格和 API 编写 JS 文件。请充分按照模块化的原则创作 JS 模块。 | ||
+ 编译时,Webpack 自动打包生成 public 下的内容。 | ||
+ 要添加 CSS、JS、MARKDOWN,请在 src/main.js 中 import。要添加 HTML 文件,请在 webpack.config.js 中加入如下代码块 | ||
``` | ||
new HtmlWebpackPlugin({ | ||
filename: "index.html", | ||
template: __dirname + "/src/tmpl/index.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,25 @@ | ||
{ | ||
"name": "neupioneer", | ||
"description": "Homepage of NEU Pioneer.", | ||
"version": "1.0.0", | ||
"author": "neupioneer <[email protected]>", | ||
"private": true, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-preset-es2015": "^6.24.1", | ||
"css-loader": "^0.28.7", | ||
"file-loader": "^1.1.5", | ||
"html-loader": "^0.5.1", | ||
"html-webpack-plugin": "^2.30.1", | ||
"node-sass": "^4.5.3", | ||
"sass-loader": "^6.0.6", | ||
"style-loader": "^0.19.0", | ||
"webpack": "^3.6.0", | ||
"webpack-dev-server": "^2.9.1" | ||
}, | ||
"scripts": { | ||
"build": "rm -rf public && webpack", | ||
"dev": "webpack-dev-server --open --hot" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
<!DOCTYPE html> <html> <head> <meta charset=UTF-8> <title>Document</title> </head> <body> <h1>Header</h1> <img src=img/frontground.c735102255958d5ccf031f20038c0d7f.gif> <script type="text/javascript" src="./dist/bundle.3be787570e0293232a6e.js"></script></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 @@ | ||
# hello |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
console.log("helloindex") |
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,3 @@ | ||
import './scss/index.scss' | ||
import './js/index' | ||
import './md/hello.md' |
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 @@ | ||
# hello |
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,3 @@ | ||
body { | ||
background-image: url(../img/background.png); | ||
} |
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 @@ | ||
<h1>Header</h1> |
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,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<!-- 这是注释! --> | ||
${require('./header.html')} | ||
<img src="../img/frontground.gif"> | ||
</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,42 @@ | ||
const webpack = require('webpack'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: "./src/main.js", | ||
output: { | ||
path: __dirname + '/public', | ||
filename: "./dist/bundle.[hash].js" | ||
}, | ||
module: { | ||
loaders: [ | ||
{ test: /\.js$/,loader: "babel-loader" }, | ||
{ test: /\.scss$/,loader: "style-loader!css-loader!sass-loader" }, | ||
{ test: /\.css$/,loader: 'style-loader!css-loader' }, | ||
{ test: /\.(png|jpe?g|gif|svg)$/,loader: 'file-loader',options: { name: 'img/[name].[hash].[ext]' } }, | ||
{ test: /\.(eot|ttf|woff|woff2)$/,loader: 'file-loader',options: { name: 'font/[name].[hash].[ext]' } }, | ||
{ test: /\.md$/,loader: 'file-loader',options: { name: 'static/[name].[hash].[ext]' } }, | ||
{ test: /\.html$/, loader: "html-loader?interpolate&minimize&removeComments" } | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.js', '.jsx'] | ||
}, | ||
plugins: [ | ||
new webpack.optimize.UglifyJsPlugin({ | ||
compress: { | ||
warnings: false | ||
}, | ||
except: ['$super', '$', 'exports', 'require'] | ||
}), | ||
new HtmlWebpackPlugin({ | ||
filename: "index.html", | ||
template: __dirname + "/src/tmpl/index.html" | ||
}), | ||
], | ||
devtool:'eval-source-map', | ||
devServer: { | ||
contentBase: "./public/", | ||
historyApiFallback: true, | ||
inline: true | ||
}, | ||
}; |
Oops, something went wrong.