{"_id":"@dungfs/ghost-portal","name":"@dungfs/ghost-portal","dist-tags":{"latest":"2.20.1"},"versions":{"2.20.1":{"name":"@dungfs/ghost-portal","version":"2.20.1","license":"MIT","repository":{"type":"git","url":"git://github.com/TryGhost/Ghost.git"},"author":{"name":"Ghost Foundation"},"unpkg":"umd/portal.min.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@sentry/react":"7.15.0","@sentry/tracing":"7.15.0","@testing-library/jest-dom":"5.16.5","@testing-library/react":"12.1.5","@testing-library/user-event":"14.4.3","react":"17.0.2","react-dom":"17.0.2","react-scripts":"5.0.1"},"scripts":{"start":"BROWSER=none react-scripts start","start:combined":"BROWSER=none node ./scripts/start-combined.js","start:dev":"node ./scripts/start-mode.js","dev":"node ./scripts/dev-mode.js","build":"npm run build:combined","build:original":"react-scripts build","build:combined":"node ./scripts/build-combined.js","build:bundle":"webpack --config webpack.config.js","test":"react-scripts test","test:ci":"yarn test --watchAll=false --coverage","test:unit":"yarn test:ci","eject":"react-scripts eject","lint":"eslint src --ext .js --cache","preship":"yarn lint","ship":"STATUS=$(git status --porcelain); echo $STATUS; if [ -z \"$STATUS\" ]; then yarn version; fi","postship":"git push ${GHOST_UPSTREAM:-origin} --follow-tags && yarn publish . --tag $npm_package_version","posttest":"yarn lint","analyze":"source-map-explorer 'umd/*.js'","prepublishOnly":"yarn build"},"eslintConfig":{"extends":["react-app","plugin:ghost/browser"],"plugins":["ghost"]},"browserslist":{"production":[">0.2%","not dead","not op_mini all"],"development":["last 1 chrome version","last 1 firefox version","last 1 safari version"]},"jest":{"coverageReporters":["cobertura","text-summary","html"]},"devDependencies":{"chalk":"4.1.2","chokidar":"3.5.3","copy-webpack-plugin":"11.0.0","minimist":"1.2.7","ora":"5.4.1","rewire":"6.0.0","serve-handler":"6.1.5","source-map-explorer":"2.5.3","webpack-cli":"4.10.0"},"resolutions":{"//":"See https://github.com/facebook/create-react-app/issues/11773","react-error-overlay":"6.0.11"},"gitHead":"fccb0f685f19024f55322d5fdbf5b900c302aeb9","description":"[![npm version](https://badge.fury.io/js/%40tryghost%2Fportal.svg)](https://badge.fury.io/js/%40tryghost%2Fportal)","bugs":{"url":"https://github.com/TryGhost/Ghost/issues"},"homepage":"https://github.com/TryGhost/Ghost#readme","_id":"@dungfs/ghost-portal@2.20.1","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-9uei96P+r3n9a4QDVj+ApiHQ0wQYnv9etFxk4i60BI9PVxinj5KhvZqHzoLenWgY5F/sLzGemsqlCyfqHkZazQ==","shasum":"c57a297349486139c643bd909b725e9742e6dd09","tarball":"https://registry.npmjs.org/@dungfs/ghost-portal/-/ghost-portal-2.20.1.tgz","fileCount":5,"unpackedSize":1919826,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAG6dMEthsMjD7zw4olalrLAuSp/82iUr7KIfOaMUyZfAiAqJlmpRY4ToYIUk+YqOwrQPJBVPk2oC4fspURTvm5JfQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfwKpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr6Nw/8C60L+djSYyxcSzJVPC/Ev2PkabK3/rsLTB4wEDP/EvwrFUsu\r\nThaZa9j7sEofJPkYAL2Y+3/Azg/9oDTnWRontXBQUg+96/wJetmC6ziO9W+K\r\n0IZF1jWxEGsgLdGz+mzDNQqb7YvwrN+ZQD/oWfareDyfv3E3voohC06o/eU4\r\n9DPe7sfAWq5qy1coxBB0Zz+Y96RD8tAa1gaYtZvIBAx+uicCc2NcpDnHAy0Q\r\nV9WrnN/OnY6+hOa75rLFohanEM/YSIX3io+vdYtdshBiz7CpJ+f3ayrnn8pD\r\n67tio9a1X0rs3zjL1pexXrkaaMcYOGuR2AAiv5VG65MEERltxI/MBCxHJEQc\r\nHa48K2hzFSPx4jLDJqHHI0JeA4DsgyKuJkO/7mcl0ULdZnIrUbi8iWyVsd17\r\nNDMpQDGKPGIsU1quyNbIVpcG3PwL50AmIAnRCXJq+5vJI3UFnvcVbhgemZ2J\r\nW8K+zCMl9jmNLoJcsVyXA55JaxrO2yM0tqnxngITvU3NT/yBGz1jgRMz0kD0\r\n2XDd3A6NpzqcZWxolIxzvRjORbqNuSqpj+RdP548JQ3d9+gl4DCDBz8A9XPp\r\n1hEXCOM6ctx2Ken4zbZYSxDvxZJF53S46i5tllinlw/7yLnKCDRcq+j1i8CH\r\nkK+1Ycde1FpU1K0NruhFZSR/fhL6RTEbodk=\r\n=HM6k\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dungfs","email":"dung@fosec.vn"},"directories":{},"maintainers":[{"name":"dungfs","email":"dung@fosec.vn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ghost-portal_2.20.1_1669268136858_0.39616769041973976"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-24T05:35:36.804Z","2.20.1":"2022-11-24T05:35:37.066Z","modified":"2022-11-24T05:35:37.191Z"},"maintainers":[{"name":"dungfs","email":"dung@fosec.vn"}],"description":"[![npm version](https://badge.fury.io/js/%40tryghost%2Fportal.svg)](https://badge.fury.io/js/%40tryghost%2Fportal)","homepage":"https://github.com/TryGhost/Ghost#readme","repository":{"type":"git","url":"git://github.com/TryGhost/Ghost.git"},"author":{"name":"Ghost Foundation"},"bugs":{"url":"https://github.com/TryGhost/Ghost/issues"},"license":"MIT","readme":"# Portal\n\n[![npm version](https://badge.fury.io/js/%40tryghost%2Fportal.svg)](https://badge.fury.io/js/%40tryghost%2Fportal)\n\n[Drop-in script](https://ghost.org/help/setting-up-portal/) to make the bulk of Ghost membership features work on any theme.\n\n## Usage\n\nGhost automatically injects Portal script on all sites running Ghost 4 or higher.\n\nAlternatively, Portal can be enabled on non-ghost pages directly by inserting the below script on the page.\n\n```html\n<script defer src=\"https://unpkg.com/@tryghost/portal@latest/umd/portal.min.js\" data-ghost=\"https://mymemberssite.com\"></script>\n```\n\nThe `data-ghost` attribute expects the URL for your Ghost site, which is the only input Portal needs to work with your site's membership data via Ghost APIs.\n\n### Custom trigger button\n\nBy default, the script adds a default floating trigger button on the bottom right of your page which is used to trigger the popup on screen.\n\nIts possible to add custom trigger button of your own by adding data attribute `data-portal` to any HTML tag on page, and also specify a specific [page](https://github.com/TryGhost/Ghost/blob/main/ghost/portal/src/pages.js#L13-L22) to open from it by using it as `data-portal=signup`.\n\nThe script also adds custom class names to this element for open and close state of popup - `gh-portal-open` and `gh-portal-close`, allowing devs to update its UI based on popup state.\n\nRefer the [docs](https://ghost.org/help/setup-members/#customize-portal-settings) to read about ways in which Portal can be customized for your site.\n\n## Basic Setup\n\nThis section is mostly relevant for core team only for active Portal development. Always use the unpkg link for testing/using latest released portal script.\n\n- Run `yarn start:dev` to start Portal in development mode\n- Open [http://localhost:3000](http://localhost:3000) to view it in the browser.\n- To use the local Portal script in a local Ghost site\n  - Update `config.local.json` in Ghost repo to add \"portal\" config pointing to local dev server url as instructed on terminal.\n  - By default, this uses port `5368` for loading local Portal script on Ghost site. It's also possible to specify a custom port when running the script using - `--port=xxxx`.\n\n## Available Scripts\n\nIn the project directory, you can also run:\n\n### `yarn start`\n\nRuns the app in the development mode.<br />\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.<br />\nYou will also see any lint errors in the console.\n\n### `yarn build`\n\nCreates the production single minified bundle for external use in `umd/portal.min.js`.  <br />\n\n### `yarn test`\n\nLaunches the test runner in the interactive watch mode.<br />\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n\n## Publish\n\nRun `yarn ship` to publish new version of script.\n\n`yarn ship` is an alias for `npm publish`\n\n- Builds the script with latest code using `yarn build` (prePublish)\n- Publishes package on npm as `@tryghost/portal` and creates an unpkg link for script at https://unpkg.com/@tryghost/portal@VERSION\n\n(Core team only)\n\n## Learn More\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n","readmeFilename":"README.md"}