Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from jxnblk/preact
Browse files Browse the repository at this point in the history
Add support for preact
  • Loading branch information
jxnblk authored Jun 6, 2018
2 parents ba9b0e7 + caa6bbd commit a096570
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 29 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ RAM includes support for the following app types:
- [Gatsby][gatsby]
- [Razzle][razzle]
- [Vue.js][vuejs]
- [Preact][preact]

To add support for another app, please [open a pull request](#contributing).

Expand Down Expand Up @@ -86,7 +87,6 @@ Some alternatives to this particular Electron setup include:

- [ ] Abstract create form to a more general purpose utility
- [ ] npm depencendy management
- [ ] Preact CLI support

## Contributing

Expand Down Expand Up @@ -123,3 +123,4 @@ No Babel transpilation is used, so be sure to use Electron-compatible modules an
[gatsby]: https://github.com/gatsbyjs/gatsby
[razzle]: https://github.com/jaredpalmer/razzle
[vuejs]: https://github.com/vuejs/vue
[preact]: https://github.com/developit/preact
59 changes: 31 additions & 28 deletions renderer/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,34 +240,37 @@ class Project extends React.Component {
}, 'Stop')
),
h(Flex, { alignItems: 'baseline', mb: 4 },
h(Pre, { fontSize: 0 },
dirname,
' ',
h(RebassLink, {
fontSize: 0,
href: '#!',
onClick: e => {
e.preventDefault()
open(`file://${dirname}`)
}
}, 'Open in Finder'),
' ',
h(RebassLink, {
fontSize: 0,
href: '#!',
onClick: e => {
e.preventDefault()
launchEditor(dirname, 1)
}
}, 'Open in Editor'),
' ',
h(RebassLink, {
href: '#!',
disabled: !listening,
color: listening ? 'cyan' : 'darken',
onClick: e => openBrowser(url),
children: url
})
h(Box, null,
h(Pre, { fontSize: 0 },
dirname,
),
h(Pre, { fontSize: 0 },
h(RebassLink, {
fontSize: 0,
href: '#!',
onClick: e => {
e.preventDefault()
open(`file://${dirname}`)
}
}, 'Open in Finder'),
' ',
h(RebassLink, {
fontSize: 0,
href: '#!',
onClick: e => {
e.preventDefault()
launchEditor(dirname, 1)
}
}, 'Open in Editor'),
' ',
h(RebassLink, {
href: '#!',
disabled: !listening,
color: listening ? 'cyan' : 'darken',
onClick: e => openBrowser(url),
children: url
})
)
),
h(Box, { mx: 'auto' }),
h(Text, { fontSize: 1, my: 2 },
Expand Down
9 changes: 9 additions & 0 deletions renderer/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ const appTypes = {
port: 8080,
run: 'run serve'
}
},
preact: {
name: 'Preact App',
install: 'preact-cli create default',
defaults: {
type: 'preact-cli',
port: 8080,
run: 'run start'
}
}
}

Expand Down

0 comments on commit a096570

Please sign in to comment.