Bladeren bron

Rename package `module` files to `index.js`

Makes it easier to import, you don't have to specify the file name, just
the package name.
JC Brand 2 jaren geleden
bovenliggende
commit
5c3acc8a4d
6 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 1 1
      package.json
  2. 1 1
      src/entry.js
  3. 1 1
      src/headless/README.md
  4. 0 0
      src/headless/index.js
  5. 1 1
      src/headless/package.json
  6. 1 1
      src/index.js

+ 1 - 1
package.json

@@ -3,7 +3,7 @@
   "version": "10.1.2",
   "description": "Browser based XMPP chat client",
   "browser": "dist/converse.js",
-  "module": "src/converse.js",
+  "module": "src/index.js",
   "workspaces": [
     "src/headless"
   ],

+ 1 - 1
src/entry.js

@@ -57,7 +57,7 @@ const converse = {
         if (settings.assets_path) {
             __webpack_public_path__ = settings.assets_path; // eslint-disable-line no-undef
         }
-        require('./converse.js');
+        require('./index.js');
         Object.keys(plugins).forEach(name => converse.plugins.add(name, plugins[name]));
         return converse;
     }

+ 1 - 1
src/headless/README.md

@@ -13,5 +13,5 @@ It's also installable with NPM/Yarn as [@converse/headless](https://www.npmjs.co
 
 The main distribution of Converse relies on the headless build.
 
-The file [src/headless/headless.js](https://github.com/jcbrand/converse.js/blob/master/src/headless/headless.js)
+The file [src/headless/index.js](https://github.com/jcbrand/converse.js/blob/master/src/headless/index.js)
 is used to determine which plugins are included in the build.

+ 0 - 0
src/headless/headless.js → src/headless/index.js


+ 1 - 1
src/headless/package.json

@@ -10,7 +10,7 @@
   "homepage": "https://conversejs.org",
   "license": "MPL-2.0",
   "main": "dist/converse-headless.js",
-  "module": "headless.js",
+  "module": "index.js",
   "keywords": [
     "converse.js",
     "XMPP",

+ 1 - 1
src/converse.js → src/index.js

@@ -4,7 +4,7 @@
  * @license Mozilla Public License (MPLv2)
  */
 
-import "@converse/headless/headless";
+import "@converse/headless";
 import "./i18n/index.js";
 import "shared/registry.js";
 import { CustomElement } from 'shared/components/element';