Skip to content

ng set defaults.styleExt scss corrupts environments in angular-cli.json #4064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ernest-rhinozeros opened this issue Jan 17, 2017 · 2 comments

Comments

@ernest-rhinozeros
Copy link

OS?

Linux (Ubuntu 16.04.1 LTS)

Versions.

angular-cli: 1.0.0-beta.25.5
node: 6.9.4
os: linux x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3

Repro steps.

> mkdir foo
> ng init
> ng set defaults.styleExt scss
> git diff

The log given by the failure.

no failure

Mention any other details that might be useful.

I haven't touched angular-cli.json, after the above mentioned command it resulted in this:

{
  "project": {
    "version": "1.0.0-beta.25.5",
    "name": "foo"
  },
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [
  "assets",
  "favicon.ico"
],
      "index": "index.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "app",
      "mobile": false,
      "styles": [
        "styles.css"
      ],
      "scripts": [
      ],
      "environments": {
        "source": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"},
        "dev": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"},
        "prod": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"}
      }
    }
  ],
  "addons": [
  ],
  "packages": [
  ],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "scss",
    "prefixInterfaces": false,
    "inline": {
      "style": false,
      "template": false
    },
    "spec": {
      "class": false,
      "component": true,
      "directive": true,
      "module": false,
      "pipe": true,
      "service": true
    }
  }
}

here is a git diff:

diff --git a/angular-cli.json b/angular-cli.json
index 5af2798..6993355 100644
--- a/angular-cli.json
+++ b/angular-cli.json
@@ -8,9 +8,9 @@
       "root": "src",
       "outDir": "dist",
       "assets": [
-        "assets",
-        "favicon.ico"
-      ],
+  "assets",
+  "favicon.ico"
+],
       "index": "index.html",
       "main": "main.ts",
       "test": "test.ts",
@@ -20,16 +20,19 @@
       "styles": [
         "styles.css"
       ],
-      "scripts": [],
+      "scripts": [
+      ],
       "environments": {
-        "source": "environments/environment.ts",
-        "dev": "environments/environment.ts",
-        "prod": "environments/environment.prod.ts"
+        "source": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"},
+        "dev": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"},
+        "prod": {"source":"environments/environment.ts","dev":"environments/environment.ts","prod":"environments/environment.prod.ts"}
       }
     }
   ],
-  "addons": [],
-  "packages": [],
+  "addons": [
+  ],
+  "packages": [
+  ],
   "e2e": {
     "protractor": {
       "config": "./protractor.conf.js"
@@ -41,7 +44,7 @@
     }
   },
   "defaults": {
-    "styleExt": "css",
+    "styleExt": "scss",
     "prefixInterfaces": false,
     "inline": {
       "style": false,
(END)
@filipesilva
Copy link
Contributor

Dupe of #4044, but thank you for taking the time to report it.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants