/moment-mini

Primary LanguageJavaScript

moment-mini

Minified version of moment-library that only supports necessary locales.

Create minified moment

  1. Clone moment project

    git clone https://github.com/moment/moment.git
  2. Change directory

    cd moment
  3. Install dependencies

    npm install
  4. Use Grunt task to compile Moment with a custom list of locales

    grunt transpile:fi,sv,en-gb

Create moment-mini library

  1. Copy generated moment file and paste it in the moment-mini directory

    cp .\moment\build\umd\min\moment-with-locales.custom.js .\moment-mini\
  2. Create library

    npm pack

Add library to your project

  1. Install to your project

    npm install <moment-mini-path>\moment-<version>.tgz

References

https://momentjs.com/docs/#/i18n/loading-into-browser/