p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   NAnt (http://p2p.wrox.com/nant-367/)
-   -   To write nant build script for js files (http://p2p.wrox.com/nant/88978-write-nant-build-script-javascript-files.html)

aa_dev December 14th, 2012 03:18 AM

To write nant build script for js files
 
Hi all,
I'm just a beginner in Nant build scripting and i was given a task of doing a build for my project and i need to write a script for 100 js files in a folder called 'scripts'. I dont have any idea of writing even though its in xml i'm clear about the flow.
Please help me with a script.
thanks in advance

planoie December 14th, 2012 07:58 AM

Need more detail
 
I'm afraid you're going to need to provide a lot more detail to your question. First of all, what is it exactly that you need to do with these JS files? I've never known of anyone needing to do any kind of "build" of JS.

Generally with NAnt you call out to some compiler or processor to do the actual work required. You can call out to any external program to do the work so you just need to find the right external tool to process the files in the way you need.

Have you looked at the NAnt documentation? I've found that to quite sufficient to get going with most tasks.

aa_dev December 17th, 2012 01:16 AM

Quote:

Originally Posted by planoie (Post 288361)
I'm afraid you're going to need to provide a lot more detail to your question. First of all, what is it exactly that you need to do with these JS files? I've never known of anyone needing to do any kind of "build" of JS.

Generally with NAnt you call out to some compiler or processor to do the actual work required. You can call out to any external program to do the work so you just need to find the right external tool to process the files in the way you need.

Have you looked at the NAnt documentation? I've found that to quite sufficient to get going with most tasks.







I have a project for which i have to do a build. I'm using cruise control as the build tool. But i'm not sure of integrating both nant script and cruise control.
In my project we have a set of files, scripts for which i have to do a build. As I'm a beginner I dont know where to start. I have read the NAnt documentation and installed it.
The NAnt script is in XML and the flow for doing the build is not clear to me. Also I'm using Dynamsoft SCM as version control system and its working directory from where I have to fetch my project files for doing the build. finally the NAnt script should be linked with cruise control.net to do the build. Can anyone please help me atleast with a sample script?

planoie December 17th, 2012 10:43 PM

Still need more detail
 
Quote:

Originally Posted by aa_dev (Post 288395)
I have a project for which i have to do a build.

What is the "build" you have to do? Are you compiling code? Copying files? You mention js files, but what do you need to do with them? Unless these are js files that are being compiled for some technology with which I'm familiar, which is very possible, I can't imagine what you'd need to do with them aside from copy or zip them into some alternate structure.

Quote:

Originally Posted by aa_dev (Post 288395)
I'm using cruise control as the build tool. But i'm not sure of integrating both nant script and cruise control.

Cruise Control has pretty decent documentation that explains how to call its various tasks, including NAnt build scripts.

Quote:

Originally Posted by aa_dev (Post 288395)
The NAnt script is in XML and the flow for doing the build is not clear to me.

The flow of the build will be particular to your project and needs. You need to decide what steps you have to perform and fashion the appropriate NAnt tasks to perform those steps.

Quote:

Originally Posted by aa_dev (Post 288395)
finally the NAnt script should be linked with cruise control.net to do the build. Can anyone please help me atleast with a sample script?

Again, CruiseControl has samples of configuring an integration project with calls to NAnt. Details can be found here: http://ccnet.sourceforge.net/CCNET/NAnt%20Task.html

aa_dev December 20th, 2012 02:32 AM

My project holds these folders which are in C:\myproject:
common,
mobile-html scripts, images etc
db-tables, procedures
data-jquery,
scripts - js scripts
customs, utilities functions

Compile the files and have an .exe file in zip format
How to map these files and do a Nant build script which should be configured in CC.Net

A sample script would help me too


All times are GMT -4. The time now is 06:51 AM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.