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
{ | |
"basePath": "/v2", | |
"consumes": [ | |
"application/json" | |
], | |
"definitions": { | |
}, | |
"externalDocs": { | |
"description": "Kazoo documentation's Git repository", | |
"url": "https://docs.2600hz.com/dev" |
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
// Preact imports | |
import { h, render } from 'preact'; | |
// App component import | |
import App from './components/App'; | |
// We need to import the CSS so that webpack will load it. | |
// The MiniCssExtractPlugin is used to separate it out into | |
// its own CSS file. | |
import "../css/app.scss" |
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
import { h, render, Component, Fragment } from 'preact'; | |
class App extends Component { | |
constructor() { | |
super(); | |
this.state = { count: 0 }; | |
} | |
handleIncreaseClick() { | |
this.setState({ |
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
// ... | |
module.exports = (env, options) => { | |
// ... | |
return { | |
// ... | |
module: { | |
rules: [ | |
{ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<title>PhoenixPreact · Phoenix Framework</title> | |
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/> | |
<script defer type="text/javascript" src="<%= Routes.static_path(@conn, "/js/app.js") %>"></script> | |
</head> |
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
defmodule PhoenixPreactWeb.Router do | |
use PhoenixPreactWeb, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_flash | |
plug :protect_from_forgery | |
plug :put_secure_browser_headers | |
end |
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
{ | |
"presets": [ | |
"@babel/preset-env" | |
], | |
"plugins": [ | |
[ | |
"@babel/plugin-transform-react-jsx", | |
{ | |
"pragma": "h", | |
"pragmaFrag": "Fragment" |
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
$ npm install @babel/plugin-transform-react-jsx --save-dev |
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
// ... | |
module.exports = (env, options) => { | |
// ... | |
return { | |
// ... | |
module: { | |
// ... | |
}, |
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
$ npm install preact --save |
NewerOlder