https://github.com/phildl/owl-javascript-tailwind-project-starter
https://github.com/phildl/owl-javascript-tailwind-project-starter
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/phildl/owl-javascript-tailwind-project-starter
- Owner: PhilDL
- Created: 2021-06-10T06:50:05.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-10T06:50:59.000Z (about 5 years ago)
- Last Synced: 2025-02-21T18:42:41.355Z (over 1 year ago)
- Language: JavaScript
- Size: 112 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OWL Javascript Project Starter
This repo is an example on how to start a real project with the Odoo OWL framework.
Thanks to @SimonGenin for it's [original Starter Project for OWL](https://github.com/SimonGenin/OWL-JavaScript-Project-Starter)
[](https://app.netlify.com/start/deploy?repository=https://github.com/Coding-Dodo/OWL-JavaScript-Tailwind-Project-Starter)
## Features
- [OWL](https://github.com/odoo/owl)
- Javascript
- Livereload
- Rollup.js
- Tailwind and PostCSS
- Tests with Jest
## Installation
[This repo is a "template repository". It means you can quickly create repositories based on this one, without it being a fork.](https://docs.github.com/en/free-pro-team@latest/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template#about-repository-templates)
Otherwise, you may clone it:
```bash
git clone https://github.com/Coding-Dodo/OWL-JavaScript-Tailwind-Project-Starter.git
```
Install dependencies:
```bash
npm install
```
Dev with livereload:
```bash
npm run dev
```
Production build
```bash
npm run build
```
Run tests
```bash
npm run test
```
## Components
It is expected to create components in one file, following this convention:
```js
import { Component, useState, tags } from "@odoo/owl";
const APP_TEMPLATE = tags.xml/*xml*/ `
Hello
`;
export class App extends Component {
static template = APP_TEMPLATE;
state = useState({ text: "Owl" });
update() {
this.state.text = this.state.text === "Owl" ? "World" : "Owl";
}
}
```
## See also
If your are searching for the a project starter without Tailwind:
[https://github.com/Coding-Dodo/OWL-JavaScript-Project-Starter](https://github.com/Coding-Dodo/OWL-JavaScript-Project-Starter)