├── backend
├── app_run.json
├── .DS_Store
└── enum_env.json
├── frontend
├── .bowerrc
├── src
│ ├── css
│ │ ├── less
│ │ │ ├── base.less
│ │ │ └── .DS_Store
│ │ ├── .DS_Store
│ │ └── less-page
│ │ │ ├── .DS_Store
│ │ │ └── example.less
│ ├── rev
│ │ ├── js
│ │ │ ├── rev-manifest.json
│ │ │ └── .DS_Store
│ │ ├── css
│ │ │ ├── rev-manifest.json
│ │ │ └── .DS_Store
│ │ └── .DS_Store
│ ├── .DS_Store
│ ├── js
│ │ ├── js-page
│ │ │ ├── example.js
│ │ │ └── .DS_Store
│ │ └── .DS_Store
│ └── tpl
│ │ ├── .DS_Store
│ │ ├── dev
│ │ ├── .DS_Store
│ │ └── 404.hbs
│ │ └── pro
│ │ └── 404.hbs
├── public
│ ├── css
│ │ ├── pro
│ │ │ ├── example-c93a3ca1.css
│ │ │ └── example-ce8c32ee.css
│ │ ├── .DS_Store
│ │ └── dev
│ │ │ └── example.css
│ ├── .DS_Store
│ ├── js
│ │ ├── .DS_Store
│ │ ├── pro
│ │ │ ├── example-cc2d6063.js
│ │ │ └── example-f2a33d51.js
│ │ └── dev
│ │ │ └── example.js
│ └── vendors
│ │ ├── .DS_Store
│ │ └── normalize.css
│ │ ├── bower.json
│ │ ├── .bower.json
│ │ ├── LICENSE.md
│ │ ├── README.md
│ │ └── normalize.css
├── .DS_Store
├── webpack.config.js
├── bower.json
└── gulpfile.js
├── .gitignore
├── LICENSE
├── package.json
└── README.md
/backend/app_run.json:
--------------------------------------------------------------------------------
1 | {
2 | "run":"test"
3 | }
--------------------------------------------------------------------------------
/frontend/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "public/vendors"
3 | }
--------------------------------------------------------------------------------
/frontend/src/css/less/base.less:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
--------------------------------------------------------------------------------
/frontend/src/rev/js/rev-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "example.js": "example-f2a33d51.js"
3 | }
--------------------------------------------------------------------------------
/frontend/public/css/pro/example-c93a3ca1.css:
--------------------------------------------------------------------------------
1 | *{box-sizing:border-box}a{text-decoration:none}
--------------------------------------------------------------------------------
/frontend/src/rev/css/rev-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "example.css": "example-ce8c32ee.css"
3 | }
--------------------------------------------------------------------------------
/backend/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/backend/.DS_Store
--------------------------------------------------------------------------------
/frontend/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/.DS_Store
--------------------------------------------------------------------------------
/frontend/public/css/pro/example-ce8c32ee.css:
--------------------------------------------------------------------------------
1 | *{box-sizing:border-box;font-size:14px}a{text-decoration:none}
--------------------------------------------------------------------------------
/frontend/src/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/js/js-page/example.js:
--------------------------------------------------------------------------------
1 |
2 | console.log('first change');
3 |
4 | console.log('second change');
--------------------------------------------------------------------------------
/frontend/public/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/public/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/css/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/css/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/js/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/rev/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/rev/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/tpl/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/tpl/.DS_Store
--------------------------------------------------------------------------------
/frontend/public/css/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/public/css/.DS_Store
--------------------------------------------------------------------------------
/frontend/public/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/public/js/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/rev/js/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/rev/js/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/css/less/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/css/less/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/rev/css/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/rev/css/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/tpl/dev/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/tpl/dev/.DS_Store
--------------------------------------------------------------------------------
/frontend/public/vendors/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/public/vendors/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/js/js-page/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/js/js-page/.DS_Store
--------------------------------------------------------------------------------
/frontend/src/css/less-page/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MT-Libraries/MT-Project-Seed/HEAD/frontend/src/css/less-page/.DS_Store
--------------------------------------------------------------------------------
/frontend/public/css/dev/example.css:
--------------------------------------------------------------------------------
1 | * {
2 | box-sizing: border-box;
3 | }
4 | a {
5 | text-decoration: none;
6 | }
7 | * {
8 | font-size: 14px;
9 | }
10 |
--------------------------------------------------------------------------------
/frontend/src/css/less-page/example.less:
--------------------------------------------------------------------------------
1 | @import '../less/base';
2 |
3 |
4 | // first change
5 |
6 | a{
7 | text-decoration: none;
8 | }
9 |
10 | // second change
11 |
12 | * {
13 | font-size: 14px;
14 | }
--------------------------------------------------------------------------------
/frontend/public/js/pro/example-cc2d6063.js:
--------------------------------------------------------------------------------
1 | !function(r){function o(t){if(e[t])return e[t].exports;var n=e[t]={exports:{},id:t,loaded:!1};return r[t].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o){console.log("first change")}]);
--------------------------------------------------------------------------------
/frontend/public/js/pro/example-f2a33d51.js:
--------------------------------------------------------------------------------
1 | !function(o){function e(r){if(n[r])return n[r].exports;var t=n[r]={exports:{},id:r,loaded:!1};return o[r].call(t.exports,t,t.exports,e),t.loaded=!0,t.exports}var n={};return e.m=o,e.c=n,e.p="",e(0)}([function(o,e){console.log("first change"),console.log("second change")}]);
--------------------------------------------------------------------------------
/frontend/public/vendors/normalize.css/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "normalize-css",
3 | "version": "3.0.3",
4 | "main": "normalize.css",
5 | "author": "Nicolas Gallagher",
6 | "ignore": [
7 | "CHANGELOG.md",
8 | "CONTRIBUTING.md",
9 | "component.json",
10 | "package.json",
11 | "test.html"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/frontend/src/tpl/dev/404.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/frontend/src/tpl/pro/404.hbs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Document
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/backend/enum_env.json:
--------------------------------------------------------------------------------
1 | {
2 | "dev": {
3 | "port": 8032,
4 | "trust": false,
5 | "dev": true,
6 | "cdn_lib": ""
7 | },
8 | "pro": {
9 | "port": 8084,
10 | "trust": false,
11 | "dev": false,
12 | "cdn_lib": ""
13 | },
14 | "test": {
15 | "port": 8032,
16 | "trust": false,
17 | "dev": false,
18 | "cdn_lib": ""
19 | }
20 | }
--------------------------------------------------------------------------------
/frontend/webpack.config.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * webpack.config.
4 | *
5 | * @project localhost_thonatos.com
6 | * @datetime 18:22 - 15/9/10
7 | * @author Thonatos.Yang
8 | * @copyright Thonatos.Yang
9 | *
10 | */
11 |
12 | 'use strict';
13 |
14 | module.exports = {
15 | entry: {
16 | 'example': './src/js/js-page/example.js',
17 | },
18 | output: {
19 | path: __dirname + "/public/js/dev",
20 | filename: '[name].js'
21 | }
22 | };
--------------------------------------------------------------------------------
/frontend/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mt-bower",
3 | "version": "0.0.1",
4 | "authors": [
5 | "Thonatos.Yang "
6 | ],
7 | "description": "MT.T SEED FOR BOWER.",
8 | "license": "MIT",
9 | "private": true,
10 | "ignore": [
11 | "**/.*",
12 | "node_modules",
13 | "bower_components",
14 | "test",
15 | "tests"
16 | ],
17 | "devDependencies": {},
18 | "dependencies": {
19 | "jquery": "~2.1.4",
20 | "modernizr": "~2.8.3",
21 | "normalize.css": "~3.0.3"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 |
5 | # Runtime data
6 | pids
7 | *.pid
8 | *.seed
9 |
10 | # Directory for instrumented libs generated by jscoverage/JSCover
11 | lib-cov
12 |
13 | # Coverage directory used by tools like istanbul
14 | coverage
15 |
16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17 | .grunt
18 |
19 | # node-waf configuration
20 | .lock-wscript
21 |
22 | # Compiled binary addons (http://nodejs.org/api/addons.html)
23 | build/Release
24 |
25 | # Dependency directory
26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27 | node_modules
28 |
29 | # Mac
30 | *.DS_Store
--------------------------------------------------------------------------------
/frontend/public/vendors/normalize.css/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "normalize-css",
3 | "version": "3.0.3",
4 | "main": "normalize.css",
5 | "author": "Nicolas Gallagher",
6 | "ignore": [
7 | "CHANGELOG.md",
8 | "CONTRIBUTING.md",
9 | "component.json",
10 | "package.json",
11 | "test.html"
12 | ],
13 | "homepage": "https://github.com/necolas/normalize.css",
14 | "_release": "3.0.3",
15 | "_resolution": {
16 | "type": "version",
17 | "tag": "3.0.3",
18 | "commit": "7d0ebab2ffdf2c2046e2b812456f3681f92b5f32"
19 | },
20 | "_source": "git://github.com/necolas/normalize.css.git",
21 | "_target": "~3.0.3",
22 | "_originalSource": "normalize.css",
23 | "_direct": true
24 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Magic Term Libraries
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/frontend/public/vendors/normalize.css/LICENSE.md:
--------------------------------------------------------------------------------
1 | Copyright (c) Nicolas Gallagher and Jonathan Neal
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MT.NODE",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "cd backend && node bin/autoload.js"
7 | },
8 | "dependencies": {
9 | "bcrypt-nodejs": "0.0.3",
10 | "body-parser": "~1.10.2",
11 | "compression": "^1.3.0",
12 | "connect-flash": "^0.1.1",
13 | "cookie-parser": "~1.3.3",
14 | "cookie-session": "^1.1.0",
15 | "debug": "^2.1.1",
16 | "ejs": "^2.1.4",
17 | "express": "^4.13.0",
18 | "express-session": "^1.10.1",
19 | "ez-upyun": "0.0.6",
20 | "hbs": "^3.1.1",
21 | "marked": "^0.3.3",
22 | "mobile-detect": "^1.2.1",
23 | "moment": "^2.10.3",
24 | "mongoose": "^4.1.1",
25 | "morgan": "^1.5.1",
26 | "passport": "^0.2.1",
27 | "passport-local": "^1.0.0",
28 | "redis": "^0.12.1",
29 | "request": "^2.51.0",
30 | "serve-favicon": "~2.2.0",
31 | "serve-index": "^1.7.1"
32 | },
33 | "devDependencies": {
34 | "del": "^1.1.1",
35 | "gulp": "^3.9.0",
36 | "gulp-watch": "^4.1.0",
37 | "gulp-uglify": "^1.4.1",
38 | "gulp-webpack": "^1.3.2",
39 | "gulp-plumber": "^1.0.1",
40 | "gulp-rev": "^3.0.1",
41 | "gulp-rev-collector": "^1.0.2",
42 | "gulp-autoprefixer": "^3.0.1",
43 | "gulp-less": "^3.0.3",
44 | "gulp-minify-css": "^1.2.1",
45 | "gulp-sourcemaps": "^1.2.2",
46 | "gulp-notify": "^1.8.0",
47 | "run-sequence": "^1.0.2"
48 | },
49 | "engines": {
50 | "node": ">=0.10.0"
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/frontend/public/js/dev/example.js:
--------------------------------------------------------------------------------
1 | /******/ (function(modules) { // webpackBootstrap
2 | /******/ // The module cache
3 | /******/ var installedModules = {};
4 |
5 | /******/ // The require function
6 | /******/ function __webpack_require__(moduleId) {
7 |
8 | /******/ // Check if module is in cache
9 | /******/ if(installedModules[moduleId])
10 | /******/ return installedModules[moduleId].exports;
11 |
12 | /******/ // Create a new module (and put it into the cache)
13 | /******/ var module = installedModules[moduleId] = {
14 | /******/ exports: {},
15 | /******/ id: moduleId,
16 | /******/ loaded: false
17 | /******/ };
18 |
19 | /******/ // Execute the module function
20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21 |
22 | /******/ // Flag the module as loaded
23 | /******/ module.loaded = true;
24 |
25 | /******/ // Return the exports of the module
26 | /******/ return module.exports;
27 | /******/ }
28 |
29 |
30 | /******/ // expose the modules object (__webpack_modules__)
31 | /******/ __webpack_require__.m = modules;
32 |
33 | /******/ // expose the module cache
34 | /******/ __webpack_require__.c = installedModules;
35 |
36 | /******/ // __webpack_public_path__
37 | /******/ __webpack_require__.p = "";
38 |
39 | /******/ // Load entry module and return exports
40 | /******/ return __webpack_require__(0);
41 | /******/ })
42 | /************************************************************************/
43 | /******/ ([
44 | /* 0 */
45 | /***/ function(module, exports) {
46 |
47 |
48 | console.log('first change');
49 |
50 | console.log('second change');
51 |
52 | /***/ }
53 | /******/ ]);
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | MT.Project.seed
3 |
4 | Node项目模板/前端自动构建
5 |
6 | ## Before
7 |
8 | npm install
9 |
10 | ## Usage
11 |
12 | # 开发环境
13 | # js/css模块化
14 |
15 | # css
16 | cd frontend && gulp watch
17 |
18 | # js
19 | cd frontend && webpack -w
20 |
21 | # 临时编译
22 | cd frontend && gulp css && gulp js
23 |
24 | # 生产环境
25 | cd frontend && gulp publish-css && gulp publish-js && gulp publish-tpl
26 |
27 |
28 | ## Structure
29 |
30 | ```
31 | ├── backend
32 | │ ├── app_run.json # 运行环境
33 | │ └── enum_env.json # 运行环境枚举
34 | ├── frontend
35 | │ ├── bower.json # 包管理
36 | │ ├── gulpfile.js # gulp配置文件
37 | │ ├── public
38 | │ │ ├── css # 开发与生产环境的css文件
39 | │ │ ├── js # 开发与生产环境的js文件
40 | │ │ └── vendors # 公共库
41 | │ │ └── normalize.css
42 | │ ├── src
43 | │ │ ├── css
44 | │ │ │ ├── less
45 | │ │ │ └── less-page # 待编译的css页面
46 | │ │ ├── js
47 | │ │ │ └── js-page # 待编译的js页面
48 | │ │ ├── rev # 版本号信息
49 | │ │ │ ├── css
50 | │ │ │ └── js
51 | │ │ └── tpl
52 | │ │ └── dev # 开发环境模板
53 | | | └── pro # 生产环境模板
54 | │ └── webpack.config.js # js配置文件
55 | └── package.json
56 | ```
57 |
58 | ## License
59 |
60 | The MIT License (MIT)
61 |
62 | Copyright (c) 2015 Magic Term Libraries
63 |
64 | Permission is hereby granted, free of charge, to any person obtaining a copy
65 | of this software and associated documentation files (the "Software"), to deal
66 | in the Software without restriction, including without limitation the rights
67 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
68 | copies of the Software, and to permit persons to whom the Software is
69 | furnished to do so, subject to the following conditions:
70 |
71 | The above copyright notice and this permission notice shall be included in all
72 | copies or substantial portions of the Software.
73 |
74 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
75 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
76 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
77 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
78 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
80 | SOFTWARE.
--------------------------------------------------------------------------------
/frontend/public/vendors/normalize.css/README.md:
--------------------------------------------------------------------------------
1 | # normalize.css v3
2 |
3 | Normalize.css is a customisable CSS file that makes browsers render all
4 | elements more consistently and in line with modern standards.
5 |
6 | The project relies on researching the differences between default browser
7 | styles in order to precisely target only the styles that need or benefit from
8 | normalizing.
9 |
10 | [View the test file](http://necolas.github.io/normalize.css/latest/test.html)
11 |
12 | ## Install
13 |
14 | * [npm](http://npmjs.org/): `npm install --save normalize.css`
15 | * [Component(1)](https://github.com/component/component/): `component install necolas/normalize.css`
16 | * [Bower](http://bower.io/): `bower install --save normalize.css`
17 | * [cdnjs](https://cdnjs.com/libraries/normalize)
18 | * [Download](http://necolas.github.io/normalize.css/latest/normalize.css).
19 |
20 | No other styles should come before Normalize.css.
21 |
22 | It is recommended that you include the `normalize.css` file as untouched
23 | library code.
24 |
25 | ## What does it do?
26 |
27 | * Preserves useful defaults, unlike many CSS resets.
28 | * Normalizes styles for a wide range of elements.
29 | * Corrects bugs and common browser inconsistencies.
30 | * Improves usability with subtle improvements.
31 | * Explains what code does using detailed comments.
32 |
33 | ## Browser support
34 |
35 | * Google Chrome (latest)
36 | * Mozilla Firefox (latest)
37 | * Mozilla Firefox ESR
38 | * Opera (latest)
39 | * Apple Safari 6+
40 | * Internet Explorer 8+
41 |
42 | [Normalize.css v1 provides legacy browser
43 | support](https://github.com/necolas/normalize.css/tree/v1) (IE 6+, Safari 4+),
44 | but is no longer actively developed.
45 |
46 | ## Extended details
47 |
48 | Additional detail and explanation of the esoteric parts of normalize.css.
49 |
50 | #### `pre, code, kbd, samp`
51 |
52 | The `font-family: monospace, monospace` hack fixes the inheritance and scaling
53 | of font-size for preformated text. The duplication of `monospace` is
54 | intentional. [Source](http://en.wikipedia.org/wiki/User:Davidgothberg/Test59).
55 |
56 | #### `sub, sup`
57 |
58 | Normally, using `sub` or `sup` affects the line-box height of text in all
59 | browsers. [Source](http://gist.github.com/413930).
60 |
61 | #### `svg:not(:root)`
62 |
63 | Adding `overflow: hidden` fixes IE9's SVG rendering. Earlier versions of IE
64 | don't support SVG, so we can safely use the `:not()` and `:root` selectors that
65 | modern browsers use in the default UA stylesheets to apply this style. [SVG
66 | Mailing List discussion](http://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html)
67 |
68 | #### `input[type="search"]`
69 |
70 | The search input is not fully stylable by default. In Chrome and Safari on
71 | OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In
72 | Chrome and Safari on Windows you can't control `border` properly. It will apply
73 | `border-width` but will only show a border color (which cannot be controlled)
74 | for the outer 1px of that border. Applying `-webkit-appearance: textfield`
75 | addresses these issues without removing the benefits of search inputs (e.g.
76 | showing past searches).
77 |
78 | #### `legend`
79 |
80 | Adding `border: 0` corrects an IE 8–11 bug where `color` (yes, `color`) is not
81 | inherited by `legend`.
82 |
83 | ## Contributing
84 |
85 | Please read the CONTRIBUTING.md
86 |
87 | ## Acknowledgements
88 |
89 | Normalize.css is a project by [Nicolas Gallagher](https://github.com/necolas),
90 | co-created with [Jonathan Neal](https://github.com/jonathantneal).
91 |
--------------------------------------------------------------------------------
/frontend/gulpfile.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * gulpfile. gulp config for build & deploy
4 | *
5 | * @project localhost_thonatos.com
6 | * @datetime 11:07 - 15/9/11
7 | * @author Thonatos.Yang
8 | * @copyright Thonatos.Yang
9 | *
10 | */
11 |
12 |
13 | var del = require('del'),
14 | path = require('path'),
15 | gulp = require('gulp'),
16 | less = require('gulp-less'),
17 | watch = require('gulp-watch'),
18 | uglify = require('gulp-uglify'),
19 | notify = require('gulp-notify'),
20 | plumber = require('gulp-plumber'),
21 | minifycss = require('gulp-minify-css'),
22 | autoprefixer = require('gulp-autoprefixer'),
23 | webpack = require('gulp-webpack'),
24 | rev = require('gulp-rev'),
25 | revCollector = require('gulp-rev-collector'),
26 | runSequence = require('run-sequence');
27 |
28 | /**
29 | * Define variables.
30 | */
31 |
32 | var CFG_WEBPACK = require('./webpack.config');
33 |
34 | var SRC_JS = './src/js/**/*.js';
35 | var SRC_CSS = './src/css/**/*.less';
36 |
37 | var DEP_JS = './src/js/js-page/*.js';
38 | var DEP_CSS = './src/css/less-page/*.less';
39 |
40 |
41 | var DEV_JS = './public/js/dev';
42 | var DEV_CSS = './public/css/dev';
43 | var DEV_TPL = './src/tpl/dev/**/*.hbs';
44 |
45 |
46 | var PRO_JS = './public/js/pro';
47 | var PRO_CSS = './public/css/pro';
48 | var PRO_TPL = './src/tpl/pro';
49 |
50 | var REVISION = './src/rev';
51 |
52 |
53 | /**
54 | * Gulp tasks.
55 | */
56 |
57 | gulp.task('js', function () {
58 | return gulp.src(DEP_JS)
59 | .pipe(webpack(CFG_WEBPACK))
60 | .pipe(gulp.dest(DEV_JS))
61 | .pipe(notify({
62 | message: 'js task complete'
63 | }));
64 | });
65 |
66 | gulp.task('publish-js', function () {
67 | return gulp.src(DEP_JS)
68 | .pipe(webpack(CFG_WEBPACK))
69 | .pipe(gulp.dest(DEV_JS))
70 | .pipe(uglify())
71 | .pipe(rev())
72 | .pipe(gulp.dest(PRO_JS))
73 | .pipe(rev.manifest())
74 | .pipe(gulp.dest(REVISION + "/js"))
75 | .pipe(notify({
76 | message: 'js task complete'
77 | }));
78 | });
79 |
80 | gulp.task('css', function () {
81 | return gulp.src(DEP_CSS)
82 | .pipe(plumber())
83 | .pipe(less({
84 | paths: [path.join(__dirname, 'less', 'includes')]
85 | }))
86 | .pipe(autoprefixer({
87 | //browsers: ['last 2 versions'],
88 | cascade: true
89 | }))
90 | .pipe(gulp.dest(DEV_CSS))
91 | .pipe(notify({
92 | message: 'css task complete'
93 | }));
94 |
95 | });
96 |
97 | gulp.task('publish-css', function () {
98 | return gulp.src(DEP_CSS)
99 | .pipe(plumber())
100 | .pipe(less({
101 | paths: [path.join(__dirname, 'less', 'includes')]
102 | }))
103 | .pipe(autoprefixer({
104 | //browsers: ['last 2 versions'],
105 | cascade: true
106 | }))
107 | .pipe(gulp.dest(DEV_CSS))
108 | .pipe(minifycss())
109 | .pipe(rev())
110 | .pipe(gulp.dest(PRO_CSS))
111 | .pipe(rev.manifest())
112 | .pipe(gulp.dest(REVISION + "/css"))
113 | .pipe(notify({
114 | message: 'publish css task complete'
115 | }));
116 | });
117 |
118 | gulp.task('publish-tpl', function () {
119 | return gulp.src([REVISION + '/**/*.json', DEV_TPL])
120 | .pipe(revCollector({
121 | dirReplacements: {
122 | 'dev/': 'pro/'
123 | }
124 | }))
125 | .pipe(gulp.dest(PRO_TPL))
126 | .pipe(notify({
127 | message: 'publish tpl task complete'
128 | }));
129 | });
130 |
131 | gulp.task('watch', function () {
132 |
133 | gulp.watch(SRC_JS,['js']);
134 | gulp.watch(SRC_CSS,['css']);
135 |
136 | });
137 |
138 | gulp.task('build',['publish-css','publish-js','publish-tpl'],function(){
139 | return console.log('Build Over.');
140 | });
141 |
--------------------------------------------------------------------------------
/frontend/public/vendors/normalize.css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /**
4 | * 1. Set default font family to sans-serif.
5 | * 2. Prevent iOS and IE text size adjust after device orientation change,
6 | * without disabling user zoom.
7 | */
8 |
9 | html {
10 | font-family: sans-serif; /* 1 */
11 | -ms-text-size-adjust: 100%; /* 2 */
12 | -webkit-text-size-adjust: 100%; /* 2 */
13 | }
14 |
15 | /**
16 | * Remove default margin.
17 | */
18 |
19 | body {
20 | margin: 0;
21 | }
22 |
23 | /* HTML5 display definitions
24 | ========================================================================== */
25 |
26 | /**
27 | * Correct `block` display not defined for any HTML5 element in IE 8/9.
28 | * Correct `block` display not defined for `details` or `summary` in IE 10/11
29 | * and Firefox.
30 | * Correct `block` display not defined for `main` in IE 11.
31 | */
32 |
33 | article,
34 | aside,
35 | details,
36 | figcaption,
37 | figure,
38 | footer,
39 | header,
40 | hgroup,
41 | main,
42 | menu,
43 | nav,
44 | section,
45 | summary {
46 | display: block;
47 | }
48 |
49 | /**
50 | * 1. Correct `inline-block` display not defined in IE 8/9.
51 | * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
52 | */
53 |
54 | audio,
55 | canvas,
56 | progress,
57 | video {
58 | display: inline-block; /* 1 */
59 | vertical-align: baseline; /* 2 */
60 | }
61 |
62 | /**
63 | * Prevent modern browsers from displaying `audio` without controls.
64 | * Remove excess height in iOS 5 devices.
65 | */
66 |
67 | audio:not([controls]) {
68 | display: none;
69 | height: 0;
70 | }
71 |
72 | /**
73 | * Address `[hidden]` styling not present in IE 8/9/10.
74 | * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
75 | */
76 |
77 | [hidden],
78 | template {
79 | display: none;
80 | }
81 |
82 | /* Links
83 | ========================================================================== */
84 |
85 | /**
86 | * Remove the gray background color from active links in IE 10.
87 | */
88 |
89 | a {
90 | background-color: transparent;
91 | }
92 |
93 | /**
94 | * Improve readability of focused elements when they are also in an
95 | * active/hover state.
96 | */
97 |
98 | a:active,
99 | a:hover {
100 | outline: 0;
101 | }
102 |
103 | /* Text-level semantics
104 | ========================================================================== */
105 |
106 | /**
107 | * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
108 | */
109 |
110 | abbr[title] {
111 | border-bottom: 1px dotted;
112 | }
113 |
114 | /**
115 | * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
116 | */
117 |
118 | b,
119 | strong {
120 | font-weight: bold;
121 | }
122 |
123 | /**
124 | * Address styling not present in Safari and Chrome.
125 | */
126 |
127 | dfn {
128 | font-style: italic;
129 | }
130 |
131 | /**
132 | * Address variable `h1` font-size and margin within `section` and `article`
133 | * contexts in Firefox 4+, Safari, and Chrome.
134 | */
135 |
136 | h1 {
137 | font-size: 2em;
138 | margin: 0.67em 0;
139 | }
140 |
141 | /**
142 | * Address styling not present in IE 8/9.
143 | */
144 |
145 | mark {
146 | background: #ff0;
147 | color: #000;
148 | }
149 |
150 | /**
151 | * Address inconsistent and variable font size in all browsers.
152 | */
153 |
154 | small {
155 | font-size: 80%;
156 | }
157 |
158 | /**
159 | * Prevent `sub` and `sup` affecting `line-height` in all browsers.
160 | */
161 |
162 | sub,
163 | sup {
164 | font-size: 75%;
165 | line-height: 0;
166 | position: relative;
167 | vertical-align: baseline;
168 | }
169 |
170 | sup {
171 | top: -0.5em;
172 | }
173 |
174 | sub {
175 | bottom: -0.25em;
176 | }
177 |
178 | /* Embedded content
179 | ========================================================================== */
180 |
181 | /**
182 | * Remove border when inside `a` element in IE 8/9/10.
183 | */
184 |
185 | img {
186 | border: 0;
187 | }
188 |
189 | /**
190 | * Correct overflow not hidden in IE 9/10/11.
191 | */
192 |
193 | svg:not(:root) {
194 | overflow: hidden;
195 | }
196 |
197 | /* Grouping content
198 | ========================================================================== */
199 |
200 | /**
201 | * Address margin not present in IE 8/9 and Safari.
202 | */
203 |
204 | figure {
205 | margin: 1em 40px;
206 | }
207 |
208 | /**
209 | * Address differences between Firefox and other browsers.
210 | */
211 |
212 | hr {
213 | box-sizing: content-box;
214 | height: 0;
215 | }
216 |
217 | /**
218 | * Contain overflow in all browsers.
219 | */
220 |
221 | pre {
222 | overflow: auto;
223 | }
224 |
225 | /**
226 | * Address odd `em`-unit font size rendering in all browsers.
227 | */
228 |
229 | code,
230 | kbd,
231 | pre,
232 | samp {
233 | font-family: monospace, monospace;
234 | font-size: 1em;
235 | }
236 |
237 | /* Forms
238 | ========================================================================== */
239 |
240 | /**
241 | * Known limitation: by default, Chrome and Safari on OS X allow very limited
242 | * styling of `select`, unless a `border` property is set.
243 | */
244 |
245 | /**
246 | * 1. Correct color not being inherited.
247 | * Known issue: affects color of disabled elements.
248 | * 2. Correct font properties not being inherited.
249 | * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
250 | */
251 |
252 | button,
253 | input,
254 | optgroup,
255 | select,
256 | textarea {
257 | color: inherit; /* 1 */
258 | font: inherit; /* 2 */
259 | margin: 0; /* 3 */
260 | }
261 |
262 | /**
263 | * Address `overflow` set to `hidden` in IE 8/9/10/11.
264 | */
265 |
266 | button {
267 | overflow: visible;
268 | }
269 |
270 | /**
271 | * Address inconsistent `text-transform` inheritance for `button` and `select`.
272 | * All other form control elements do not inherit `text-transform` values.
273 | * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
274 | * Correct `select` style inheritance in Firefox.
275 | */
276 |
277 | button,
278 | select {
279 | text-transform: none;
280 | }
281 |
282 | /**
283 | * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
284 | * and `video` controls.
285 | * 2. Correct inability to style clickable `input` types in iOS.
286 | * 3. Improve usability and consistency of cursor style between image-type
287 | * `input` and others.
288 | */
289 |
290 | button,
291 | html input[type="button"], /* 1 */
292 | input[type="reset"],
293 | input[type="submit"] {
294 | -webkit-appearance: button; /* 2 */
295 | cursor: pointer; /* 3 */
296 | }
297 |
298 | /**
299 | * Re-set default cursor for disabled elements.
300 | */
301 |
302 | button[disabled],
303 | html input[disabled] {
304 | cursor: default;
305 | }
306 |
307 | /**
308 | * Remove inner padding and border in Firefox 4+.
309 | */
310 |
311 | button::-moz-focus-inner,
312 | input::-moz-focus-inner {
313 | border: 0;
314 | padding: 0;
315 | }
316 |
317 | /**
318 | * Address Firefox 4+ setting `line-height` on `input` using `!important` in
319 | * the UA stylesheet.
320 | */
321 |
322 | input {
323 | line-height: normal;
324 | }
325 |
326 | /**
327 | * It's recommended that you don't attempt to style these elements.
328 | * Firefox's implementation doesn't respect box-sizing, padding, or width.
329 | *
330 | * 1. Address box sizing set to `content-box` in IE 8/9/10.
331 | * 2. Remove excess padding in IE 8/9/10.
332 | */
333 |
334 | input[type="checkbox"],
335 | input[type="radio"] {
336 | box-sizing: border-box; /* 1 */
337 | padding: 0; /* 2 */
338 | }
339 |
340 | /**
341 | * Fix the cursor style for Chrome's increment/decrement buttons. For certain
342 | * `font-size` values of the `input`, it causes the cursor style of the
343 | * decrement button to change from `default` to `text`.
344 | */
345 |
346 | input[type="number"]::-webkit-inner-spin-button,
347 | input[type="number"]::-webkit-outer-spin-button {
348 | height: auto;
349 | }
350 |
351 | /**
352 | * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
353 | * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
354 | */
355 |
356 | input[type="search"] {
357 | -webkit-appearance: textfield; /* 1 */
358 | box-sizing: content-box; /* 2 */
359 | }
360 |
361 | /**
362 | * Remove inner padding and search cancel button in Safari and Chrome on OS X.
363 | * Safari (but not Chrome) clips the cancel button when the search input has
364 | * padding (and `textfield` appearance).
365 | */
366 |
367 | input[type="search"]::-webkit-search-cancel-button,
368 | input[type="search"]::-webkit-search-decoration {
369 | -webkit-appearance: none;
370 | }
371 |
372 | /**
373 | * Define consistent border, margin, and padding.
374 | */
375 |
376 | fieldset {
377 | border: 1px solid #c0c0c0;
378 | margin: 0 2px;
379 | padding: 0.35em 0.625em 0.75em;
380 | }
381 |
382 | /**
383 | * 1. Correct `color` not being inherited in IE 8/9/10/11.
384 | * 2. Remove padding so people aren't caught out if they zero out fieldsets.
385 | */
386 |
387 | legend {
388 | border: 0; /* 1 */
389 | padding: 0; /* 2 */
390 | }
391 |
392 | /**
393 | * Remove default vertical scrollbar in IE 8/9/10/11.
394 | */
395 |
396 | textarea {
397 | overflow: auto;
398 | }
399 |
400 | /**
401 | * Don't inherit the `font-weight` (applied by a rule above).
402 | * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
403 | */
404 |
405 | optgroup {
406 | font-weight: bold;
407 | }
408 |
409 | /* Tables
410 | ========================================================================== */
411 |
412 | /**
413 | * Remove most spacing between table cells.
414 | */
415 |
416 | table {
417 | border-collapse: collapse;
418 | border-spacing: 0;
419 | }
420 |
421 | td,
422 | th {
423 | padding: 0;
424 | }
425 |
--------------------------------------------------------------------------------