GithubHelp home page GithubHelp logo

gitbenji / slater-theme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from the-couch/slater-theme

0.0 1.0 0.0 1.45 MB

Shopify Starter theme based on slate

Home Page: https://slater-demo.myshopify.com

JavaScript 26.43% CSS 15.73% Liquid 57.84%

slater-theme's Introduction

SLATER

Slater than Slate. Minimaler than minimal.

Up and Running

Clone the repo to your local environment

git clone [email protected]:the-couch/slater-theme.git theme

cd theme

npm install or yarn install


Initial build

We need to upload our initial build of the theme, we can do this by running npm run build to compile the theme one time, from there we can zip the src archive and upload it to our Shopify environment.


Development

Duplicate the config-sample.yml and grab the creds from your shopify theme.

In two separate windows run the watch command (this is to allow us to use our own build process on top of Shopify Slate).

npm run watch:assets - watches js and css

npm run start - manages theme refresh/upload

Custom Routing

We're using operator to extend pjax style routing throughout the theme. This can be used to fetch/cache/handle transitions between routes. This can also help us init/code split specific javascript to specific routes (for example a flickity slideshow).

The code for handling this is found in lib/router

We use the afterRender and beforeRender methods for handling page transitions

To block a custom route add the no-ajax class to the url element.

Why

I think slate is awesome, but I don't like that it's a closed box, I love the flexibility of things like react-create-app because it let's you actually eject the project and extend it. So this is a bit of a hack but I think y'all enjoy it. If you don't like it though, you don't have to use it ;)

Why why

Slate is a really big step forward to Shopify theme development. However, we generally prefer Webpack to Gulp, vanilla js to jQuery, CSS to SCSS, functional to object-oriented, etc. We've removed the boilerplate in favor of nothing, and will be releasing packages to replace the functionality of Slate in the near future.

slater-theme's People

Contributors

estrattonbailey avatar iamkevingreen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.