Question
What is code over configuration?

Answers

Gulp prefers code over configuration, which keeps things simple and makes complex tasks manageable. If you have worked with grunt, or seen gruntfile.js then you will find that you do configuration using JSON, and in case of gulp there is plain JavaScript code to do the magic. Here is how a grunt file will look like.

module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    concat: {
      options: {
        separator: ';'
      },
      dist: {
        src: ['src/**/*.js'],
        dest: 'dist/<%= pkg.name %>.js'
      }
    }
     
 });
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.registerTask('default', ['concat']);

Here, we are configuring the grunt plugins via JSON. You can see the complete sample file here.
And below is a sample gulp file,

var gulp = require('gulp'); 
var concat = require('gulp-concat');
gulp.task('scripts', function() {
    return gulp.src('js/*.js')
        .pipe(concat('all.js'))
        .pipe(gulp.dest('dist'));
});
gulp.task('default', ['scripts']);

As you can see, there is all code no configuration. The file looks much clean and manageable. This is an advantage of gulp over grunt.   Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q Ferenc Gyurcsany resigned as prime minister of which country in March 2009?
  • Q What is the point below the epicentre of the earthquake-
  • Q What became the name of the crime in which eleven thieves stole more than $2 million in a heist in Boston, Massachusetts, in January 1950?
  • Q A customer implemented AWS Storage Gateway with a gateway-cached volume at their main office. An event takes the link between the main and branch office offline. Which methods will enable the branch office to access their data?
  • Q Difference between treeset and sortedset?
  • Q Name the UK's greatest Paralympic medal winner (as at 2011)?
  • Q When an instruction is under execution it should be in which register of the CPU?
  • Q Habanos SA, global Cuban cigar distributor, announced that what nation had overtaken Germany to join France and Spain in the world's top three consumers of their products?
  • Q Beas Hydroelectric project is a joint venture of
  • Q Which SAP PI user interface tools you have used
  • Q How to call stored procedure using HTTP SOAP?