{"_id":"a-bundle","_rev":"4-8b06e162b6d401d0202a2025fabc44b1","name":"a-bundle","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"a-bundle","version":"1.0.0","description":"Assemble smarter. Develop faster.","main":"entry/entry.js","repository":{"type":"git","url":"git+https://github.com/andrey-brill/a-bundle.git"},"author":{"name":"Andrey Brill","email":"andrey@a-brill.com","url":"https://github.com/andrey-brill"},"license":"MIT","bugs":{"url":"https://github.com/andrey-brill/a-bundle/issues"},"homepage":"https://github.com/andrey-brill/a-bundle","keywords":["library","bundle","module","assembling","chunk","entry"],"devDependencies":{},"dependencies":{},"gitHead":"867388e21488b7008210494355d8e75a335973c7","_id":"a-bundle@1.0.0","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-7TIIMBgtgW2vRei3EXGsZ29zVCZq+zoQQbEo1YLVQT6WYoVOZMVjzqxPjYLDJD30mJ9uqbB1ops40dx852P/kA==","shasum":"4bef782e45fde0ef0aecd099b9bef7d0b1eab02c","tarball":"https://registry.npmjs.org/a-bundle/-/a-bundle-1.0.0.tgz","fileCount":7,"unpackedSize":6054,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee0g6CRA9TVsSAnZWagAAQNEP/RdZbGNxCDJMh7kkNALV\nAskCaeVAZ5w9HGEEA5OQMQfGUQqbvhDp9OeMf3L/P1gE+E8Id+pvzpqKrk1p\n4SKFxkoSmTceorP8uk0AYRqga6WWEaVUqPPto1dWlyaPYcnBPRSEy0c5TbdL\npjHu7wb1Bay8x5Dizh14O2oOU3ohklKNJ4VSVqA+b03LD9z2PyNLcGGWPpW2\nmy3UNpBvIuKCJQyzlWt3+ig4BQKnePX8NvlaCkkSetpf5ITRkKWBIlq2jFXZ\nkCyQj/oVAvJ/2OgjFzHZ+HMgKPOVCaFd0nBloE8x23PLAf4a36E77cp1EU8T\nAJwC1HqIEW/eEYKxcE7Mx+IJUtRLqothmC2Ovbp3/nkndeMNII32eb2DRl+W\nMGfudCnIPecZqzWMCjz9iwxCWuBCh/OHOfJ1biaM66OBFn3tlNBjCtPGY/18\n2+3mJBcUi/tK7KRufXJB0y030tvcdXmHqrHpFZWqhlC0gbfr5fuv985vWKWE\nuDPOGXPWrWZRaCrxjKKSEuhz6/1aUNj+fskbWf23irC6FL23Ye4vLwUhW3KZ\nqmdyZ+4nB514eCLKXnVpaH8NK9KP5EL4wpheO6KuKDJmZskHcmSS2U+5Yfey\nGlhmXCHgRD31Q5Zub/qHws64lbrFmBgJk9xk3UjePnkktIVwgCZDGiIpoCLx\njDPv\r\n=v2Wg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBY51poApAzxJeF7bUAM2Fv55/hHT1wnBZ/YXIqH7y2WAiEAhKg7OHoaz3VmFVIIz10EpJVvzdF0hA44ZwB6Ua9Ee8M="}]},"maintainers":[{"name":"andrey-brill","email":"andrey@a-brill.com"}],"_npmUser":{"name":"andrey-brill","email":"andrey@a-brill.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/a-bundle_1.0.0_1585137721910_0.6492241832163108"},"_hasShrinkwrap":false},"1.0.1":{"name":"a-bundle","version":"1.0.1","description":"Assemble smarter. Develop faster.","main":"entry/entry.js","repository":{"type":"git","url":"git+https://github.com/andrey-brill/a-bundle.git"},"author":{"name":"Andrey Brill","email":"andrey@a-brill.com","url":"https://github.com/andrey-brill"},"license":"MIT","bugs":{"url":"https://github.com/andrey-brill/a-bundle/issues"},"homepage":"https://github.com/andrey-brill/a-bundle","keywords":["library","bundle","module","assembling","chunk","entry"],"devDependencies":{},"dependencies":{},"gitHead":"b9c5b632b8a84fc23a9a74cbc1c5b8e9db94df96","_id":"a-bundle@1.0.1","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-By3PJyDunFCa2zi9lFJ2o8kcIIegZBem8KYnwHyiIlx8QC9dy29eDOy1qTKb4Pp/laQzP36idw450Te5afDMwg==","shasum":"9459538ab646ef4ce0153fd304a92c3e8af494f9","tarball":"https://registry.npmjs.org/a-bundle/-/a-bundle-1.0.1.tgz","fileCount":7,"unpackedSize":6305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee3IQCRA9TVsSAnZWagAA33MQAIbuWbZz/ZK8VNo1+uVa\nVOhlL9Y27mK2H009KxomDYTjedDwI7KmaJbtSiTOXWS6BYobVWaowWKacYDv\nvnA5+ajm5peS3MPKjTbts6iq61pVA/iqTnCejKZR7BRsxbO4Da56KF58RBZm\n1Q1ZNazdz1zt/5ZLvoSnLIDMpX7qz6VK0I1x9NMxjlVuvzvrcD4lPp1QQH8j\nP48SXNAiG2vjVNaCtBJvu55oZSUUAZ18qajgAXcntlkwPB5XQSK+tivnEnWj\n9VLiqXwkgEXFuLQ/pCabSVF4SBiIJxjeYfHuWHZggwGARwDW2Fr0nDnRdqNx\nuYmUoujHAXgYSI+uR7bDIGHYH86mF3Gw/Ly30OfA3bT33KgJ+OTcYLRdUsBC\namWPx+BeUNBuzn/VynM13crxiJOmpECidJQACimgogil3rCyTMgRYg///Bqa\nRUSW4ivBeRYYtzuxLU40FJ/M0qu5/sYnEzrI0iVJtaHmPzi5xJk49fIBMqrL\ntklo6GwUpOwNKM6WP7zZ6qr1bNwatEQAHvKrveZhdN9T06smvrX1lgOZnWde\nrszRckJSlem7qFz8uJnnty42J+42xPN4/0RezF29bPNrBzuftol7tUKl16Bc\nwbB0Yx8vtlUZRdNuETcma5jG7zfzrHFVvlfM2ktti9U6VKax34rX/fedAIKQ\nYgh8\r\n=oExK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBuRQByKN74j3voyS2NvLqRxnfDl+LJrFAQ0TsaWcxYiAiA3RW0lnI/IjpZ40Q+D5BRS5Nm91TlzmEFoIcCVTZv30Q=="}]},"maintainers":[{"name":"andrey-brill","email":"andrey@a-brill.com"}],"_npmUser":{"name":"andrey-brill","email":"andrey@a-brill.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/a-bundle_1.0.1_1585148432188_0.746846794787881"},"_hasShrinkwrap":false},"1.0.2":{"name":"a-bundle","version":"1.0.2","description":"Assemble smarter. Develop faster.","main":"entry/entry.js","repository":{"type":"git","url":"git+https://github.com/andrey-brill/a-bundle.git"},"author":{"name":"Andrey Brill","email":"andrey@a-brill.com","url":"https://github.com/andrey-brill"},"license":"MIT","bugs":{"url":"https://github.com/andrey-brill/a-bundle/issues"},"homepage":"https://github.com/andrey-brill/a-bundle","keywords":["library","bundle","module","assembling","chunk","entry"],"devDependencies":{},"dependencies":{},"gitHead":"6f6b83ced7609c9f22e68110921f296c69219cf4","_id":"a-bundle@1.0.2","_nodeVersion":"13.9.0","_npmVersion":"6.13.7","dist":{"integrity":"sha512-mx4zaDf+JNRQqSIeKONJIYEcRxxh7s+lV9JRy9v1nsHL9UZ5oRmR1Uhi89ln7W7eo9DUVQmHQJK18tLyeG/qyA==","shasum":"59735d7b4f29bfdf7cdfca32c5605463962c015b","tarball":"https://registry.npmjs.org/a-bundle/-/a-bundle-1.0.2.tgz","fileCount":7,"unpackedSize":6251,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJee7CzCRA9TVsSAnZWagAAwrwP/jvuis6pvvtwv6ZnIFu+\nRRydWjpgtse9Hx5T0JbVg2EJrZ/n2dRB1ObX2SE48jD3MnsKfqFLJKyfP8LY\nDw3hJLraQja22mxGKpbvoKwd/Yj46vQ8OS0TRGZCfmYhDoje0IYJya0zihKk\nszS1DEAosdYViMmi8hHTmz4ccaynjS4YFi4EtkIjPsWHyjI11N6BuusGD2P5\nmPjj/eDvp0/HblaHIP6aH4xmJehf7NokUMl08DEVB630+sciNWsLKd3Z4sRN\nrxrl3Vw+Yk9eJZwI3NYeHo9WQTSwX2kxu7WpLkGtoQPxsfVx5KO6qL8MXdCM\nTeaZbfmDIudWyBt3YIDKoaJo5gz15aDGs3hfeGjmwHiBHtImm/9NcQjEfJd1\nVNCzimWF/1IGYF0BqIJ6nyQWSPTuwZaK5Big71HInx4PghY1yh6mrV+U0Wh+\nzGx6XzBtS0cGX+Ei1GMnp5pQQu7SkBZyI1YLTafxkkQJbkOjkU3DaK8yHdNz\nHJO0baU2HE5pPQpKvxOrl6cIZUDWyWNLhYPxs2q7bIfz32eL7zZZlcZw9s41\nzWrNJJn/MTPWQK9KyTI+II1GV5REf3jimFFl7GFKoEQ0XOQRPFhsn10Hjxai\n28TXieU3CyEk/b09puWj0A8AZUtTBN6bH+/5xtgzyUe0hojZS0scC+HOP666\n4O00\r\n=yUcq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICnI8s0b2YCrwHHG8XXCogsm4igGlpIWgED+0Iggp9gKAiEAkVVkTo+qdE7kYbibbs37oTSCkc3GMsBbNc1JpEAbvKs="}]},"maintainers":[{"name":"andrey-brill","email":"andrey@a-brill.com"}],"_npmUser":{"name":"andrey-brill","email":"andrey@a-brill.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/a-bundle_1.0.2_1585164467379_0.8694803013874737"},"_hasShrinkwrap":false},"1.0.3":{"name":"a-bundle","type":"module","version":"1.0.3","description":"Assemble smarter. Develop faster.","main":"entry/entry.js","repository":{"type":"git","url":"git+https://github.com/andrey-brill/a-bundle.git"},"author":{"name":"Andrey Brill","email":"andrey@a-brill.com","url":"https://github.com/andrey-brill"},"license":"MIT","bugs":{"url":"https://github.com/andrey-brill/a-bundle/issues"},"homepage":"https://github.com/andrey-brill/a-bundle","keywords":["library","bundle","module","assembling","chunk","entry"],"devDependencies":{},"dependencies":{},"gitHead":"28e7f905135ccb55997cc8501510d48f8402151e","_id":"a-bundle@1.0.3","_nodeVersion":"13.2.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-qIaHR/8KAGIBJzXVNLCvV8YP/wIqxGVues3vO8G1JnJprtf/CobWNXShUm0JHRtcM9+fkeCDk/AVaHNWtNy+Sw==","shasum":"554058697f36928e28f8caa3df30fad87f6e4c22","tarball":"https://registry.npmjs.org/a-bundle/-/a-bundle-1.0.3.tgz","fileCount":8,"unpackedSize":9269,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejiDrCRA9TVsSAnZWagAAaPsP/R384eicFPsy3uY/9nFE\nYI8cpaQxotlMPuhqhUsrL5aRZkU56Y8cOvH3btfemSxmTaefKWNJkCDOp9nR\nzaqQm8a1ltC6DaYEnbQcZeKvUHBwWiEEmSxsgLC60bc+gne6/N8/8vVSN0rs\nNLGHGtsp42QWQFdk+gGhS5ctiYHtD1uMLhrNlD5VoMO20719NmY/SPG0XYGz\n5BV3rweqlTI5LasLM75+yertyiNak6EfW0yTjrgYLyWTHwCBWFUfTBUTo5+g\nXnMHi8JjYxY9KUUYsf5vGuz7U25t5BY//PAkWKyrrtlvjFI2b2FDarVblMif\nrenXZrH+kXfxKOV6VZ9LLsk3ccxSbeMmwm2vhAr8Uv2YQsVSpjpaV1OnQfzP\nIpLu4m0DtjJWDb0NUUtq+ICZIFdTX4BLolMVbnEguRvRwjRUrvZIfnXdx4Nq\ns2m9t/wr8CeD1IVCbVNZMBi/OnwZpFKycxA+KLH7nj15MWDWILAxRXNn3Od1\n8nmn8NNYQ6qVrrjhMGQL8Z23jlTh/MeefWxOUe+QIAE3R4jUuBoNTmGCX96R\nSMdMCPINpsiKlcAJQywuBNkL9AQOlS+62Lgl9f2GeybEetSGhvMY95iGOHg3\nsXv2KOekkBZvgmlzy/qAITYDFQ5JS64IHiUW1dfbPegy5fWXlGqe6ifpA+TY\nhRTz\r\n=EBaN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDWcXYcwtusUGfF+r4sI3Pf00TjrX9Y5bg7F2e7Kf8YEAiAeZNnpuNrdzXqGxCsgIcuyp9ei5ur6h9MtFitu8LqsBA=="}]},"maintainers":[{"name":"andrey-brill","email":"andrey@a-brill.com"}],"_npmUser":{"name":"andrey-brill","email":"andrey@a-brill.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/a-bundle_1.0.3_1586372842618_0.5394223735901174"},"_hasShrinkwrap":false}},"time":{"created":"2020-03-25T12:02:01.909Z","1.0.0":"2020-03-25T12:02:02.035Z","modified":"2022-04-11T12:17:31.314Z","1.0.1":"2020-03-25T15:00:32.314Z","1.0.2":"2020-03-25T19:27:47.499Z","1.0.3":"2020-04-08T19:07:22.766Z"},"maintainers":[{"name":"andrey-brill","email":"andrey@a-brill.com"}],"description":"Assemble smarter. Develop faster.","homepage":"https://github.com/andrey-brill/a-bundle","keywords":["library","bundle","module","assembling","chunk","entry"],"repository":{"type":"git","url":"git+https://github.com/andrey-brill/a-bundle.git"},"author":{"name":"Andrey Brill","email":"andrey@a-brill.com","url":"https://github.com/andrey-brill"},"bugs":{"url":"https://github.com/andrey-brill/a-bundle/issues"},"license":"MIT","readme":"\r\n# ABundle\r\n\r\n__Assemble smarter. Develop faster.__\r\n\r\n### Reasons\r\n\r\n- Make most common way to developing anything on JavaScript in modular way\r\n- Make connecting between modules clear and transparent\r\n- Use power of webpack with the simplest configuration\r\n- Less custom features as possible to prevent painful support\r\n\r\n### Solution\r\n\r\nABundle - a middleware object for sharing resources to make possible\r\n\r\n- import modules in different ways for make development faster\r\n- better connect and assembling modules\r\n\r\n### Common structure of module\r\n\r\n```\r\n\r\npackage.json\r\n\r\n    \"name\": \"my-module\",\r\n    \"source\": \"entry/entry.js\"\r\n    ...\r\n\r\n\r\n// contains raw sources of module\r\n// the sources should be compiled before use\r\n/@src\r\n\r\n\r\n    chunk-name.js\r\n\r\n        // should be the same as module name (in package.json)\r\n        const CHUNK_NAME = 'my-module';\r\n\r\n        export { CHUNK_NAME };\r\n\r\n\r\n    // all code must import externals modules only from here\r\n    chunk-e.js\r\n\r\n        // only imports of 'a-bundle' and 'chunk-name' is allowed\r\n        import { CHUNK_NAME } from './chunk-name.js';\r\n        import { ABundle } from 'a-bundle';\r\n\r\n        const chunk = ABundle.get(CHUNK_NAME);\r\n\r\n        // highly recommend to convert kebab-case to pascal-case as is\r\n        const OtherModule = chunk.get('other-module');\r\n        const AnAnotherModule = chunk.get('an-another-module');\r\n\r\n        // exports of external modules\r\n        export { OtherModule, AnAnotherModule };\r\n\r\n\r\n    // export of module functionality\r\n    index.js\r\n\r\n        // do not use default\r\n        export * from './core/Core.js';\r\n        ...\r\n        export * from './helpers/StaticCore.js';\r\n\r\n\r\n    // imports of external modules\r\n    modules.js\r\n\r\n        import OtherModule from 'other-module';\r\n        import * as AnAnotherModule from 'an-another-module';\r\n\r\n        const MODULES = {\r\n            'other-module': OtherModule,\r\n            'an-another-module': AnAnotherModule\r\n        }\r\n\r\n        export { MODULES };\r\n\r\n\r\n// allows assemble module into another modules via webpack\r\n/entry\r\n\r\n    // initialization of AChunk\r\n    chunk-i.js\r\n\r\n        import { ABundle, Chunk } from 'a-bundle';\r\n        import { CHUNK_NAME } from '../src/chunk-name.js';\r\n        import { MODULES } from '../src/modules.js';\r\n\r\n        const AChunk = new Chunk();\r\n        AChunk.putAll(MODULES);\r\n\r\n        ABundle.put(CHUNK_NAME, AChunk);\r\n\r\n        export { AChunk };\r\n\r\n\r\n    // exporting module in webpack module way\r\n    entry.js\r\n\r\n        import './chunk-i.js';\r\n        export * from '../src/index.js';\r\n\r\n\r\n```\r\n\r\n### EDD (example-driven development) with ABundle\r\n\r\n- fast development based on EDD\r\n- external modules will be compiled __once__ into a global bundle\r\n\r\n```\r\n\r\n/examples\r\n\r\n\r\n    /src\r\n        // initialization of ABundle.get(CHUNK_NAME) from global variables (e.g. `window.modules`)\r\n        chunk-i.js\r\n\r\n        // import 'chunk-i.js'\r\n        // import { .. } from 'index.js'\r\n        // some functionality to test and develop library\r\n        examples.js\r\n        examples.scss\r\n\r\n        // in development to /spa/build/examples.js\r\n        // in production to /docs/dist/examples.[hash].js\r\n        webpack.config.js\r\n\r\n\r\n    // build all external modules into UMD library for development purposes\r\n    /modules\r\n\r\n        // contains prebuilt globally assigned modules\r\n        // `import { MODULES } from 'modules.js'`\r\n        // export default MODULES;\r\n        modules.js\r\n\r\n        // bundle builder in development to /spa/build/modules.js\r\n        // bundle builder in production to /docs/dist/modules.[hash].js\r\n        webpack.config.js\r\n\r\n\r\n    // content of SPA\r\n    /spa\r\n\r\n        // folders with built resources and assets\r\n        /build\r\n        /assets\r\n        favicon.ico\r\n\r\n\r\n// production build of examples for Github pages\r\n/docs\r\n\r\n```\r\n\r\n\r\n### Connecting different versions of same module\r\n\r\n#### Example:\r\n\r\n- 'my-module' is using react v17\r\n- 'external-module' is using react v15 (and incompatible with react v17)\r\n\r\n#### Solution 1 (NOT TESTED):\r\n\r\n- go to `my-module/node_modules/external-module`\r\n- `run npm i react@15`\r\n- so react v15 must be installed into `my-module/node_modules/external-module/node_modules`\r\n- now, during `external-module` compilation __webpack__ should take react from closest to the module `node_modules` folder\r\n\r\n#### Solution 2:\r\n\r\n```\r\n// react-module-legacy-entry.js\r\n\r\nimport React from '../react-v13/'\r\nimport { Chunk } from '../react-module/entry/chunk-i.js'\r\n\r\nChunk.replace('react', React);\r\n\r\nexport * from '../module-1/index.js'\r\n\r\n```","readmeFilename":"README.md"}