This project was generated with Angular CLI version 7.2.2. The following commands are fully tested with Linux bash. The project works on Linux/Windows/MacOS.
For Windows, the following Linux commands can directly run in git-bash.
Put the content html into src/assets
folder, and register the article topic, filename and date in src/assets/article.json
file.
Be sure to have Node.js installed. For portable Node.js, run export PATH=<NODE_HOME>:$PATH
(replace <NODE_HOME>
with the absolute path to Node.js root directory)
Run npm install -g @angular/cli angular-cli-ghpages
At the project root, run npm install
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build --prod --base-href "https://<ACCOUNT_ID>.github.io/<REPO>/"
to build the project. The build artifacts will be stored in the docs/
directory. If the URL is already customized, run with the actual URL instead, e.g., ng build --prod --base-href "https://lijianzhao.com"
Run cp docs/index.html docs/404.html
to copy docs/index.html
to docs/404.html
to handle page refresh/bookmark.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.