Skip to content

Commit

Permalink
see if copying node_modules/ to modules/ fixes dependencies not being…
Browse files Browse the repository at this point in the history
… visible in Vercel
  • Loading branch information
trusktr committed Nov 1, 2023
1 parent 88aff86 commit 7309e40
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
node_modules
node_modules/
modules/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
modules/
.vscode

# ignore build output
Expand Down
4 changes: 2 additions & 2 deletions examples/ripple-flip.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
code:
`
<base href="${host}" /><script src="./importmap.js"><\/script>
<script src="${host}node_modules/tinycolor2/tinycolor.js"><\/script>
<script src="${host}node_modules/tween.js/src/Tween.js"><\/script>
<script src="${host}modules/tinycolor2/tinycolor.js"><\/script>
<script src="${host}modules/tween.js/src/Tween.js"><\/script>
<style>
html, body {
Expand Down
38 changes: 19 additions & 19 deletions importmap.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
const importmap = {
imports: {
lume: './node_modules/lume/dist/index.js',
'lume/': './node_modules/lume/',
'@lume/element': './node_modules/@lume/element/dist/index.js',
'@lume/variable': './node_modules/@lume/variable/dist/index.js',
'@lume/eventful': './node_modules/@lume/eventful/dist/index.js',
'@lume/kiwi': './node_modules/@lume/kiwi/dist/kiwi.js',
'@lume/three-projected-material/': './node_modules/@lume/three-projected-material/',
'@lume/autolayout': './node_modules/@lume/autolayout/dist/AutoLayout.js',
lowclass: './node_modules/lowclass/dist/index.js',
'james-bond': './node_modules/james-bond/dist/index.js',
regexr: './node_modules/regexr/dist/index.js',
'element-behaviors': './node_modules/element-behaviors/dist/index.js',
'@lume/custom-attributes/': './node_modules/@lume/custom-attributes/',
'solid-js': './node_modules/solid-js/dist/solid.js',
'solid-js/web': './node_modules/solid-js/web/dist/web.js',
'solid-js/html': './node_modules/solid-js/html/dist/html.js',
'solid-js/store': './node_modules/solid-js/store/dist/store.js',
three: './node_modules/three/src/Three.js',
'three/': './node_modules/three/',
lume: './modules/lume/dist/index.js',
'lume/': './modules/lume/',
'@lume/element': './modules/@lume/element/dist/index.js',
'@lume/variable': './modules/@lume/variable/dist/index.js',
'@lume/eventful': './modules/@lume/eventful/dist/index.js',
'@lume/kiwi': './modules/@lume/kiwi/dist/kiwi.js',
'@lume/three-projected-material/': './modules/@lume/three-projected-material/',
'@lume/autolayout': './modules/@lume/autolayout/dist/AutoLayout.js',
lowclass: './modules/lowclass/dist/index.js',
'james-bond': './modules/james-bond/dist/index.js',
regexr: './modules/regexr/dist/index.js',
'element-behaviors': './modules/element-behaviors/dist/index.js',
'@lume/custom-attributes/': './modules/@lume/custom-attributes/',
'solid-js': './modules/solid-js/dist/solid.js',
'solid-js/web': './modules/solid-js/web/dist/web.js',
'solid-js/html': './modules/solid-js/html/dist/html.js',
'solid-js/store': './modules/solid-js/store/dist/store.js',
three: './modules/three/src/Three.js',
'three/': './modules/three/',
},
}

Expand Down
36 changes: 18 additions & 18 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,37 @@
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>

<link rel="stylesheet" href="/node_modules/docsify-themeable/dist/css/theme-simple.css" />
<link rel="stylesheet" href="/node_modules/@lume/live-code/dist/live-code.css" />
<link rel="stylesheet" href="/node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css" />
<link rel="stylesheet" href="/modules/docsify-themeable/dist/css/theme-simple.css" />
<link rel="stylesheet" href="/modules/@lume/live-code/dist/live-code.css" />
<link rel="stylesheet" href="/modules/prismjs/plugins/line-numbers/prism-line-numbers.css" />

<link rel="stylesheet" href="/styles/index.css" />
</head>
<body class="line-numbers">
<div id="app"></div>

<script src="/node_modules/vue/dist/vue.min.js"></script>
<script src="/node_modules/@lume/live-code/dist/live-code.umd.min.js"></script>
<script src="/modules/vue/dist/vue.min.js"></script>
<script src="/modules/@lume/live-code/dist/live-code.umd.min.js"></script>

<script src="/docsify.config.js"></script>

<script src="/node_modules/docsify/lib/docsify.min.js"></script>
<script src="/modules/docsify/lib/docsify.min.js"></script>
<!-- TODO FIXME emoji plugin doesn't seem to do anything. -->
<!-- <script src="/node_modules/docsify/lib/plugins/emoji.min.js"></script> -->
<script src="/node_modules/docsify/lib/plugins/search.min.js"></script>
<!-- <script src="/modules/docsify/lib/plugins/emoji.min.js"></script> -->
<script src="/modules/docsify/lib/plugins/search.min.js"></script>

<!-- TODO Prism line numbers don't work, using vue-prism-editor numbers for now (do the Prism ones work with live editing?) -->
<script src="/node_modules/prismjs/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="/node_modules/prismjs/components/prism-bash.min.js"></script>
<script src="/node_modules/prismjs/components/prism-jsx.min.js"></script>
<script src="/node_modules/prismjs/components/prism-typescript.min.js"></script>
<script src="/node_modules/prismjs/components/prism-tsx.min.js"></script>
<script src="/modules/prismjs/plugins/line-numbers/prism-line-numbers.min.js"></script>
<script src="/modules/prismjs/components/prism-bash.min.js"></script>
<script src="/modules/prismjs/components/prism-jsx.min.js"></script>
<script src="/modules/prismjs/components/prism-typescript.min.js"></script>
<script src="/modules/prismjs/components/prism-tsx.min.js"></script>

<script src="/node_modules/docsify-themeable/dist/js/docsify-themeable.min.js"></script>
<script src="/node_modules/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="/node_modules/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="/node_modules/docsify-plugin-flexible-alerts/dist/docsify-plugin-flexible-alerts.min.js"></script>
<script src="/node_modules/docsify-tabs/dist/docsify-tabs.min.js"></script>
<script src="/modules/docsify-themeable/dist/js/docsify-themeable.min.js"></script>
<script src="/modules/docsify-copy-code/dist/docsify-copy-code.min.js"></script>
<script src="/modules/docsify-pagination/dist/docsify-pagination.min.js"></script>
<script src="/modules/docsify-plugin-flexible-alerts/dist/docsify-plugin-flexible-alerts.min.js"></script>
<script src="/modules/docsify-tabs/dist/docsify-tabs.min.js"></script>

<script src="/js/utils.js"></script>

Expand Down
6 changes: 3 additions & 3 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ const traditionalButtonExample = stripIndent(html`
const buttonsWithShadowExample = stripIndent(html`
<base href="${host}" />
<script src="./importmap.js"></script>
<script src="${host}node_modules/vue/dist/vue.js"></script>
<script src="${host}modules/vue/dist/vue.js"></script>
<!-- Tween.js is a lib for animating numbers based on "easing curves". -->
<script src="${host}node_modules/tween.js/src/Tween.js"></script>
<script src="${host}modules/tween.js/src/Tween.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
Expand Down Expand Up @@ -1794,7 +1794,7 @@ const originExample = stripIndent(html`
const morphingSpiralExample = stripIndent(html`
<base href="${host}" />
<script src="./importmap.js"></script>
<script src="./node_modules/vue/dist/vue.js"></script>
<script src="./modules/vue/dist/vue.js"></script>
<body>
<template>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"// Deploy happens when we push to origin/main, the build.yml file deploys to GitHub Pages.": "",
"start": "npm run build && npm run dev",
"dev": "node --experimental-import-meta-resolve ./dev-server.mjs",
"build": "npm run clean && npm run dist:copy && node ./build-api-docs.mjs",
"build": "npm run clean && npm run dist:copy && node ./build-api-docs.mjs && cpr node_modules modules",
"clean": "rimraf \"./api/**/!(.gitkeep)\" \"./guide/includes/**/!(.gitkeep)\"",
"test": "npm run prettier:check",
"prettier": "prettier . --write",
Expand Down

0 comments on commit 7309e40

Please sign in to comment.