yeoman / generator-webapp_DEPRECATED

Yeoman generator that scaffolds out a front-end web app
http://yeoman.io
974 stars 310 forks source link

problems installing compass & susy in webapp yeoman generator. #624

Closed primerproyecto closed 8 years ago

primerproyecto commented 8 years ago

Any kind of help with this issue will be appreciated. My goal is to scaffol a project with compass, susy and breakpoint using Yeoman (grunt+bower+yo).

What i have done so far is installing the webapp generator and it works well. After that, i`ve installed compass (https://github.com/yeoman/generator-webapp/blob/master/docs/recipes/compass.md) and every thing seens to work. I can use compass mixins and so on. But when i try to install susy, i get the same error

Error: File to import not found or unreadable: bower_components/susy/sass/_susy.scss.\A 
Load paths:\A 
/Applications/MAMP/htdocs/github/yeoman-compass/bower_components
\A Compass::SpriteImporter\A /Applications/MAMP/htdocs/github/yeoman-compass/app/styles
\A /usr/local/lib/ruby/gems/2.2.0/gems/compass-core-1.0.3/stylesheets
\A /usr/local/lib/ruby/gems/2.2.0/gems/compass-normalize-1.5/stylesheets
\A /usr/local/lib/ruby/gems/2.2.0/gems/susy-2.2.7/sass
\A on line 2 of /Applications/MAMP/htdocs/github/yeoman-compass/app/styles/main.scss
\A \A 1: // bower:scss
\A 2: @import \"bower_components/susy/sass/_susy.scss\";
\A 3: // endbower\A 4: \A 5: body {\A 6: background: #fafafa;
\A 7: font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;

I got the same error if i install susy, and breakpoint firts and later compass.

Any kind of help will be helpful. Thanks in advance

silvenon commented 8 years ago

Try this:

  options: {
    sassDir: '<%= config.app %>/styles',
    cssDir: '.tmp/styles',
    imagesDir: '<%= config.app %>/images',
    javascriptsDir: '<%= config.app %>/scripts',
    fontsDir: '<%= config.app %>/fonts',
    generatedImagesDir: '.tmp/images/generated',
-   importPath: 'bower_components',
+   importPath: '.',
    httpImagesPath: '../images',
    httpGeneratedImagesPath: '../images/generated',
    httpFontsPath: '../fonts',
    relativeAssets: false,
    assetCacheBuster: false
  },
primerproyecto commented 8 years ago

:+1: Hi @silvenon ...you´ve nailed it. Now it works so thank you very much. I´m a new yeoman user and your help comes in really handy. Now i can use compass within yeoman, susy and the rest of the libraries; grunt makes it neat and easy.

Every time i make a change in scss files..i get the same warning message about jit-grunt and autoprefixer

Completed in 4.253s at Thu Dec 03 2015 13:06:52 GMT+0100 (CET) - Waiting...
>> File "app/styles/main.scss" changed.
Running "compass:server" (compass) task write .tmp/styles/main.css (1.886s)
jit-grunt: Plugin for the "autoprefixer" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings
Warning: Task "autoprefixer" failed. Use --force to continue.
Aborted due to warnings.

Thougt that warning message...i can grunt serve and grunt build and browse the page well and without any kind of warning message on console, so not pretty sure if that is really important. Thanks once again

silvenon commented 8 years ago
compass: {
  files: ['<%= config.app %>/styles/{,*/}*.{scss,sass}'],
- tasks: ['compass:server', 'autoprefixer']
+ tasks: ['compass:server', 'postcss']
 },
primerproyecto commented 8 years ago

:+1: Neat and sweet ... thanks once again