Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/move-desktop' into merge
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlean committed Feb 28, 2019
2 parents a21348a + da8fb7b commit c91c249
Show file tree
Hide file tree
Showing 105 changed files with 35,041 additions and 0 deletions.
19 changes: 19 additions & 0 deletions projects/desktop/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": {
"development": {
"presets": [["@babel/preset-react", { "development": true }]]
},
"test": {
"presets": ["@babel/env"]
}
},
"plugins": [
"@babel/plugin-proposal-class-properties",
"react-hot-loader/babel"
],
"presets": [
["@babel/env", { "modules": false }],
"@babel/preset-flow",
"@babel/preset-react"
]
}
1 change: 1 addition & 0 deletions projects/desktop/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
1 change: 1 addition & 0 deletions projects/desktop/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jest.config.js
49 changes: 49 additions & 0 deletions projects/desktop/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended",
"plugin:react/recommended",
"plugin:jest/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"plugins": [
"flowtype",
"react",
"jest"
],
"rules": {
"indent": [
"error",
2,
{ "SwitchCase": 1 }
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
]
},
"settings": {
"react": {
"version": "16.6",
"flowVersion": "0.83"
}
}
}
18 changes: 18 additions & 0 deletions projects/desktop/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[ignore]
<PROJECT_ROOT>/stats.*.json

[include]

[libs]

[lints]

[options]
module.file_ext=.css
module.file_ext=.js
module.file_ext=.json
module.file_ext=.jsx
module.file_ext=.mjs
module.file_ext=.scss
module.name_mapper.extension='css' -> 'empty/object'
module.name_mapper.extension='scss' -> 'empty/object'
8 changes: 8 additions & 0 deletions projects/desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
build/
coverage/
flow-typed/
node_modules/
.eslintcache
*.sublime-workspace
stats.*.json
yarn-error.log
7 changes: 7 additions & 0 deletions projects/desktop/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "stylelint-config-recommended",
"rules": {
"indentation": 2,
"linebreaks": "unix"
}
}
21 changes: 21 additions & 0 deletions projects/desktop/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018-2019 Matthew Lean

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
16 changes: 16 additions & 0 deletions projects/desktop/PATHS.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const path = require('path')

module.exports = {
assets: '/assets',
build: path.join(__dirname, 'build/production/webpack'),
root: path.join(__dirname),
src: path.join(__dirname, 'src'),
main: {
build: path.join(__dirname, 'build/development/main'),
src: path.join(__dirname, 'src/main')
},
renderer: {
build: path.join(__dirname, 'build/development/renderer'),
src: path.join(__dirname, 'src/renderer')
}
}
92 changes: 92 additions & 0 deletions projects/desktop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Lean JavaScript Application Starter
Skip boilerplate setup and get straight to the code you care about for your next JavaScript application.

## Overview
### 🚀 Simple Setup
Follow a few simple steps in the ["Getting Started" documentation](docs/getting_started.md) and get straight to coding!

### 🌙 Consistent Codebase Across Multiple Environments
Consistent JavaScript standard, dependencies, and configuration no matter what environment you're building for.

