這是我爲在角度2中製作的項目製作的文件夾結構。我已經刪除了節點模塊文件夾和其他文件夾以便適合它。對於造型我只使用Bootstrap。我沒有使用Angular-CLI。任何人都可以指導我如何部署它?我應該使用吞嚥嗎?我的步驟應該是什麼。我已經通過了很多關於stackoverflow的答案,但都使用了GULP和CLI。是否必須同時使用,如果是的話請指導如何實現部署。可悲的是,在Anular2官方網站上沒有提到關於部署的內容。歡迎任何幫助,指導和建議。如何在不使用CLI的情況下部署Angular2項目
|--app
| |-- logo.png
| |-- components
| | |-- main.component.ts
| | |-- config.component.ts
| | |-- download-resources.component.ts
| | |-- header-footer.component.ts
| | |-- licence.component.ts
| | |-- menu-bar.component.ts
| | |-- process-status.component.ts
| | |-- release-history.component.ts
| | |-- upload-release.component.ts
| | `-- version.component.ts
| |-- main
| | `--module.ts
| |-- main.ts
| |-- models
| | |-- config.model.ts
| | |-- meta-info.model.ts
| | |-- process-status.model.ts
| | `-- version.model.ts
| |-- services
| | |-- cc-info.service.ts
| | |-- config.service.ts
| | |-- release-history.service.ts
| | |-- shared.service.ts
| | |-- upload-release.service.ts
| | `-- version.service.ts
| `-- template
| |-- download-resources.component.html
| |-- licence.component.html
| |-- license-info.component.html
| |-- machines.component.html
| |-- menu-bar.component.html
| |-- process-status.component.html
| |-- release-history.component.html
| |-- topology-info.component.html
| |-- topology-upload.template.html
| |-- upload-release.component.html
| `-- version.component.html
|-- index.html
|-- package.json
|-- styles.css
|-- systemjs.config.js
|-- tsconfig.json
`-- typings.json
這是我system.config.js文件:
(function (global) {
System.config({
// DEMO ONLY! REAL CODE SHOULD NOT TRANSPILE IN THE BROWSER
transpiler: 'ts',
typescriptOptions: {
tsconfig: true
},
meta: {
'typescript': {
"exports": "ts"
}
},
paths: {
// paths serve as alias
'npm:': 'node_module'
},
// map tells the System loader where to look for things
map: {
// our app is within the app folder
app: 'main-app',
// angular bundles
'@angular/core': 'npm:@angular/core/bundles/core.umd.js',
'@angular/common': 'npm:@angular/common/bundles/common.umd.js',
'@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
'@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
'@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
'@angular/http': 'npm:@angular/http/bundles/http.umd.js',
'@angular/router': 'npm:@angular/router/bundles/router.umd.js',
'@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
'@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
// other libraries
'ng2-file-upload' : 'npm:ng2-file-upload',
'rxjs': 'npm:rxjs',
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
'ts': 'npm:[email protected]/lib/plugin.js',
'typescript': 'npm:[email protected]/lib/typescript.js',
},
// packages tells the System loader how to load when no filename and/or no extension
packages: {
app: {
main: './main.ts',
defaultExtension: 'ts'
},
rxjs: {
defaultExtension: 'js'
},
'angular-in-memory-web-api': {
main: './index.js',
defaultExtension: 'js'
},
'ng2-file-upload':{
main: 'ng2-file-upload.js',
defaultExtension: 'js'
}
}
});
})(this);