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.
Summary: | Detection of mappings | ||
---|---|---|---|
Product: | web | Reporter: | Tomas Mysik <tmysik> |
Component: | CSS Preprocessors (SASS, LESS, ...) | Assignee: | Tomas Mysik <tmysik> |
Status: | NEW --- | ||
Severity: | normal | CC: | dkonecny, pjiricka |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | 228650 | ||
Bug Blocks: |
Description
Tomas Mysik
2013-08-16 05:12:30 UTC
I wonder if it would be possible (and if it would make sense) to detect the mapping by parsing the gruntfile? > 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
}
}
},
> 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 #3 makes sense to me, I will try to investigate it a bit more... Thanks. Taking over, my area. |