Skip to content

Commit

Permalink
Clean up seed-theme
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Polhemus committed Jun 17, 2022
1 parent 217e965 commit 20cb271
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 46 deletions.
Empty file removed packages/seed-theme/.gitkeep
Empty file.
Empty file.
Binary file removed packages/seed-theme/frontend/assets/images/img.png
Binary file not shown.
Binary file removed packages/seed-theme/frontend/assets/images/img2.png
Binary file not shown.
7 changes: 0 additions & 7 deletions packages/seed-theme/frontend/entrypoints/anotherfile.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/seed-theme/frontend/entrypoints/theme.js
Expand Up @@ -12,10 +12,3 @@ import '../../modules/hero-slider/hero-slider'
import '../../modules/product-form/product-form'
import '../../modules/product-gallery/product-gallery'
import '../../modules/product-grid-toggle/product-grid-toggle'

import('../scripts/dynamic-thing').then((mod) => {
console.log('done!')
})

import imageUrl from '../assets/images/img2.png?url'
console.log({ imageUrl })
6 changes: 0 additions & 6 deletions packages/seed-theme/frontend/scripts/dynamic-thing.js

This file was deleted.

10 changes: 3 additions & 7 deletions packages/seed-theme/frontend/styles/theme.css
Expand Up @@ -2,14 +2,10 @@
* Theme.css
*/

@import "./layout.css";
@import "./typography.css";
@import "./overrides.css";
@import "./lib/layout.css";
@import "./lib/typography.css";
@import "./lib/overrides.css";

@tailwind base;
@tailwind components;
@tailwind utilities;

body {
background-image: url("../assets/images/img.png");
}
3 changes: 0 additions & 3 deletions packages/seed-theme/layout/theme.liquid
Expand Up @@ -24,8 +24,6 @@
{%- render 'social-meta-tags' -%}

<script>
window.themeAssetsBaseUrl = `{{ 't.js' | asset_url | split: '/t.js' | first }}`;
document.documentElement.className = document.documentElement.className.replace('no-js', 'js');
if (typeof Shopify !== 'undefined' && Shopify.designMode) {
Expand All @@ -34,7 +32,6 @@
</script>

{% render 'vite-tag' with 'theme.js' %}
{% render 'vite-tag' with 'anotherfile.js' %}

{{ content_for_header }}
</head>
Expand Down
18 changes: 3 additions & 15 deletions packages/seed-theme/snippets/vite-tag.liquid
@@ -1,16 +1,4 @@
{% liquid
assign file_url = vite-tag | prepend: 'http://localhost:5173/frontend/entrypoints/'
assign file_extension = vite-tag | split: '.' | last
assign css_extensions = 'css|less|sass|scss|styl|stylus|pcss|postcss' | split: '|'
assign is_css = false
for css_ext in css_extensions
if file_extension == css_ext
assign is_css = true
endif
endfor
%}
{% if is_css == true %}
{{ file_url | stylesheet_tag }}
{% else %}
<script src="{{ file_url }}" type="module" crossorigin="anonymous"></script>
{% if vite-tag == "theme.js" %}
<script src="{{ 'theme.08e043a1.js' | asset_url }}" type="module" crossorigin="anonymous"></script>
{{ 'theme.c8b19398.css' | asset_url | stylesheet_tag }}
{% endif %}
2 changes: 1 addition & 1 deletion packages/seed-theme/vite.config.js
Expand Up @@ -8,8 +8,8 @@ export default defineConfig({
plugins: [
// Add shopify plugin to enable entrypoint detection, smart generation of script and link tags, and support for importing assets into the bundle.
shopify({
entrypointsDir: 'frontend/entrypoints',
sourceCodeDir: 'frontend',
entrypointsDir: 'frontend/entrypoints',
themeRoot: ''
}),
shopifyModules({
Expand Down

0 comments on commit 20cb271

Please sign in to comment.