我使用angular 6创建了一个新模块,它将用作在另一个项目中使用的软件包。
现在,我正在尝试配置业力和茉莉花,以便可以在其上创建单元测试。问题是我发现该项目没有任何 if (isset($_GET['reg'])){
if ($_GET['reg']=='1'){
文件。
是否可以从命令行生成默认的angular.json
文件?
答案 0 :(得分:0)
您最好的选择是按照danday74的建议进行操作,并生成一个新项目,然后从该生成的项目中复制angular.json文件:
ng new project-name
快速检查“ ng”命令行选项不会显示任何用于独立生成新的angular.json的选项:
ng -h
Available Commands: add Add support for a library to your project. new Creates a new directory and a new Angular app. generate Generates and/or modifies files based on a schematic. update Updates your application and its dependencies. build Builds your app and places it into the output path (dist/ by default). serve Builds and serves your app, rebuilding on file changes. test Run unit tests in existing project. e2e Run e2e tests in existing project. lint Lints code in existing project. xi18n Extracts i18n messages from source code. run Runs Architect targets. eject Temporarily disabled. Ejects your app and output the proper webpack configuration and scripts. config Get/set configuration values. help Help. version Outputs Angular CLI version. doc Opens the official Angular API documentation for a given keyword.
您还可以根据documentation提供的Angular CLI project on Github手动创建自己的angular.json。