Q:

How to override both shipping.html and shipping.js file in custom module magento 2

override both shipping.html and shipping.js 
I am trying to override shipping.js file in magento 2 but can not working.
requirejs-config.js
var config = {
paths: {
    'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
    'Magento_Checkout/js/shipping': 'VendorName_Namespace/js/shipping'
    }
};

A:

Try to use mixin:

app/code/SR/Checkout/view/frontend/requirejs-config.js

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/view/shipping': {
                'SR_Checkout/js/mixin/shipping-mixin': true
            }
        }
    }
};

app/code/SR/Checkout/view/frontend/web/js/mixin/shipping-mixin.js

define(
    [
        'jquery',
        'ko'
    ], function (
        $,
        ko
    ) {
        'use strict';

        return function (target) {
            return target.extend({
                /**
                 * Show address form popup
                 */
                showFormPopUp: function () {

                    this._super();
                }
            });
        }
    }
);

Clear browser js cache, remove pub/static if your magento mode is not developer. Clear cache.

A:

I got the solution of my question.
How to override both shipping.html and shipping.js.
requirejs-config.js
var config = {
    paths: {
         'Magento_Checkout/template/shipping': 'VendorName_Namespace/template/shipping',
         'Magento_Checkout/js/view/shipping': 'VendorName_Namespace/js/view/shipping'
      }
};

