Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #31203 > unrolled thread

How develop pure JS library involving multiple source files?

Started bykentilton@gmail.com
First post2016-08-28 23:02 -0700
Last post2016-08-29 12:58 +0100
Articles 4 — 3 participants

Back to article view | Back to comp.lang.javascript


Contents

  How develop pure JS library involving multiple source files? kentilton@gmail.com - 2016-08-28 23:02 -0700
    Re: How develop pure JS library involving multiple source files? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-29 10:44 +0100
      Re: How develop pure JS library involving multiple source files? Ken Tilton <kentilton@gmail.com> - 2016-08-29 04:19 -0700
        Re: How develop pure JS library involving multiple source files? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-29 12:58 +0100

#31203 — How develop pure JS library involving multiple source files?

Fromkentilton@gmail.com
Date2016-08-28 23:02 -0700
SubjectHow develop pure JS library involving multiple source files?
Message-ID<26eae79d-b1cd-4e4d-b795-608f470c97db@googlegroups.com>
I am interested in porting a little dataflow aka reactive aka databinding library of mine from Common Lisp to javascript. It will be about 2kloc and would be edited most easily as about ten different .js files.

My immediate problem is quite simple: how do I edit/run/test as I go? Is it necessary to run a server and test in a browser where each file is loaded via a script tag? I do not plan immediately to mess with DOM since it is purely about the dataflow between JS objects, so it would be great to just sit in an IDE and hit Run to test as I go.

I have installed WebStorm and it works fine for a single source file, but for the life of me I do not see how to get it to load all the JS files I have added to the project. And I did see something suggesting I would have to use a build tool to concatenate the different JS files, suggesting WebStorm does not handle that for me.

If I have to test in a browser I will live, but an IDE would rock. Maybe I will see if Aptana is more approachable.

Insights welcome.

-kt

[toc] | [next] | [standalone]


#31205

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2016-08-29 10:44 +0100
Message-ID<8737lnlxj4.fsf@bsb.me.uk>
In reply to#31203
kentilton@gmail.com writes:

> I am interested in porting a little dataflow aka reactive aka
> databinding library of mine from Common Lisp to javascript. It will be
> about 2kloc and would be edited most easily as about ten different .js
> files.
>
> My immediate problem is quite simple: how do I edit/run/test as I go?
> Is it necessary to run a server and test in a browser where each file
> is loaded via a script tag?

No, because:

> I do not plan immediately to mess with DOM

and that means you only need an ECMAScript implementation with some IO
capability.  As a Linux user I use nodejs, but you name some things
below that I've not heard of so I think you many be using Windows.

> since it is purely about the dataflow between JS objects, so it would
> be great to just sit in an IDE and hit Run to test as I go.
>
> I have installed WebStorm and it works fine for a single source file,
> but for the life of me I do not see how to get it to load all the JS
> files I have added to the project. And I did see something suggesting
> I would have to use a build tool to concatenate the different JS
> files, suggesting WebStorm does not handle that for me.

That would be a very severe restriction (and a strange one, too), but
I'm not familiar with the software.  Some people with Windows experience
will be along soon and they can weigh in with how they do this sort of
development.

<snip>
-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#31206

FromKen Tilton <kentilton@gmail.com>
Date2016-08-29 04:19 -0700
Message-ID<4c14deb8-3276-4bc5-9577-b64147bfcbfd@googlegroups.com>
In reply to#31205
On Monday, August 29, 2016 at 5:44:37 AM UTC-4, Ben Bacarisse wrote:
> kentilton@gmail.com writes:
> 
> > I am interested in porting a little dataflow aka reactive aka
> > databinding library of mine from Common Lisp to javascript. It will be
> > about 2kloc and would be edited most easily as about ten different .js
> > files.
> >
> > My immediate problem is quite simple: how do I edit/run/test as I go?
> > Is it necessary to run a server and test in a browser where each file
> > is loaded via a script tag?
> 
> No, because:
> 
> > I do not plan immediately to mess with DOM
> 
> and that means you only need an ECMAScript implementation with some IO
> capability.  As a Linux user I use nodejs, but you name some things
> below that I've not heard of so I think you many be using Windows.
> 
> > since it is purely about the dataflow between JS objects, so it would
> > be great to just sit in an IDE and hit Run to test as I go.
> >
> > I have installed WebStorm and it works fine for a single source file,
> > but for the life of me I do not see how to get it to load all the JS
> > files I have added to the project. And I did see something suggesting
> > I would have to use a build tool to concatenate the different JS
> > files, suggesting WebStorm does not handle that for me.
> 
> That would be a very severe restriction (and a strange one, too), but
> I'm not familiar with the software.  Some people with Windows experience
> will be along soon and they can weigh in with how they do this sort of
> development.
> 
> <snip>
> -- 
> Ben.

Thanks, Ben, I am up and running with nodejs. This page explained the bit I was missing: how to use "require" to go cross-file: 

http://openmymind.net/2012/2/3/Node-Require-and-Exports/

btw, I am running a Node.js Express project under Webstorm on Ubuntu, though it does have Windows and Mac OS versions.

Thx again. -kt

[toc] | [prev] | [next] | [standalone]


#31207

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2016-08-29 12:58 +0100
Message-ID<87wpizkcs7.fsf@bsb.me.uk>
In reply to#31206
Ken Tilton <kentilton@gmail.com> writes:

> On Monday, August 29, 2016 at 5:44:37 AM UTC-4, Ben Bacarisse wrote:
>> ...  As a Linux user I use nodejs, but you name some things
>> below that I've not heard of so I think you many be using Windows.
<snip>
> Thanks, Ben, I am up and running with nodejs. This page explained the
> bit I was missing: how to use "require" to go cross-file:
>
> http://openmymind.net/2012/2/3/Node-Require-and-Exports/
>
> btw, I am running a Node.js Express project under Webstorm on Ubuntu,
> though it does have Windows and Mac OS versions.

Ah, OK.  I've got too familiar with my editor to want to investigate
other interfaces so I was not aware of Webstorm on Linux, but it's good
I've now heard of it!

Glad you're up and running.

-- 
Ben.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web