새로운 @angular/cli 버전의 angular-cli.json 파일은 어디에 있습니까?
angular2는 처음이고 cli를 사용하여 프로젝트를 작성하려고 했는데 angular-cli.json에 추가하는 css를 변경하려고 하면 이 파일이 작성되지 않은 것을 알게 되었습니다.
수동으로 작성할 수 있습니까?아니면 이 파일이 다른 파일로 변경되었습니까?
감사합니다!!
Angular 6 이후
angular-cli.json
파일 이름 변경/삭제 완료angular.json
버전 6의 Angular.
파일 형식만 다를 뿐 이름 변경은 아닙니다.
https://github.com/angular/angular-cli/wiki/angular-workspace
이 파일은 현재 unix/linux 시스템에서 숨김 파일로 변경되었습니다.지금이다..angular-cli.json
.
그angular-cli.json
는 프로젝트의 루트 폴더에 있어야 합니다.최신 버전을 사용하고 있습니다."@angular/cli": "1.0.0-beta.32.3"
.
만약 누락되거나 잘못 삭제되었을 경우 작성에 관해서는 오리지널 버전은 상당히 범용적이기 때문에 시도해 볼 수 있습니다.프로젝트 작성 직후의 모습을 다음에 나타냅니다.
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"version": "1.0.0-beta.32.3",
"name": "testproj"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"files": "src/**/*.ts",
"project": "src/tsconfig.json"
},
{
"files": "e2e/**/*.ts",
"project": "e2e/tsconfig.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
CLI를 사용하여 새 프로젝트를 생성해 볼 수도 있습니다.ng new PROJECT_NAME
에 포함되어 있는지 여부를 확인합니다.angular-cli.json
파일.
글로벌 CLI 설정을 찾고 있는 경우는, 다음의 Windows 를 참조해 주세요.
%USERPROFILE%\angular-config.json
설정 변경 예시
ng config -g cli.defaultCollection @angular-eslint/schematics
변경 내용이 여기에 저장됩니다.
C:\users\USERNAME-GOES-HERE\angular-config.json
{
"version": 1,
"cli": {
"defaultCollection": "@angular-eslint/schematics",
"packageManager": "yarn",
"warnings": {
"versionMismatch": false
}
}
}
언급URL : https://stackoverflow.com/questions/42395200/where-is-the-file-angular-cli-json-in-the-new-angular-cli-version
'programing' 카테고리의 다른 글
플라스크에서 양식 데이터를 얻는 방법은? (0) | 2023.03.13 |
---|---|
Angular.js vs 녹아웃.js vs Backbone.js (0) | 2023.03.13 |
react-select: 검사기에서 스타일링할 때 드롭다운을 열어두는 방법? (0) | 2023.03.08 |
파일 기반 H2 데이터베이스를 사용하도록 스프링 부트를 구성하는 방법 (0) | 2023.03.08 |
$resource 요청을 취소하는 방법 (0) | 2023.03.08 |