deploying a javascript 3rd party library (requirejs/grunt)

79 Views Asked by At

Our team is building a javascript library that enables other web apps in our company to consume and insert data into our app, using widgets we built with angular directives.

So we got our own app (that could be used independently), built with MVC .net (in visual studio), and with angular. And also we are producing sort of a javascript library that other apps can use and insert widgets (that are connected to data from our app through ajax calls).

We are really struggling with our deployment proccess. We need the following to happen:

  1. Concatenating and minifyinh our javascript, and in the right order.
  2. Compiling less, and concatenating and minifing css.
  3. Handle external dependencies because we are using multiple 3rd party libraries also, which maybe others are using also.

We know about requirejs, but we are not sure it is suitable for a 3rd party sort of library we are building. Also we want to enable loading as CDN, is it still suitable?

We also know about grunt, but we are not using nodejs but MVC .net. Is it relevant?

We would appreciate your input! Thanks!

1

There are 1 best solutions below

4
On

I would strongly recommend using a build tool such as Gulp or Grunt, both of which can easily handle the requirements you've given. An added benefit is both can be set up to initiate parts of the build process as files are saved, freeing developers to use any editor they want instead of a particular IDE.