Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Shopify/function-examples
https://github.com/Shopify/function-examples
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/Shopify/function-examples
- Owner: Shopify
- License: mit
- Created: 2021-09-14T18:31:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T08:10:31.000Z (5 months ago)
- Last Synced: 2024-05-29T16:57:15.815Z (5 months ago)
- Language: JavaScript
- Size: 21.1 MB
- Stars: 161
- Watchers: 258
- Forks: 47
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- jimsghstars - Shopify/function-examples - (JavaScript)
README
# Function Examples
This is the home of all the public examples of Shopify Functions. It's used by the CLI when running `yarn shopify app generate extension`. Feel free to look around! Do not edit these files directly.
## Local Development
### Expand Liquid Templates
If you wish to run the samples directly from this repository, you must first expand any `.liquid` templates with the following command.
```shell
yarn
yarn expand-liquid
# optionally provide the language flavor
yarn expand-liquid vanilla-js
yarn expand-liquid typescript
```### Run Tests
```shell
# JavaScript
yarn test-js
# TypeScript
yarn test-ts
# Rust
cargo test
```### Lint
```shell
# currently only applies to Rust
cargo fmt
cargo clippy -- -D warnings
```