This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 234476 - Detection of mappings
Summary: Detection of mappings
Status: NEW
Alias: None
Product: web
Classification: Unclassified
Component: CSS Preprocessors (SASS, LESS, ...) (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on: 228650
Blocks:
  Show dependency tree
 
Reported: 2013-08-16 05:12 UTC by Tomas Mysik
Modified: 2014-10-07 09:12 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2013-08-16 05:12:30 UTC
See issue #234472:

#2) I wish we tried to do a better job detecting sass compiler setting. In this instance running project produces in Browser Output error "Failed to load resource at http://localhost:8383/yeoman-testcase/styles/main.css" and we know that /styles/main.sass is in the same folder but was not compiled. We could offer user something along the lines "Do you want to enable and configure SASS compiler for /styles folder to compile SASS files into the same directory? [Y/N]"
Comment 1 Petr Jiricka 2013-08-16 06:56:24 UTC
I wonder if it would be possible (and if it would make sense) to detect the mapping by parsing the gruntfile?
Comment 2 David Konecny 2013-08-18 21:15:57 UTC
> I wonder if it would be possible (and if it would make sense) to detect the
> mapping by parsing the gruntfile?

That would be great but it also might be fairly difficult. Gruntfile.js is a JavaScript code and so it can contain any JS languge expression. Second issue is that different Grunt plugins can be used to handle SASS compilation, eg. compass, sass, etc. Have a look at grunt file which is in the testcase project in issue 234472. The SASS is defined in two sections:

compass: {
    files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
    tasks: ['compass:server']
},

compass: {
    options: {
        sassDir: '<%= yeoman.app %>/styles',
        cssDir: '.tmp/styles',
        generatedImagesDir: '.tmp/images/generated',
        imagesDir: '<%= yeoman.app %>/images',
        javascriptsDir: '<%= yeoman.app %>/scripts',
        fontsDir: '<%= yeoman.app %>/styles/fonts',
        importPath: '<%= yeoman.app %>/bower_components',
        httpImagesPath: '/images',
        httpGeneratedImagesPath: '/images/generated',
        httpFontsPath: '/styles/fonts',
        relativeAssets: false
    },
    dist: {
        options: {
            generatedImagesDir: '<%= yeoman.dist %>/images/generated'
        }
    },
    server: {
        options: {
            debugInfo: true
        }
    }
},
Comment 3 David Konecny 2013-08-18 21:20:39 UTC
> I wish we tried to do a better job detecting sass compiler setting.

I do not know how exactly we could do this but both Browser Concole and Network Monitor will report that some/path/ending.css was not found (and there is an API to listen on events from Console or Network). And then we do have a list of SASS files in project. And if sometimes there is a simple match we could prepopulate UI better. Instead of always showing SASS compiler with mapping /scss : /css. I would try to do this as long as it is simple and unobstrusive.
Comment 4 Tomas Mysik 2013-08-19 05:13:49 UTC
Comment #3 makes sense to me, I will try to investigate it a bit more...

Thanks.
Comment 5 Tomas Mysik 2014-10-07 09:12:55 UTC
Taking over, my area.