]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
[pkg] Publish bundled esm under dist/
authorIskren Chernev <iskren.chernev@gmail.com>
Mon, 4 May 2020 12:14:59 +0000 (15:14 +0300)
committerIskren Chernev <iskren.chernev@gmail.com>
Mon, 4 May 2020 12:14:59 +0000 (15:14 +0300)
package.json
tasks/update_index.js

index 93de6480b525cc771872617077bb2dc5b6cf8078..00c870ec43e6f425402e62c060d549b53fffdd58 100644 (file)
@@ -23,8 +23,8 @@
         "ender"
     ],
     "main": "./moment.js",
-    "jsnext:main": "./src/moment.js",
-    "module": "./src/moment.js",
+    "jsnext:main": "./dist/moment.js",
+    "module": "./dist/moment.js",
     "typings": "./moment.d.ts",
     "typesVersions": {
         ">=3.1": {
index 32d541fc8e1d02cede64e9bc5f2c1aa0b47082ee..a4d18fe80bff5b99f06e1dc15f972e2d6bb2b257 100644 (file)
@@ -11,6 +11,22 @@ module.exports = function (grunt) {
         ],
         dest: '.',
     });
+    grunt.config('copy.esm', {
+        expand: true,
+        cwd: 'build/esm',
+        src: ['moment.js'],
+        dest: 'dist',
+    });
+    grunt.config('copy.esm-locales', {
+        expand: true,
+        cwd: 'src',
+        src: ['locale/*.js'],
+        dest: 'dist',
+    });
 
-    grunt.registerTask('update-index', ['copy:index-files']);
+    grunt.registerTask('update-index', [
+        'copy:index-files',
+        'copy:esm',
+        'copy:esm-locales',
+    ]);
 };