Folder node_modules does not upload to svn

1

I have this (original) dependency file numeral which is in the node_modules -> numeral ->locales -> pt-br folder

// numeral.js locale configuration
// locale : portuguese brazil (pt-br)
// author : Ramiro Varandas Jr : https://github.com/ramirovjr

(function (global, factory) {
    if (typeof define === 'function' && define.amd) {
        define(['../numeral'], factory);
    } else if (typeof module === 'object' && module.exports) {
        factory(require('../numeral'));
    } else {
        factory(global.numeral);
    }
}(this, function (numeral) {
    numeral.register('locale', 'pt-br', {
        delimiters: {
            thousands: '.',
            decimal: ','
        },
        abbreviations: {
            thousand:"mil",
            million:"milhões",
            billion:"b",
            trillion:"t"
        },
        ordinal: function (number) {
            return 'º';
        },
        currency: {
            symbol: 'R$'
        }
    });
}));

But I need to change it to

abbreviations: {
            thousand: 'mil',
            million: 'mi',
            billion: 'bi',
            trillion: 'tri'
        },

So far so good, but when I upload it to svn as it does not go up the folder node_modules it does not raise my change, and there in jenkis when running the scripts to run the npm install .. build project. etc ... and send it to the server it downloads the original dependency and my numbers in the system are not formatted.

Attempts: I tried to upload the folder node_modules (I could not, maybe it was a solution but I could not if someone could show me), I tried to access abbreviations and change it in a ts that always executes (but did not know how access it).

I have a solution, which would put the numeral folder out of node_modules, but I do not want this because if I need to change another one ... and ... another turns a snowball.

Then there is the question: How to solve this problem of my problem that when changing a dependency that stays in node_modules it will not be "saved" because node_modules does not go up to the repository?     

asked by anonymous 17.08.2018 / 23:07

1 answer

0

You are not advised to edit anything inside node_modules.

The link documentation has the "#Locales" solution you need.

The section below I removed from there. Hope it helps.

// load a locale
numeral.register('locale', 'fr', {
    delimiters: {
        thousands: ' ',
        decimal: ','
    },
    abbreviations: {
        thousand: 'k',
        million: 'm',
        billion: 'b',
        trillion: 't'
    },
    ordinal : function (number) {
        return number === 1 ? 'er' : 'ème';
    },
    currency: {
        symbol: '€'
    }
});

// switch between locales
numeral.locale('fr');

As I am not fluent in every locale on the planet, please feel free to create locale files of your own by submitting a pull request. Do not forget to create both the locale file (example: locales / fr.js) and the locale test (example: tests / locales / fr.js). Thanks for helping out.

    
18.08.2018 / 18:25