Minified version of moment-library that only supports necessary locales.
-
Clone moment project
git clone https://github.com/moment/moment.git
-
Change directory
cd moment
-
Install dependencies
npm install
-
Use Grunt task to compile Moment with a custom list of locales
grunt transpile:fi,sv,en-gb
-
Copy generated moment file and paste it in the moment-mini directory
cp .\moment\build\umd\min\moment-with-locales.custom.js .\moment-mini\
-
Create library
npm pack
-
Install to your project
npm install <moment-mini-path>\moment-<version>.tgz