Skip to content

steve000/Jhipster-Angular-4

Repository files navigation

开发运行环境

如何运行

1、在根目录下运行yarn install安装相关依赖;

注:在yarn install 时候,安装node-sass异常,解决办法如下(lmk123/blog#28):

set SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install -g node-sass

如果报phantomjs相关的错,可使用迅雷等下载工具将zip文件下载到相应的临时目录:

https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-windows.zip

2、运行yarn start

开发

可以使用Angular CLI来生成代码,例如:

ng generate component my-component

会生成这些文件:

create src/app/my-component/my-component.component.html
create src/app/my-component/my-component.component.ts
update src/app/app.module.ts

或者在工程里复制blank目录,修改为自己的模块名,并修改src/app/app.module.ts将模块添加进去。

如果修改了src/content/vendor.css文件,需要运行yarn run webpack:build重新build一下vendor。

目录结构说明

测试

单元测试使用Karma+Jasmine,测试代码在test/javascript,运行如下命令进行测试:

yarn test

代码规范

tslint.json配置代码规范,运行如下命令进行代码检查:

yarn lint

运行如下命令自动处理不符合规范的代码(并不是所有的地方都会自动处理):

yarn lint:fix

发布

运行如下命令发布产品,发布的代码在target/www目录下。

yarn run webpack:prod

About

A Yeoman generator ,Spring Boot + Angular河长制项目

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published