Skip to content

ng new --style=compass not working #1685

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
experimenti opened this issue Aug 14, 2016 · 11 comments · Fixed by #1749
Closed

ng new --style=compass not working #1685

experimenti opened this issue Aug 14, 2016 · 11 comments · Fixed by #1749

Comments

@experimenti
Copy link

os: darwin x64
angular cli: 1.0.0-beta11-webpack.2
node: 4.2.1

To reproduce:

  1. ng new fooproj --style=compass
  2. ng build
  3. ng serve

=> runtime error: (page fails to render)
Uncaught Error: Expected 'styles' to be an array of strings. (assertions.js 20)

Notes:

  1. --style=sass works as expected
  2. ng get defaults => "styleExt":"compass"
  3. Flailing around: tried npm install --save-dev angular-cli@webpack & ng init to no benefit.
  4. how can i use compasss with cli #784 how can i use compasss with cli #784 and Compass Not Working #1162 Compass Not Working #1162 were closed with Merge Webpack Feature branch into Master #1455 webpack merge.
@filipesilva
Copy link
Contributor

As far as I can tell, we've actually dropped support for compass per se. I'll update the README.

@saulshanabrook
Copy link

saulshanabrook commented Nov 3, 2016

Do you have any advice for this bug for scss?

@filipesilva
Copy link
Contributor

@saulshanabrook scss should work out of the box. See https://github.com/angular/angular-cli#css-preprocessor-integration for information. If it doesn't please do open a new issue for it so we can fix.

@neha-s16
Copy link

neha-s16 commented Jan 16, 2017

@filipesilva I need to use css sprites (svg and png with angular-cli) any options for that?

@filipesilva
Copy link
Contributor

@neha-s16 it should work out of the box really. Let me know if it doesn't

@neha-s16
Copy link

neha-s16 commented Jan 16, 2017

@filipesilva Thanks for prompt response. Which folder should I keep the svgs / images in for it to work and create sprites? I need to know the out folder as well since i would need to include it in styles.scss file. I am using the default project structure and default angular-cli.json.

@filipesilva
Copy link
Contributor

@neha-s16 if you're referencing them from css/sass files you can keep them wherever you feel like. The build system will pull them up and rename them and it should just work.

If you need to link them from elsewhere or use it in html img tags, then put it in src/assets. It will be copied over to dist/assets so it shouldn't make a difference in your relative path. If you need more folders to be copied over, open angular-cli.json and add it to the assets/ array.

@neha-s16
Copy link

Doesn't look like its working. My images are in assets/images/common/normal and assets/images/common/retina. I used ng build to build the project and it copied all images in dist/ folders but did not generate the normal.png and retina.png sprites as I expected.

@filipesilva
Copy link
Contributor

I might be misunderstanding the issue then. Can you open a new issue with a repro so I can test please?

@neha-s16
Copy link

#4054 New Issue.

@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants