-
Notifications
You must be signed in to change notification settings - Fork 0
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 445d256
Showing
95 changed files
with
5,116 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,64 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"project": { | ||
"name": "cms" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "main.ts", | ||
"polyfills": "polyfills.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.app.json", | ||
"testTsconfig": "tsconfig.spec.json", | ||
"prefix": "app", | ||
"styles": [ | ||
"styles.css", | ||
"../node_modules/layui-src/dist/css/layui.css", | ||
"../node_modules/bootstrap/dist/css/bootstrap.css" | ||
], | ||
"scripts": [ | ||
"../node_modules/jquery/dist/jquery.min.js" | ||
], | ||
"environmentSource": "environments/environment.ts", | ||
"environments": { | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"lint": [ | ||
{ | ||
"project": "src/tsconfig.app.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "src/tsconfig.spec.json", | ||
"exclude": "**/node_modules/**" | ||
}, | ||
{ | ||
"project": "e2e/tsconfig.e2e.json", | ||
"exclude": "**/node_modules/**" | ||
} | ||
], | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"styleExt": "css", | ||
"component": {} | ||
} | ||
} |
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,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
testem.log | ||
/typings | ||
|
||
# e2e | ||
/e2e/*.js | ||
/e2e/*.map | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
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,32 @@ | ||
# jyz-Cms | ||
cms系统(包含天气,文章等页面),使用了Angular5, bootstrap, layui, bootstrap等 | ||
请先在终端/控制台窗口中运行命令 node -v 和 npm -v,来验证一下你正在运行 node 6.9.x 和 npm 3.x.x 以上的版本。 更老的版本可能会出现错误,更新的版本则没问题。 | ||
需要先安装 [Angular CLI](https://github.com/angular/angular-cli) version 1.6.3. | ||
|
||
## 安装系统 | ||
先下载代码到jyz-cms文件夹 | ||
```控制台 | ||
$ cd jyz-cms | ||
# 安装包 | ||
$ npm install | ||
# 开始运行系统, 在浏览器输入地址 `http://localhost:4200/` 即可使用 | ||
$ npm start | ||
# 编译系统,编译后文件会放在根目录的dist文件夹里 | ||
# 编译后的文件,加上.htaccess文件就可以正常访问使用了 | ||
$ npm run build | ||
## Development server | ||
``` | ||
|
||
```.htacess文件 | ||
RewriteEngine on | ||
# Don't rewrite files or directories | ||
RewriteCond %{REQUEST_FILENAME} -f [OR] | ||
RewriteCond %{REQUEST_FILENAME} -d | ||
RewriteRule ^ - [L] | ||
# Rewrite everything else to index.html to allow html5 state links | ||
RewriteRule ^ index.html [L] | ||
``` | ||
|
||
##关于本项目 | ||
有关问题和建议可以发送邮箱联系作者[email protected],谢谢~ |
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 @@ | ||
import { AppPage } from './app.po'; | ||
|
||
describe('cms App', () => { | ||
let page: AppPage; | ||
|
||
beforeEach(() => { | ||
page = new AppPage(); | ||
}); | ||
|
||
it('should display welcome message', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('Welcome to app!'); | ||
}); | ||
}); |
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,11 @@ | ||
import { browser, by, element } from 'protractor'; | ||
|
||
export class AppPage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getParagraphText() { | ||
return element(by.css('app-root h1')).getText(); | ||
} | ||
} |
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 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/e2e", | ||
"baseUrl": "./", | ||
"module": "commonjs", | ||
"target": "es5", | ||
"types": [ | ||
"jasmine", | ||
"jasminewd2", | ||
"node" | ||
] | ||
} | ||
} |
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,33 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular/cli'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage-istanbul-reporter'), | ||
require('@angular/cli/plugins/karma') | ||
], | ||
client:{ | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
coverageIstanbulReporter: { | ||
reports: [ 'html', 'lcovonly' ], | ||
fixWebpackSourcePaths: true | ||
}, | ||
angularCli: { | ||
environment: 'dev' | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
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,54 @@ | ||
{ | ||
"name": "cms", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build --prod", | ||
"test": "ng test", | ||
"lint": "ng lint", | ||
"e2e": "ng e2e" | ||
}, | ||
"private": true, | ||
"dependencies": { | ||
"@angular/animations": "^5.0.0", | ||
"@angular/common": "^5.0.0", | ||
"@angular/compiler": "^5.0.0", | ||
"@angular/core": "^5.0.0", | ||
"@angular/forms": "^5.0.0", | ||
"@angular/http": "^5.0.0", | ||
"@angular/platform-browser": "^5.0.0", | ||
"@angular/platform-browser-dynamic": "^5.0.0", | ||
"@angular/router": "^5.0.0", | ||
"@angular-devkit/core": "0.0.28", | ||
"@ng-bootstrap/ng-bootstrap": "^1.0.0-beta.9", | ||
"bootstrap": "^3.3.7", | ||
"core-js": "^2.4.1", | ||
"jquery": "^2.2.4", | ||
"layui-src": "^2.2.5", | ||
"rxjs": "^5.5.2", | ||
"zone.js": "^0.8.14" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "1.6.3", | ||
"@angular/compiler-cli": "^5.0.0", | ||
"@angular/language-service": "^5.0.0", | ||
"@types/jasmine": "~2.5.53", | ||
"@types/jasminewd2": "~2.0.2", | ||
"@types/node": "~6.0.60", | ||
"codelyzer": "^4.0.1", | ||
"jasmine-core": "~2.6.2", | ||
"jasmine-spec-reporter": "~4.1.0", | ||
"karma": "~1.7.0", | ||
"karma-chrome-launcher": "~2.1.1", | ||
"karma-cli": "~1.0.1", | ||
"karma-coverage-istanbul-reporter": "^1.2.1", | ||
"karma-jasmine": "~1.1.0", | ||
"karma-jasmine-html-reporter": "^0.2.2", | ||
"protractor": "~5.1.2", | ||
"ts-node": "~3.2.0", | ||
"tslint": "~5.7.0", | ||
"typescript": "~2.4.2" | ||
} | ||
} |
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,28 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
const { SpecReporter } = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./e2e/**/*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
onPrepare() { | ||
require('ts-node').register({ | ||
project: 'e2e/tsconfig.e2e.json' | ||
}); | ||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: 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,16 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
const routes: Routes = [ | ||
{ path: '', loadChildren: './layout/layout.module#LayoutModule'}, | ||
{ path: 'article', loadChildren: './article/article.module#ArticleModule' }, | ||
{ path: 'one-stop', loadChildren: './one-stop/one-stop.module#OneStopModule' }, | ||
{ path: 'not-found', loadChildren: './not-found/not-found.module#NotFoundModule' }, | ||
{ path: '**', redirectTo: 'not-found' } | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ RouterModule.forRoot(routes) ], | ||
exports: [ RouterModule ] | ||
}) | ||
export class AppRoutingModule {} |
Empty file.
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 @@ | ||
<router-outlet></router-outlet> |
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 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent implements OnInit{ | ||
constructor() { | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
} |
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 @@ | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { NgModule } from '@angular/core'; | ||
|
||
import { AppRoutingModule } from './app-routing.module'; | ||
import { AppComponent } from './app.component'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
], | ||
imports: [ | ||
BrowserModule, | ||
AppRoutingModule | ||
], | ||
providers: [], | ||
bootstrap: [AppComponent] | ||
}) | ||
export class AppModule { } |
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,23 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
import { ArticleComponent } from './article.component'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: ArticleComponent, | ||
children: [ | ||
{ path: '', redirectTo: 'list' }, | ||
{ path: 'list', loadChildren: './list/list.module#ListModule' }, | ||
{ path: 'detail', loadChildren: './detail/detail.module#DetailModule' }, | ||
{ path: 'weather', loadChildren: './weather/weather.module#WeatherModule' }, | ||
{ path: 'code', loadChildren: './code/code.module#CodeModule' }, | ||
] | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class ArticleRoutingModule {} |
Oops, something went wrong.