An open API service indexing awesome lists of open source software.

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

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)

[![Deploy on Netlify](https://www.netlify.com/img/deploy/button.svg)](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)