node-sass-json-importer

Angular: parsing JSON variables to SCSS causes unit tests(karma) to fail

半腔热情 提交于 2020-08-10 19:31:09
问题 In my angular app, I am trying to use data from a json file into scss and I followed the solution provided here by Christos Lytara Angular: How to parse JSON variables into SCSS Error Screenshot I have tried this for my application and it works fine! But my unit test cases are failing. I am getting this error. Can someone please advise. ERROR in ./src/app/components/get-to-know/get-to-know.component.scss Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Invalid CSS

Angular: parsing JSON variables to SCSS causes unit tests(karma) to fail

假如想象 提交于 2020-08-10 19:30:01
问题 In my angular app, I am trying to use data from a json file into scss and I followed the solution provided here by Christos Lytara Angular: How to parse JSON variables into SCSS Error Screenshot I have tried this for my application and it works fine! But my unit test cases are failing. I am getting this error. Can someone please advise. ERROR in ./src/app/components/get-to-know/get-to-know.component.scss Module build failed (from ./node_modules/sass-loader/dist/cjs.js): SassError: Invalid CSS

Angular: How to parse JSON variables into SCSS

你离开我真会死。 提交于 2020-06-11 20:08:49
问题 Within an Angular application, I do D3 visuals through either plain D3 or Vega. There's also SCSS styling going on. I'd like to be able to refer to the same global variables for styling from Javascript and from SCSS. JSON files do the trick very well for storing settings that I load into Typescript through a simple import statement. But how does one go about doing the same from SCSS ? node-sass-json-importer seems like a good candidate but adding it to an Angular 9 CLI application isn't

Angular: How to parse JSON variables into SCSS

馋奶兔 提交于 2020-06-11 20:08:09
问题 Within an Angular application, I do D3 visuals through either plain D3 or Vega. There's also SCSS styling going on. I'd like to be able to refer to the same global variables for styling from Javascript and from SCSS. JSON files do the trick very well for storing settings that I load into Typescript through a simple import statement. But how does one go about doing the same from SCSS ? node-sass-json-importer seems like a good candidate but adding it to an Angular 9 CLI application isn't