+1
À l'étude

Provide a way to distingush between JS code.

Flynn Joffray il y a 11 ans mis à jour par Paul Sinclair il y a 11 ans 2

I work on a lot of front and backend javascript code, it would be nice to be able to distinguish if i'm writing for node.js or something on the client side. I understand that you guys are just looking at extensions, so yeah...

Solution

Solution
À l'étude

Hi Flynn,

Thanks for the feedback, how can you tell if you are writing Javascript for client side or server side? 

Is it based on: 

The name of the file? 

The folder the file is in?

The class/method name your are currently writing in a file?

or a Combination of the above?

Cheers,

- Paul


Solution
À l'étude

Hi Flynn,

Thanks for the feedback, how can you tell if you are writing Javascript for client side or server side? 

Is it based on: 

The name of the file? 

The folder the file is in?

The class/method name your are currently writing in a file?

or a Combination of the above?

Cheers,

- Paul


I think any sort of contextual reference would make this work - if you look for a package.json in the folder context (lower folders or ./ usually), you could not only know what framework was being used, but what rendering engines, packages, and other metadata associated with the node project (name, description, git address, etc). Just a thought!

Also, if you guys do have an open git for this project, I could take a stab at it and make a pull request =)