Skip to content

Commit

Permalink
Adjust exports and rollup config (#2615)
Browse files Browse the repository at this point in the history
* Adjust exports setup

* Import from shepherd.js instead of public

* Update rollup config
  • Loading branch information
RobbieTheWagner authored Mar 5, 2024
1 parent c3fccba commit 02a7bef
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 86 deletions.
4 changes: 2 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ docs/
esdoc/
jsdoc-template/
landing/
site/
test/
tests/

.codeclimate.yml
.eslintrc.js
.gitignore
.stylelintrc.js
.travis.yml
cypress.json
cypress.config.js
index.html
jest.config.js
pnpm-lock.yaml
Expand Down
1 change: 1 addition & 0 deletions landing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@astrojs/sitemap": "^3.0.3",
"@astrojs/tailwind": "^5.0.3",
"astro": "^4.1.1",
"shepherd.js": "workspace:*",
"tailwindcss": "^3.3.5",
"typescript": "^5.3.2"
},
Expand Down
8 changes: 4 additions & 4 deletions landing/src/layouts/MainPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const { isHome } = Astro.props;
const shepherdIncludeCode = `
<link rel="stylesheet" href="shepherd.js/dist/css/shepherd.css"/>
<script src="shepherd.js/dist/shepherd.min.js"></script>
`;
---

Expand Down Expand Up @@ -172,13 +173,12 @@ const shepherdIncludeCode = `
<Footer />
</Base>

<!-- Shepherd -->
<script src="/shepherd.js" is:inline></script>

<!-- Welcome page -->
<script is:inline>
<script type="module" is:inline>
'use strict';

import Shepherd from './node_modules/shepherd.js/dist/shepherd.esm.js';

(function () {
function init() {
var shepherd = setupShepherd();
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
"Chuck Carpenter <[email protected]>"
],
"license": "MIT",
"main": "dist/shepherd.js",
"module": "dist/shepherd.esm.js",
"scripts": {
"build": "pnpm clean && rollup -c && pnpm postbuild",
"postbuild": "pnpm build:landing",
Expand Down Expand Up @@ -98,14 +96,13 @@
"replace": "^1.2.2",
"resize-observer-polyfill": "^1.5.1",
"rimraf": "^5.0.5",
"rollup": "^2.79.1",
"rollup": "^4.12.0",
"rollup-plugin-analyzer": "^4.0.0",
"rollup-plugin-copy": "^3.5.0",
"rollup-plugin-filesize": "^10.0.0",
"rollup-plugin-license": "^3.2.0",
"rollup-plugin-livereload": "^2.0.5",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-scss": "^4.0.0",
"rollup-plugin-serve": "^2.0.2",
"rollup-plugin-svelte": "^7.1.6",
"rollup-plugin-visualizer": "^5.11.0",
Expand All @@ -125,15 +122,20 @@
"registry": "https://registry.npmjs.org"
},
"exports": {
".": {
"import": "./dist/shepherd.esm.js",
"default": "./dist/shepherd.js"
},
"./*": {
"types": "./dist/types/*.d.ts",
"import": "./dist/*.esm.js",
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
}
},
"typesVersions": {
"*": {
"*": [
"dist/types/*"
"./dist/*"
]
}
}
Expand Down
Loading

0 comments on commit 02a7bef

Please sign in to comment.