how I ride the bullet - how I set up a testing environment

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
manu
Posts: 615
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

how I ride the bullet - how I set up a testing environment

Postby manu » Mon Dec 22, 2014 8:21 pm

I'm trying to establish a testing environment on win7x64.
After installing node.js I get stuck with installing JSDoc 3. Should this be installed by the node.js command line? Could anybody give me a hint?
regards
manu

cmb
Posts: 11675
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Voting for XH 1.6.5

Postby cmb » Mon Dec 22, 2014 9:18 pm

manu wrote:I'm trying to establish a testing environment on win7x64.

Awesome. :)

manu wrote:After installing node.js I get stuck with installing JSDoc 3. Should this be installed by the node.js command line? Could anybody give me a hint?

To be honest I had installed JSDoc 3.2.2 manually quite a while ago. For the article Development Environment I had chosen to use Node.js for JSDoc 3 to avoid this manual installation and requiring Java. I presumed that the installation would be easier, but had not tried it.

Now I did. It is not necessary to use the node.js command prompt; a standard cmd.exe is sufficient (however, the installation folder of node.js has to be in the PATH). CD to the XH working copy and run:

Code: Select all

npm install jsdoc@"<=3.3.0"
set path=node_modules\.bin;%PATH%
phing js-doc

The first command creates the folder node_modules, which is then added to the PATH. The last command should create the JS documentation in doc/js/.

If we agree on the local installation, we should ignore the node_module folder (i.e. set the respective SVN property), and I'll add some explanations to the Wiki article.

BTW: I'm impressed by the speed improvement. Running JSDoc 3.2.2 under Rhino took nearly thrice as long for the documentation to be created.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

manu
Posts: 615
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Voting for XH 1.6.5

Postby manu » Tue Dec 23, 2014 9:19 am

Thanks Christoph
This takes me a step further.

Code: Select all

npm install jsdoc@"<=3.3.0"
threw this error:
"Error: ENOENT, stat 'C:\Users\emanuel\AppData\Roaming\npm' "
After adding the directory manually it worked.

Code: Select all

set path=node_modules\.bin;%PATH%
seems to work.

Code: Select all

phing js-doc
fails with
"Buildfile: C:\xampp\htdocs\CMSimpleDev\build.xml
The PEAR data_dir setting is incorrect: C:\php\pear\data.
Please edit using 'pear config-set data_dir ...' and re-install Phing.
BUILD FAILED
Can't load default task list".
I'm investigating...
How about to move these posts to "how I ride the bullet - how I set up a testing environment"?

manu
Posts: 615
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Voting for XH 1.6.5

Postby manu » Tue Dec 23, 2014 9:59 am

With pear config-show the data path seems correct:

Code: Select all

PEAR data directory            data_dir         c:/xampp/htdocs/pear/

With "pear list" I dont see any phing installed...
In ./php/pear/ the phing directory ist present though....
Reinstall phing with pear??

cmb
Posts: 11675
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Voting for XH 1.6.5

Postby cmb » Tue Dec 23, 2014 10:37 am

manu wrote:How about to move these posts to "how I ride the bullet - how I set up a testing environment"?

Yes, good idea.

manu wrote:Reinstall phing with pear??

No, Pear is not required (at least it shouldn't be). Just install Composer, CD to the XH working copy, run `composer update` and:

Code: Select all

set path=vendor\bin;%PATH%
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

manu
Posts: 615
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environme

Postby manu » Tue Dec 23, 2014 11:03 am

ok, all done.
Now I get this:

Code: Select all

C:\xampp\htdocs\CMSimpleDev>phing js-doc
←[00;36mBuildfile: C:\xampp\htdocs\CMSimpleDev\build.xml←[0m
←[00;32m
CMSimple_XH > js-doc:
←[0m
←[01;31mExecution of target "js-doc" failed for the following reason: C:\xampp\h
tdocs\CMSimpleDev\build.xml:93:34: Task exited with code 1←[0m
←[01;31m
BUILD FAILED
C:\xampp\htdocs\CMSimpleDev\build.xml:93:34: Task exited with code 1
Total time: 0.6240 seconds
←[0m

C:\xampp\htdocs\CMSimpleDev>

cmb
Posts: 11675
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environme

Postby cmb » Tue Dec 23, 2014 11:19 am

Fine, we're getting there. :)


manu wrote:

Code: Select all

Execution of target "js-doc" failed for the following reason: C:\xampp\h
tdocs\CMSimpleDev\build.xml:93:34: Task exited with code 1

Try running the command directly:

Code: Select all

jsdoc --destination doc/js core/js/admin.js plugins/filebrowser/js/filebrowser.js
That should give a more meaningful error message.

Regarding the color codes (←[00;36m): either you call phing like the following:

Code: Select all

phing --logger phing.listener.DefaultLogger js-doc
or you install Ansicon and use this instead of directly using cmd.exe.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

manu
Posts: 615
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: how I ride the bullet - how I set up a testing environme

Postby manu » Tue Dec 23, 2014 11:54 am

Now I found out:

Code: Select all

set path=..
doesn't set the path persistent. After closing the cmd window all the path setting are gone. I problably have to set the user path for node_modules.. and vendor/.. in the System settings by hand.
EDIT: Edit the user System setting don't work (because they are loaded the last).

cmb
Posts: 11675
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environme

Postby cmb » Tue Dec 23, 2014 12:44 pm

manu wrote:Edit the user System setting don't work (because they are loaded the last).

I assume you're using the XAMPP shell. In this case you can modify xampp\xampp_shell.bat as desired.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+

cmb
Posts: 11675
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: how I ride the bullet - how I set up a testing environme

Postby cmb » Tue Dec 23, 2014 1:51 pm

manu wrote:

Code: Select all

Execution of target "js-doc" failed for the following reason: C:\xampp\h
tdocs\CMSimpleDev\build.xml:93:34: Task exited with code 1

I have now set the passthru attribute of all exec tasks to true (r1407); this way error messages will be shown when running `phing <taskname>`.
Christoph M. Becker –Plugins for CMSimple_XH, but not for CMSimple 4+


Return to “Open Development”

Who is online

Users browsing this forum: No registered users and 2 guests