| 🏄‍ Web Browser | 🌐 Node.js | 🖥️ Desktop |
|--------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------|
| [JavaScript (ES2015)](docs/javascript_features.md) | [JavaScript (ES2015)](docs/javascript_features.md) | [JavaScript (ES2015)](docs/javascript_features.md) |
| [Babel](https://babeljs.io) | [Babel](https://babeljs.io) | [Babel](https://babeljs.io) |
| [Flow](https://flow.org) | [Flow](https://flow.org) | [Flow](https://flow.org) |
| [Jest](https://jestjs.io) | [Jest](https://jestjs.io) | [Jest](https://jestjs.io) |
| [webpack](https://webpack.js.org) | [webpack](https://webpack.js.org) | [webpack](https://webpack.js.org) |
| [React](https://reactjs.org) | [React](https://reactjs.org) | [React](https://reactjs.org) |
| [Redux](https://redux.js.org) | [Redux](https://redux.js.org) | [Redux](https://redux.js.org) |
| [React Router](https://reacttraining.com/react-router) | [React Router](https://reacttraining.com/react-router) | [React Router](https://reacttraining.com/react-router) |
| [Sass](https://sass-lang.com) | [Sass](https://sass-lang.com) | [Sass](https://sass-lang.com) |
| | [Node.js](https://nodejs.org) | [Electron](https://electronjs.org) |
| | [Express](https://expressjs.com) | |
| | [MongoDB](https://mongodb.com) | |
| | [Mongoose](https://mongoosejs.com) | |

Future support for more environments and libraries are being considered.

### 👩‍💻 Helpful Features for Development
#### Useful Tooling
Plugins, source maps, scripts, and tool integrations like Redux DevTools, Devtron, and many others are already setup for you to make debugging easier.

Optionally use Flow, ESLint, and stylelint to help identify potential problems and produce better, safer code.

#### Automatic Reloading & Hot Loading
No need to manually refresh, rebuild, and rerun your apps during development. Let a script automate all of that for you so you can see your changes as soon as possible. When coding with React, take advantage of hot loading so you can tweak components in real-time without refreshing and losing state.

#### Server-Side Rendering Support
Render React components on the server and neatly integrate your browser and Node.js codebases together.

### 🏛️ Build For Production
Create a production ready build with one simple command. Minification and exclusion of unused code are all handled for you. Only the necessary JavaScript transformations/polyfills and CSS vendor prefixes for targeted browser versions are included. This ensures the build works everywhere you need while being the smallest size possible.

### 🔧 Fully Customizable
If you ever need to change the configuration for anything, you can easily do so. The starting codebases are small, documented, easy to understand, and ready to adjust to all of your needs.

## Get Started
### 🏄‍ Web Browser
#### Download
If you want to build an app for web browsers, start with the [latest `browser` release](https://github.com/IsaacLean/lean-js-app-starter/releases).

#### Examples
You can find some example browser apps in the following branches:

- [`todolist-browser`](https://github.com/IsaacLean/lean-js-app-starter/tree/todolist-browser): A todo list app. Connects with mock backend API.
- [`starchan-frontend`](https://github.com/IsaacLean/lean-js-app-starter/tree/starchan-frontend): The frontend app for an anonymous text board called *chan (pronounced star-chan). Requires connection with the *chan backend API on the [`nodejs` branch](https://github.com/IsaacLean/lean-js-app-starter/tree/nodejs).

[Click here for documentation on building browser apps.](docs/envs/browser/README.md)

### 🌐 Node.js
#### Downloads
If you want to build an app for Node.js, you have two options:

- [`nodejs`](https://github.com/IsaacLean/lean-js-app-starter/tree/nodejs): An Express, MongoDB, and Mongoose starter project
- [`nodejs-ssr`](https://github.com/IsaacLean/lean-js-app-starter/tree/nodejs-ssr): An Express, MongoDB, and Mongoose starter project that supports server-side rendering for React

You can find the latest releases for these on the [releases page](https://github.com/IsaacLean/lean-js-app-starter/releases).

#### Examples
The Node.js example apps come with the base projects in the following branches:

- [`nodejs`](https://github.com/IsaacLean/lean-js-app-starter/tree/nodejs): A REST API for an anonymous text board called *chan (pronounced star-chan). Optionally connects with the *chan frontend app on the [`starchan-frontend` branch](https://github.com/IsaacLean/lean-js-app-starter/tree/starchan-frontend).
- [`nodejs-ssr`](https://github.com/IsaacLean/lean-js-app-starter/tree/nodejs-ssr): A version of the *chan backend that supports server-side rendering of the frontend app.

[Click here for documentation on building Node.js apps.](docs/envs/nodejs/README.md)

### 🖥️ Desktop
#### Download
If you want to build an app for desktop, start with the [latest `desktop` release](https://github.com/IsaacLean/lean-js-app-starter/releases).

#### Examples
You can find an example desktop app in the following branch:

- [`todolist-desktop`](https://github.com/IsaacLean/lean-js-app-starter/tree/todolist-desktop): A todo list app ported from the browser targeted app on the [`todolist-browser` branch](https://github.com/IsaacLean/lean-js-app-starter/tree/todolist-browser).

[Click here for documentation on building desktop apps.](docs/envs/desktop/README.md)

### 🏊 Documentation
You can dive deeper into the project by reading the [documentation](docs/README.md) which is also included locally with each copy of the project in the [`docs/`](docs) folder.

## License
This open source project is licensed under the [MIT License](https://choosealicense.com/licenses/mit).
Loading

0 comments on commit c91c249

Please sign in to comment.