Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse-deloitte committed Jun 11, 2019
0 parents commit 1e1b980
Show file tree
Hide file tree
Showing 21 changed files with 28,547 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
quote_type = single

[*.md]
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .eslintrc
@@ -0,0 +1,2 @@
extends:
- '@frosti/eslint-config-react'
28 changes: 28 additions & 0 deletions .gitignore
@@ -0,0 +1,28 @@
# * Files
*.log
npm-debug.log*
node_modules

# . Files
.DS_Store
*.cache
*.pem

# ENV Files
.env
.env.development
.env.development.local
.env.local
.env.test.local
.env.test
.env.production
.env.production.local

# Build Files
.dist
coverage


# HOSTING
.firebase
**/.firebaserc
3 changes: 3 additions & 0 deletions .npmignore
@@ -0,0 +1,3 @@
src
*.log
index.js
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
10.15
11 changes: 11 additions & 0 deletions .prettierrc
@@ -0,0 +1,11 @@
semi: true
singleQuote: true
trailingComma: none
arrowParens: always
printWidth: 120
overrides:
- files:
- '.eslintrc'
- '.prettierrc'
options:
parser: 'yaml'
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,5 @@
# Changelog

## 0.1.0

- Initial release
9 changes: 9 additions & 0 deletions LICENSE
@@ -0,0 +1,9 @@
MIT LICENSE

Copyright (c) 2019, Jesse Weed http://jesseweed.com

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.
42 changes: 42 additions & 0 deletions README.md
@@ -0,0 +1,42 @@
# Frosti Server

Express powered Node server powering Frosti server-side-rendering fro apps created with [frosti cli](https://github.com/frostijs/cli).

## Usage

You should rarely need to interact with this directly, it will be automaticalyl imported and configured for you when you use the [frosti cli](https://github.com/frostijs/cli) to create a new app. However if you would like to use it from scratch, it's pretty straight-forward:

#### React

```
import path from 'path';
import server from '@frosti/server';
import { Helmet } from 'react-helmet';
// Base React component for Server
import Server from './render/Server';
server({
App: Server,
library: 'react',
Helmet,
root: path.join(__dirname, '../'),
template: '/src/template.html' // Relative to ROOT Dir
});
```

#### Vanilla JS

```
import path from 'path';
import server from '@frosti/server';
import config from '../config/app';
server({
template: '/src/template.html',
root: path.join(__dirname, '../'),
config
});
```
43 changes: 43 additions & 0 deletions babel.config.js
@@ -0,0 +1,43 @@
require.extensions['.css'] = () => {};
require.extensions['.scss'] = () => {};
require.extensions['.styl'] = () => {};

const BABEL = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: '8',
browsers: '> 5% in US'
}
}
],
'@babel/preset-react'
],
plugins: [
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-syntax-dynamic-import',
'transform-postcss',
[
'module-resolver',
{
root: ['./'],
alias: {
'@src': './src',
'@containers': './src/containers',
'@components': './src/components',
'@css': './src/css/',
'@styles': './src/css/',
'@config': './config',
'@dist': './.dist',
'@lib': '../lib',
'@public': './public',
'@test': './test'
}
}
]
]
};

module.exports = BABEL;

0 comments on commit 1e1b980

Please sign in to comment.