Skip to content

Commit

Permalink
remove soon deprecated vue filters
Browse files Browse the repository at this point in the history
  • Loading branch information
sergejcodes committed Mar 28, 2021
1 parent e78c4c0 commit 8efcf3e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Shopify Theme Lab is a customizable modular development environment for blazing-
- [Autoprefixer](https://github.com/postcss/autoprefixer)
- [PurgeCSS](https://tailwindcss.com/docs/optimizing-for-production#removing-unused-css) integrated in Tailwind CSS
- Shopify remote theme auto-reloading with [shopify-theme-lab-reloader](https://github.com/uicrooks/shopify-theme-lab-plugins/tree/master/packages/reloader)
- Auto-loading of Vue `components`, `mixins`, `directives` and `filters` as well as Vuex `modules` with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext)
- Auto-loading of Vue `components`, `mixins` and `directives` as well as Vuex `modules` with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext)
- Clean [config structure](.config/)
- Easily adjustable/extendable configurations
<!-- features (end) -->
Expand Down Expand Up @@ -537,7 +537,7 @@ By running `shopify:init` and entering credentials, the task initializes a new t
### Shopify + webpack
- All webpack configs are inside `.config/webpack/` directory
- [main.js](src/main.js) is webpack's main entry point
- All Vue related files are auto-loaded by webpack with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext) - Vue components, Vuex modules, as well as mixins, directives and filters with `global` in their filename. Everything is defined in `src/main.js`
- All Vue related files are auto-loaded by webpack with [require.context](https://webpack.js.org/guides/dependency-management/#requirecontext) - Vue components, Vuex modules, as well as mixins and directives with `global` in their filename. Everything is defined in `src/main.js`
- Vue components can be either used as regular single-file-components or as [renderless components](https://css-tricks.com/building-renderless-vue-components) without `<template></template>` tags (You can use Liquid templating while hooking in Vue functionality).
- The webpack bundle and all other assets are outputted to `shopify/assets/` directory. This directory is cleaned on every build. If you want to keep certain files add `static` to their filenames: `myfile.static.png`

Expand Down
11 changes: 0 additions & 11 deletions shopify/snippets/vue-examples.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@
this text
</div>
</div>

<!-- global filter: src/vue/filters/global.filter.js -->
<div>
<div class="shopify-theme-lab__subline">
Global Vue filter
</div>

<div>
{% raw %}{{ 'this text' | my-filter }}{% endraw %}
</div>
</div>
</div>

<div class="shopify-theme-lab__example">
Expand Down
11 changes: 0 additions & 11 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,6 @@ directives.keys().forEach(key => {
Vue.directive(directive.name, directive.directive)
})

/**
* vue filters
* auto-register all filters with a 'global' keyword in their filename
*/
const filters = require.context('./vue/filters/', true, /.*global.*\.js$/)

filters.keys().forEach(key => {
const filter = filters(key).default
Vue.filter(filter.name, filter.filter)
})

/**
* vue prototype
* extend with additional features
Expand Down
4 changes: 0 additions & 4 deletions src/vue/filters/global.filter.js

This file was deleted.

0 comments on commit 8efcf3e

Please sign in to comment.