{"_id":"@ali-i18n-fe/intl-require-js","_rev":"1-7eac3e1da0edac72246c56480d3470f1","name":"@ali-i18n-fe/intl-require-js","dist-tags":{"latest":"1.0.13"},"versions":{"1.0.13":{"name":"@ali-i18n-fe/intl-require-js","version":"1.0.13","description":"require.js","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"dev":"webpack-dev-server --config webpack/webpack.dev.js","build":"webpack --config webpack/webpack.prod.js","watch":"concurrently \"tnpm run babel -- --watch\" \"tnpm run types -- --watch\"","test":"jest","babel":"babel src --out-dir lib --extensions \".js,.ts,.tsx\"","types":"tsc --emitDeclarationOnly","copy-css":"cpx \"src/**/*.{scss,json}\" lib","build-lib":"rimraf lib;tsc --emitDeclarationOnly; tnpm run babel; tnpm run copy-css","pub":"tnpm run build; tnpm publish","prettier":"pretty-quick --staged","prepublish":"npm run build && npm run babel && npm run types && npm run copy-css"},"pre-commit":["prettier"],"repository":{"type":"git","url":"git@code.aliyun.com:open-dada/intl-require-js.git"},"devDependencies":{"@babel/cli":"^7.2.3","@babel/core":"^7.3.4","@babel/plugin-proposal-class-properties":"^7.4.0","@babel/plugin-transform-classes":"^7.3.4","@babel/plugin-transform-modules-commonjs":"^7.4.0","@babel/plugin-transform-regenerator":"^7.4.0","@babel/preset-env":"^7.3.4","@babel/preset-react":"^7.8.3","@babel/preset-typescript":"^7.3.3","@types/jest":"^23.3.2","@types/lodash":"^4.14.149","@types/react":"^16.9.23","babel-loader":"^8.0.5","babel-plugin-dev-expression":"^0.2.1","babel-plugin-module-resolver":"^3.2.0","clean-webpack-plugin":"^0.1.19","concurrently":"^4.1.1","cpx":"^1.5.0","html-webpack-plugin":"^3.2.0","jest":"^23.6.0","pre-commit":"^1.2.2","prettier":"^1.17.0","pretty-quick":"^1.11.0","react":"^16.13.0","ts-jest":"^23.10.0","ts-loader":"^5.1.1","typescript":"^3.0.3","uglifyjs-webpack-plugin":"^2.1.3","webpack":"^4.19.1","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.8","webpack-merge":"^4.1.4"},"sideEffects":["*.css","*.scss"],"dependencies":{"lodash":"^4.17.15"},"gitHead":"e5d60e35a60c1691242a23a25f494816aa91cb31","_id":"@ali-i18n-fe/intl-require-js@1.0.13","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bEiCdX8gmjSR7NuqkzVZ9VB6xledVNrmVO16Z+QQI2IodwIHgb2/LW0nQDD3OUm3vO+CwMToQL0REYg0kZM7Fw==","shasum":"20eef03c257a531b5c0d6b9715a5295dc6ebcd54","tarball":"https://registry.npmjs.org/@ali-i18n-fe/intl-require-js/-/intl-require-js-1.0.13.tgz","fileCount":41,"unpackedSize":146380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1X+XCRA9TVsSAnZWagAATHQP/0bYIpauq1H81X9id+yF\nIMAtqU3LrH1ibOH9Sp08YYAGM8kPI9AkmBP8UwCQZ9smGI+FR4xFKWVsnq1D\nU9ncEWfiH93hZEXTDZXQYwnXeVT+4c+xO86aH8TR1K0tHc848aC5JICRqGGH\nIrWvy89qWziZoqkl0NT4nojzEW12FX+zWEL8Zu90cNQvgKHo1AqtVqGC0uam\nm7y+U99vrmVyXS9DVx3B4S1Vz9M2/8lcBv2wXSltYPbb3iuPALfDZwDRtT81\nV5wptDOWT51WwHCvPoDdR2k3Vv2lThs/lCSVTPy0HRso7R/2e1y7fU3dLheu\n8s5EAY9ShJG++WF/zyWrRqt898XRFejAnBfD+Kx3tbFQcQ4jNHhMOzDR/Lu3\n1aXgKp2+Jb1+EkVRRGPYsuziMGv9KiVZVo5u5mLg0KrjLfb3QBXxkCetEgVM\nVn7Ux0XBsjEWKwPJYoeoAUBIAvG0siFXolmNLESAyHjk6tlH+0TUd2k/IyrR\nHmpG4AicxEp10ye8fsKk9SeTILpNPRFpMOGF4k2C8CnD9UJS2znk19EUcsQM\neFB3cwpnLdwqIICnt6E5xQ/A1CKd9aZjae/4vskWDxQueQXDrLwATsGIGtSA\nurUTRyRhe4yvIx8KiO54eHmnbSvnAcy2IBJCViYvuioahCKZubiPkRmHmyzb\nIcLy\r\n=02Fo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwEBuo3bUKBCg9bEguQ4USs7lT+b9/z4l3ux4ml/zWegIhANdYz6fyWixfTda4hUHcGYgrVOkLftL+Vv8roNwk/5+w"}]},"_npmUser":{"name":"international_fe_alibaba","email":"international_fe@alibaba-inc.com"},"directories":{},"maintainers":[{"name":"international_fe_alibaba","email":"international_fe@alibaba-inc.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/intl-require-js_1.0.13_1607827351009_0.7580906900834912"},"_hasShrinkwrap":false}},"time":{"created":"2020-12-13T02:42:30.737Z","1.0.13":"2020-12-13T02:42:31.145Z","modified":"2022-04-04T12:53:11.811Z"},"maintainers":[{"name":"international_fe_alibaba","email":"international_fe@alibaba-inc.com"}],"description":"require.js","repository":{"type":"git","url":"git@code.aliyun.com:open-dada/intl-require-js.git"},"readme":"# intl-require-js\n\n[![Using TypeScript](https://img.shields.io/badge/%3C/%3E-TypeScript-0072C4.svg)](https://www.typescriptlang.org/)\n[![](https://npm.alibaba-inc.com/badge/v/@alife/intl-require-js.svg)](https://npm.alibaba-inc.com/package/@alife/intl-require-js)\n[![](https://npm.alibaba-inc.com/badge/d/@alife/intl-require-js.svg)](https://npm.alibaba-inc.com/package/@alife/intl-require-js)\n\n基于 RequireJS 封装的，适合业务使用的异步模块加载器\n\n- 支持加载 AMD 规范模块\n- 支持阿里 CDN Combo 模块\n- 支持 CSS 加载\n- 支持 JSON 加载\n- 根据 Url 自动适配加载\n- Promise 规范\n\n# Usage\n\n```typescript\nimport RequireJS from '@alife/intl-require-js';\n\nconst moduleUrls = {\n  js: 'https://g.alicdn.com/code/npm/@alife/intl-comp-cms-one-step-banner/1.0.15/index.js',\n  css: 'https://g.alicdn.com/code/npm/@alife/intl-comp-cms-one-step-banner/1.0.15/index.css',\n  json: 'https://g.alicdn.com/code/npm/@alife/intl-comp-cms-one-step-banner/1.0.15/typeFile.json',\n};\n\nconst module = await RequireJS.loadScript(moduleUrls.js);\nawait RequireJS.loadCss(moduleUrls.css);\nconst json = await RequireJS.loadJson(moduleUrls.json);\n\n// or just use like this\n\n\nconst module = await RequireJS.load(moduleUrls.js);\nawait RequireJS.load(moduleUrls.css);\nconst json = await RequireJS.load(moduleUrls.json);\n\n\n```\n\n# Development\n\n### install\n\n```\nyarn\n```\n\n### start project\n\n```\nyarn start\n```\n\n### build npm package\n\n```\nyarn babel\n```\n\n### build umd package\n\n```\nyarn build\n```\n","readmeFilename":"README.md"}