Angular CLI 설치
[root@spring2-vm ~]# npm install -g angular-cli
sanse-angular-app 프로젝트 생성
[root@spring2-vm ~]# ng new sanse-angular-app As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after. To disable this warning use "ng set --global warnings.packageDeprecation=false". installing ng2 create .editorconfig create README.md create src/app/app.component.css create src/app/app.component.html create src/app/app.component.spec.ts create src/app/app.component.ts create src/app/app.module.ts create src/assets/.gitkeep create src/environments/environment.prod.ts create src/environments/environment.ts create src/favicon.ico create src/index.html create src/main.ts create src/polyfills.ts create src/styles.css create src/test.ts create src/tsconfig.json create angular-cli.json create e2e/app.e2e-spec.ts create e2e/app.po.ts create e2e/tsconfig.json create .gitignore create karma.conf.js create package.json create protractor.conf.js create tslint.json Successfully initialized git. Installing packages for tooling via npm. Installed packages for tooling via npm. Project 'sanse-angular-app' successfully created. [root@spring2-vm ~]#
개발서버 시작
[root@spring2-vm ~]# cd sanse-angular-app/ [root@spring2-vm sanse-angular-app]# ng serve --host 0.0.0.0 --port 4201 --live-reload-port 49153 As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after. To disable this warning use "ng set --global warnings.packageDeprecation=false". fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" ** NG Live Development Server is running on http://0.0.0.0:4201. ** Hash: bf1bfec00dd6eb8f5139 Time: 11027ms chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 248 kB {4} [initial] [rendered] chunk {1} main.bundle.js, main.bundle.map (main) 3.93 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.map (styles) 9.71 kB {4} [initial] [rendered] chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 2.63 MB [initial] [rendered] chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered] webpack: Compiled successfully.
운영서버 배포를 위한 빌드
[root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# ng build As a forewarning, we are moving the CLI npm package to "@angular/cli" with the next release, which will only support Node 6.9 and greater. This package will be officially deprecated shortly after. To disable this warning use "ng set --global warnings.packageDeprecation=false". fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" fallbackLoader option has been deprecated - replace with "fallback" loader option has been deprecated - replace with "use" Hash: fade5f59371bc166b53c Time: 10034ms chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 248 kB {4} [initial] [rendered] chunk {1} main.bundle.js, main.bundle.map (main) 3.92 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.map (styles) 9.71 kB {4} [initial] [rendered] chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 2.39 MB [initial] [rendered] chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered] [root@spring2-vm sanse-angular-app]# ls angular-cli.json e2e node_modules protractor.conf.js src dist karma.conf.js package.json README.md tslint.json [root@spring2-vm sanse-angular-app]#
Github 에 올리기
[root@spring2-vm sanse-angular-app]# rm -rf .git [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git remote -v fatal: Not a git repository (or any of the parent directories): .git [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git remote add origin https://github.com/Sanses/sanse-angular-app.git [root@spring2-vm sanse-angular-app]# git status # On branch master nothing to commit, working directory clean [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git branch * master [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git remote -v origin https://github.com/Sanses/sanse-angular-app.git (fetch) origin https://github.com/Sanses/sanse-angular-app.git (push) [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git pull origin master [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git add . [root@spring2-vm sanse-angular-app]# git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: .editorconfig # new file: .gitignore # new file: README.md # new file: angular-cli.json # new file: e2e/app.e2e-spec.ts # new file: e2e/app.po.ts # new file: e2e/tsconfig.json # new file: karma.conf.js # new file: package.json # new file: protractor.conf.js # new file: src/app/app.component.css # new file: src/app/app.component.html # new file: src/app/app.component.spec.ts # new file: src/app/app.component.ts # new file: src/app/app.module.ts # new file: src/assets/.gitkeep # new file: src/environments/environment.prod.ts # new file: src/environments/environment.ts # new file: src/favicon.ico # new file: src/index.html # new file: src/main.ts # new file: src/polyfills.ts # new file: src/styles.css # new file: src/test.ts # new file: src/tsconfig.json # new file: tslint.json # [root@spring2-vm sanse-angular-app]# [root@spring2-vm sanse-angular-app]# git commit -m "sanse-angluar-app first commit" [master (root-commit) acf59be] sanse-angluar-app first commit Committer: root <root@spring2-vm.nxcdbgh0ireenke3hbaucanybh.syx.internal.cloudapp.net> Your name and email address were configured automatically based on your username and hostname. Please check that they are accurate. You can suppress this message by setting them explicitly: git config --global user.name "Your Name" git config --global user.email you@example.com After doing this, you may fix the identity used for this commit with: git commit --amend --reset-author 26 files changed, 620 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 README.md create mode 100644 angular-cli.json create mode 100644 e2e/app.e2e-spec.ts create mode 100644 e2e/app.po.ts create mode 100644 e2e/tsconfig.json create mode 100644 karma.conf.js create mode 100644 package.json create mode 100644 protractor.conf.js create mode 100644 src/app/app.component.css create mode 100644 src/app/app.component.html create mode 100644 src/app/app.component.spec.ts create mode 100644 src/app/app.component.ts create mode 100644 src/app/app.module.ts create mode 100644 src/assets/.gitkeep create mode 100644 src/environments/environment.prod.ts create mode 100644 src/environments/environment.ts create mode 100644 src/favicon.ico create mode 100644 src/index.html create mode 100644 src/main.ts create mode 100644 src/polyfills.ts create mode 100644 src/styles.css create mode 100644 src/test.ts create mode 100644 src/tsconfig.json create mode 100644 tslint.json [root@spring2-vm sanse-angular-app]# git push -u origin master Username for 'https://github.com': sooabia@gmail.com Password for 'https://sooabia@gmail.com@github.com': Counting objects: 34, done. Delta compression using up to 2 threads. Compressing objects: 100% (30/30), done. Writing objects: 100% (33/33), 9.75 KiB | 0 bytes/s, done. Total 33 (delta 2), reused 0 (delta 0) remote: Resolving deltas: 100% (2/2), done. To https://github.com/Sanses/sanse-angular-app.git 85e7109..67689ca master -> master Branch master set up to track remote branch master from origin. [root@spring2-vm sanse-angular-app]#
Github 확인
0 Comments