• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

How to configure grunt file to generate source maps with LESS ?

Scheduled Pinned Locked Moved Technical Support
3 Posts 3 Posters 1.2k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nightwave
    wrote on last edited by nightwave
    #1

    Hi, i want to configure grunt file to generate source maps compatible with FireFox Developer Tools.
    Tried add this to grunt.js:

    grunt.initConfig({
    	watch: {
    		options: {
    				strictImports : true,
    				sourceMap: true,
    			        sourceMapFilename: 'public/stylesheet.css.map',
    				sourceMapURL: 'http://127.0.0.1:4567/stylesheet.css.map'
    			}
    		lessUpdated_Client: {
    			files: [
    				'public/*.less',
    				'node_modules/nodebb-*/*.less', 'node_modules/nodebb-*/**/*.less',
    				'!node_modules/nodebb-*/node_modules/**',
    				'!node_modules/nodebb-*/.git/**'
    			]
    		},
    
    1 Reply Last reply
    0
  • frissdiegurkeF Offline
    frissdiegurkeF Offline
    frissdiegurke Plugin & Theme Dev
    wrote on last edited by
    #2

    Grunt is not compiling the less files of NodeBB. It just watches changes and notifies (or restarts) NodeBB. NodeBB itself manages the compilation of LESS files.
    I assume this would be the place to add such options.

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #3

    If you're interested in tackling this issue, note that the UglifyJS version we use may not produce working source maps.

    The source map also has to be able to access libraries from node_modules/, so that's another complication.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development