Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LESS mapping doesn't work in Chrome DevTools #30

Closed
borekb opened this issue May 17, 2017 · 4 comments
Closed

LESS mapping doesn't work in Chrome DevTools #30

borekb opened this issue May 17, 2017 · 4 comments
Labels

Comments

@borekb
Copy link
Contributor

borekb commented May 17, 2017

Steps to reproduce (I'm on Windows 10, tried Chrome 58 and 60):

Create an empty folder, pingy init in it, choose HTML + LESS, let it scaffold everything.

$ pingy init                                                                                                      
0.6.6 (global)                                                                                                    
  ____  _                                                                                                         
 |  _ \(_)_ __   __ _ _   _                                                                                       
 | |_) | | '_ \ / _` | | | |                                                                                      
 |  __/| | | | | (_| | |_| |                                                                                      
 |_|   |_|_| |_|\__, |\__, |                                                                                      
                |___/ |___/                                                                                       
                                                                                                                  
                                                                                                                  
? What document format do you wish to use HTML                                                                    
? What styles format do you wish to use Less                                                                      
? What scripts format do you wish to use JS                                                                       
? Choose the folder name to export compiled files to dist                                                         
This utility will walk you through creating a package.json file.                                                  
It only covers the most common items, and tries to guess sensible defaults.                                       
                                                                                                                  
See `npm help json` for definitive documentation on these fields                                                  
and exactly what they do.                                                                                         
                                                                                                                  
Use `npm install <pkg> --save` afterwards to install a package and                                                
save it as a dependency in the package.json file.                                                                 
                                                                                                                  
Press ^C at any time to quit.                                                                                     
name: (lessmapping)                                                                                               
version: (1.0.0)                                                                                                  
description:                                                                                                      
entry point: (index.js)                                                                                           
test command:                                                                                                     
git repository:                                                                                                   
keywords:                                                                                                         
author:                                                                                                           
license: (ISC)                                                                                                    
About to write to c:\Dev\temp\lessmapping\package.json:                                                           
                                                                                                                  
{                                                                                                                 
  "name": "lessmapping",                                                                                          
  "version": "1.0.0",                                                                                             
  "description": "",                                                                                              
  "main": "index.js",                                                                                             
  "scripts": {                                                                                                    
    "test": "echo \"Error: no test specified\" && exit 1"                                                         
  },                                                                                                              
  "author": "",                                                                                                   
  "license": "ISC"                                                                                                
}                                                                                                                 
                                                                                                                  
                                                                                                                  
Is this ok? (yes)                                                                                                 
√ Pingy scripts added to package.json                                                                             
√ Created .pingy.json                                                                                             
? Do you want Pingy to scaffold the following files for you? Yes                                                  
? The most important question: Tabs or spaces 2 spaces                                                            
√ Site files scaffolded                                                                                           
                                                                                                                  
Ready to install dependencies.                                                                                    
                                                                                                                  
Command that will now be run:                                                                                     
  > npm install --save-dev @pingy/cli less                                                                        
                                                                                                                  
? Run this command now? Yes                                                                                       
lessmapping@1.0.0 c:\Dev\temp\lessmapping                                                                         
+-- @pingy/cli@0.6.6                                                                 
>> LONG NPM OUTPUT HERE <<                             
                                                                                                                  
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):    
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch
":"any"} (current: {"os":"win32","arch":"x64"})                                                                   
npm WARN lessmapping@1.0.0 No description                                                                         
npm WARN lessmapping@1.0.0 No repository field.                                                                   
√ Dependencies installed                                                                                          

Run pingy dev and open DevTools. LESS mapping works, so far so good!

image

Clicking on styles\main.less, being prompted to add files into workspace:

image

I've done that:

image

But when I go to Elements again, click main.less and edit the color, it's clearly not mapped:

image

Trying to create a mapping:

image

image

But it still doesn't work (is probably not mapped; I don't know how to tell for sure):

image

I've also tried the mapping the other way around but it doesn't work either:

image

Just to make sure, editing the value in the .less file on the disk indeed works:

image

Could the backslashes be the problem? For example, this looks slightly suspicious:

image

borekb added a commit to borekb/pingy-cli that referenced this issue May 17, 2017
@borekb
Copy link
Contributor Author

borekb commented May 17, 2017

Switching to upath module fixed it for me: #31

@davej
Copy link
Member

davej commented May 18, 2017

Awesome, thanks! Windows support is admittedly a bit flaky at the moment as I don't use the OS myself.

I'm on holidays right now but I'll merge this and publish a new release in the next few weeks when I'm back home. Thanks!

@borekb
Copy link
Contributor Author

borekb commented May 18, 2017

It actually works really well on Windows, I am impressed :) Good job, enjoy your holidays!

@davej davej added the bug label Jun 11, 2017
@davej davej closed this as completed in #31 Jun 12, 2017
@davej
Copy link
Member

davej commented Jun 13, 2017

Fixed in v0.6.8: https://github.com/pingyhq/pingy-cli/releases/tag/%40pingy%2Fcli%400.6.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants