moved the less library (was: lessc, due to patched less library used by this plugin) dependency to the top define() and use the regular LESS library from now on.
moved the less library (was: lessc, due to patched less library used by this plugin) dependency to the top define() and use the regular LESS library from now on.

Note that this requires some path and prefix mapping as I couldn't get requireJS to coorperate where two different 'less.js' files in different directories serve different purposes (and one is dependent on the other!)

requireJS config snippet:

    require.config({
        ...
        map: {
        	'*': {
        		// map require plugins
        		// - these were a bitch to get right! it's all fine and dandy except LESS where we of course want LESS itself and require/less:
        		//   it turned out that requireJS treats require/less as less if you map it as less->require/less and/or just call the require
        		//   plugin anything/LESS. So we call that one less2css so we can have regular LESS remain LESS.
        		//   Also, we had to rename the require plugin file to LESS2CSS.JS for this to work.
        		//
        		//   Conclusion: requireJS 'works' when you don't have any filename collisions when you'ld place all relevant files in a single directory.
        		//   UNLESS I missed some obvious requireJS option in here...
    	        'css': 'require/css',
    	        'less2css': 'require/less',
    	        'text': 'require/text',
    	        'domReady': 'require/domReady',
    	        'normalize': 'require/normalize',

    	        ...
        	}
        }
    });

    ...

    // Start the main app logic.
    require([ 'exports'
    		, 'require/css'
    		, 'require/less'
    		, 'require/text'
    		, 'require/domReady'
            , ...
    		, 'less'   // we are using LESS in the app itself as well!

    		// and load the style sheets, processed through LESS:
    		, 'css!styles/css/reset'
    		, 'less2css!styles/less/reveal-root'
    		], function (...) { ... });

GerHobbelt/require-less,GerHobbelt/require-less,GerHobbelt/require-less