Skip to main content
Commonmark migration
Source Link

#Update

Update

#Update 2

Update 2

#Update

#Update 2

Update

Update 2

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

One task I want to do is to get a list of all the files in a directory and all of its sub-directories, and return them as a string[] for a javascript .config file. I started searching for that and found a lot of answers, but they all kept going back to nodejs, for instance, this onethis one, and this onethis one, and this one.

One task I want to do is to get a list of all the files in a directory and all of its sub-directories, and return them as a string[] for a javascript .config file. I started searching for that and found a lot of answers, but they all kept going back to nodejs, for instance, this one, and this one, and this one.

One task I want to do is to get a list of all the files in a directory and all of its sub-directories, and return them as a string[] for a javascript .config file. I started searching for that and found a lot of answers, but they all kept going back to nodejs, for instance, this one, and this one, and this one.

Attempting to explain the problem more.
Source Link
Ciel
  • 223
  • 1
  • 7

#Update 2

Attempting to further emphasize my question, I'll try and cite a more specific example. I want to use the library Q.js in my ASP.NET MVC application. Now, there is a version 1 that I can seem to run out of the box, but I want to try out version 2 - you can find it linked Q.js v2 (beta)

So I am using Visual Studio, and I'll download the q.js file and load it up, but immediately we already have trouble now - if you look at the file's source code right away I see this.

require("collections/shim");
var WeakMap = require("collections/weak-map");
var Iterator = require("collections/iterator");
var asap = require("asap");

Now I certainly don't have folders with those names in my application - and even though I have node.js installed, putting this file in a <script> tag does not work, as it says it cannot find the specific libraries. If I go to a console explicitly and type in npm install -g q@~2, it will create a folder called node_modules/q in my AppData/Roaming/npm folder, and this one does have folders for those other libraries.

So what is the right way to do this? It's clear that just having node installed doesn't make node commands work when I try to run the page in ASP.NET MVC - but I also don't understand how to get to the final version of the library that I can include on my application like a normal javascript file and use across the program.

#Update 2

Attempting to further emphasize my question, I'll try and cite a more specific example. I want to use the library Q.js in my ASP.NET MVC application. Now, there is a version 1 that I can seem to run out of the box, but I want to try out version 2 - you can find it linked Q.js v2 (beta)

So I am using Visual Studio, and I'll download the q.js file and load it up, but immediately we already have trouble now - if you look at the file's source code right away I see this.

require("collections/shim");
var WeakMap = require("collections/weak-map");
var Iterator = require("collections/iterator");
var asap = require("asap");

Now I certainly don't have folders with those names in my application - and even though I have node.js installed, putting this file in a <script> tag does not work, as it says it cannot find the specific libraries. If I go to a console explicitly and type in npm install -g q@~2, it will create a folder called node_modules/q in my AppData/Roaming/npm folder, and this one does have folders for those other libraries.

So what is the right way to do this? It's clear that just having node installed doesn't make node commands work when I try to run the page in ASP.NET MVC - but I also don't understand how to get to the final version of the library that I can include on my application like a normal javascript file and use across the program.

Tweeted twitter.com/#!/StackProgrammer/status/482974728651808771
added 1587 characters in body
Source Link
Ciel
  • 223
  • 1
  • 7
Loading
Source Link
Ciel
  • 223
  • 1
  • 7
Loading