Skip to content

Instantly share code, notes, and snippets.

@haydenk
Created July 21, 2024 03:02
Show Gist options
  • Save haydenk/d248642fda2c49b0ba0b830c9d63d7dd to your computer and use it in GitHub Desktop.
Save haydenk/d248642fda2c49b0ba0b830c9d63d7dd to your computer and use it in GitHub Desktop.
Shopify App Jouney
const config = {
sourcemap: "external",
entrypoints: ["app/javascript/application.js", "app/javascript/shopify.js"],
outdir: path.join(process.cwd(), "app/assets/builds"),
};
{
"scripts": {
"build:css:compile": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application.css ./app/assets/stylesheets/shopify.scss:./app/assets/builds/shopify.css --no-source-map --load-path=node_modules",
"build:css:prefix": "postcss ./app/assets/builds/*.css --use=autoprefixer --dir=./app/assets/builds",
"build:css": "bun run build:css:compile && bun run build:css:prefix",
"watch:css": "nodemon --watch ./app/assets/stylesheets/ --ext scss --exec \"bun run build:css\"",
"build": "bun bun.config.js"
},
}
# config/routes.rb
get '/shopify/', :to => 'shopify#index'
mount ShopifyApp::Engine, at: '/shopify'
# config/initializers/shopify_app.rb
ShopifyApp.configure do |config|
...
config.login_url = '/shopify/login'
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment