-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d2c92e7
Showing
28 changed files
with
8,207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
build | ||
.now |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# demo-woocommerce | ||
|
||
This project was bootstrapped with [Frontity](https://frontity.org/). | ||
|
||
#### Table of Contents | ||
|
||
- [Launch a development server](#launch-a-development-server) | ||
- [Create your custom theme](#create-your-custom-theme) | ||
- [Create a production-ready build](#create-a-production-ready-build) | ||
- [Deploy](#deploy) | ||
|
||
### Launch a development server | ||
|
||
``` | ||
npx frontity dev | ||
``` | ||
|
||
Runs the app in development mode. Open http://localhost:3000 to view it in the browser. | ||
|
||
The site will automatically reload if you make changes inside the `packages` folder. You will see the build errors in the console. | ||
|
||
> Have a look at our [Quick Start Guide](https://docs.frontity.org/getting-started/quick-start-guide) | ||
### Create your custom theme | ||
|
||
``` | ||
npx frontity create-package your-custom-theme | ||
``` | ||
|
||
Use the command `npx frontity create-package` to create a new package that can be set in your `frontity.settings.js` as your theme | ||
|
||
> Have a look at our blog post [How to Create a React WordPress Theme in 30 Minutes](https://frontity.org/blog/how-to-create-a-react-theme-in-30-minutes/) | ||
### Create a production-ready build | ||
|
||
``` | ||
npx frontity build | ||
``` | ||
|
||
Builds the app for production to the `build` folder. | ||
|
||
This will create a `/build` folder with a `server.js` (a [serverless function](https://vercel.com/docs/v2/serverless-functions/introduction)) file and a `/static` folder with all your javascript files and other assets. | ||
|
||
Your app is ready to be deployed. | ||
|
||
> Get more info about [Frontity's architecture](https://docs.frontity.org/architecture) | ||
### Deploy | ||
|
||
With the files generated in the _build_ you can deploy your project | ||
|
||
#### As a node app | ||
|
||
Use `npx frontity serve` to run it like a normal Node app. | ||
|
||
This command generates (and runs) a small web server that uses the generated `server.js` and `/static` to serve your content | ||
|
||
#### As a serverless service | ||
|
||
Upload your `static` folder to a CDN and your `server.js` file to a serverless service, like Now or Netlify. | ||
|
||
> Get more info about [how to deploy](https://docs.frontity.org/deployment) a Frontity project | ||
--- | ||
|
||
### » Frontity Channels 🌎 | ||
|
||
We have different channels at your disposal where you can find information about the project, discuss about it and get involved: | ||
|
||
- 📖 **[Docs](https://docs.frontity.org)**: this is the place to learn how to build amazing sites with Frontity. | ||
- 👨👩👧👦 **[Community](https://community.frontity.org/)**: use our forum to [ask any questions](https://community.frontity.org/c/dev-talk-questions), feedback and meet great people. This is your place too to share [what are you building with Frontity](https://community.frontity.org/c/showcases)! | ||
- 🐞 **[GitHub](https://github.com/frontity/frontity)**: we use GitHub for bugs and pull requests. Questions are answered in the [community forum](https://community.frontity.org/)! | ||
- 🗣 **Social media**: a more informal place to interact with Frontity users, reach out to us on [Twitter](https://twitter.com/frontity). | ||
- 💌 **Newsletter**: do you want to receive the latest framework updates and news? Subscribe [here](https://frontity.org/) | ||
|
||
### » Get involved 🤗 | ||
|
||
Got questions or feedback about Frontity? We'd love to hear from you. Use our [community forum](https://community.frontity.org) yo ! ❤️ | ||
|
||
Frontity also welcomes contributions. There are many ways to support the project! If you don't know where to start, this guide might help → [How to contribute?](https://docs.frontity.org/contributing/how-to-contribute) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { NowRequest, NowResponse } from '@vercel/node' | ||
|
||
export default (req: NowRequest, res: NowResponse) => { | ||
res.json({ name: 'John', email: '[email protected]' }) | ||
} | ||
|
||
/* /api/woocommerce/checkout → our-wp.com/checkout (w/ credentials) */ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
const settings = { | ||
"name": "demo-woocommerce", | ||
"state": { | ||
"frontity": { | ||
"url": "https://test.frontity.org", | ||
"title": "Test Frontity Blog", | ||
"description": "WordPress installation for Frontity development" | ||
} | ||
}, | ||
"packages": [ | ||
{ | ||
"name": "@frontity/mars-theme", | ||
"state": { | ||
"theme": { | ||
"menu": [ | ||
[ | ||
"Home", | ||
"/" | ||
], | ||
[ | ||
"Nature", | ||
"/category/nature/" | ||
], | ||
[ | ||
"Travel", | ||
"/category/travel/" | ||
], | ||
[ | ||
"Japan", | ||
"/tag/japan/" | ||
], | ||
[ | ||
"About Us", | ||
"/about-us/" | ||
] | ||
], | ||
"featured": { | ||
"showOnList": false, | ||
"showOnPost": false | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "@frontity/wp-source", | ||
"state": { | ||
"source": { | ||
"api": "https://test.frontity.org/wp-json" | ||
} | ||
} | ||
}, | ||
"@frontity/tiny-router", | ||
"@frontity/html2react" | ||
] | ||
}; | ||
|
||
export default settings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"version": 2, | ||
"builds": [ | ||
{ | ||
"src": "package.json", | ||
"use": "@frontity/now" | ||
} | ||
] | ||
} |
Oops, something went wrong.