-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit with ReactQL scaffold
- Loading branch information
Showing
59 changed files
with
22,140 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
"targets": { | ||
"node": true | ||
} | ||
}] | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Meta | ||
**/.DS_Store | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules | ||
jspm_packages | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Distribution | ||
dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
max_line_length = 0 | ||
trim_trailing_whitespace = false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
const path = require('path'); | ||
const baseRules = require('eslint-config-airbnb-base/rules/style'); | ||
const [_, ...restricted] = baseRules.rules['no-restricted-syntax']; | ||
|
||
const PATHS = require('./config/paths'); | ||
|
||
module.exports = { | ||
extends: 'airbnb', | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
sourceType: 'module', | ||
jsx: true, | ||
}, | ||
env: { | ||
node: true, | ||
browser: true, | ||
}, | ||
plugins: [ | ||
'babel', | ||
'import', | ||
'jsx-a11y', | ||
'compat', | ||
], | ||
rules: { | ||
'arrow-parens': ['error', 'as-needed'], | ||
'react/forbid-prop-types': [1, { forbid: ['any']} ], | ||
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], | ||
'react/prefer-stateless-function': [2, { ignorePureComponents: true }], | ||
'react/no-multi-comp': 0, | ||
'react/jsx-closing-bracket-location': [1, 'after-props'], | ||
'react/prop-types': [1, { | ||
ignore: [ | ||
// `dispatch` is typically used by Redux `@connect` | ||
'dispatch', | ||
// `data` is injected by Apollo | ||
'data', | ||
], | ||
}], | ||
'linebreak-style': 0, | ||
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], | ||
'no-restricted-syntax': [2, | ||
...restricted.filter( | ||
r => !['ForOfStatement'].includes(r.selector) | ||
), | ||
], | ||
'global-require': 0, | ||
'import/no-unresolved': [2, { commonjs: true }], | ||
'compat/compat': 2 | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
paths: [ | ||
PATHS.root, | ||
'node_modules', | ||
], | ||
}, | ||
}, | ||
}, | ||
globals: { | ||
SERVER: false, | ||
}, | ||
}; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.8.5 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
before_install: | ||
- docker build -t reactql_kit . | ||
script: | ||
- docker run reactql_kit npm run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM debian:jessie-slim | ||
|
||
ENV EPHIMERAL_PACKAGES "build-essential dh-autoreconf curl xz-utils python" | ||
ENV PACKAGES "libpng-dev" | ||
|
||
# Add `package.json` to build Debian compatible NPM packages | ||
WORKDIR /src | ||
ADD package.json . | ||
|
||
# install everything (and clean up afterwards) | ||
RUN apt-get update \ | ||
&& apt-get install -y apt-utils \ | ||
&& apt-get install -y ${EPHIMERAL_PACKAGES} ${PACKAGES} \ | ||
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | ||
&& apt-get install -y nodejs \ | ||
&& cd /src \ | ||
&& npm i \ | ||
; apt-get remove --purge -y ${EPHIMERAL_PACKAGES} \ | ||
; apt-get autoremove -y ${EPHIMERAL_PACKAGES} \ | ||
; apt-get clean \ | ||
; apt-get autoclean \ | ||
; echo -n > /var/lib/apt/extended_states \ | ||
; rm -rf /var/lib/apt/lists/* \ | ||
; rm -rf /usr/share/man/?? \ | ||
; rm -rf /usr/share/man/??_* | ||
|
||
# Add the remaining project files | ||
ADD . . | ||
|
||
# Build distribution | ||
RUN npm run build | ||
|
||
# Set the default host/port | ||
ENV HOST 0.0.0.0 | ||
ENV PORT 4000 | ||
|
||
# Start the server by default | ||
CMD npm run server |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# By default, target only modern browsers | ||
|
||
last 3 versions |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// ---------------------- | ||
// IMPORTS | ||
|
||
const path = require('path'); | ||
|
||
// ---------------------- | ||
|
||
// Parent folder = project root | ||
const root = path.join(__dirname, '..'); | ||
|
||
module.exports = { | ||
// Root project folder. This is the current dir. | ||
root, | ||
|
||
// Kit. ReactQL starter kit code. You can edit these files, but be | ||
// aware that upgrading your starter kit could overwrite them | ||
kit: path.join(root, 'kit'), | ||
|
||
// Entry points. This is where webpack will look for our browser.js, | ||
// server.js and vendor.js files to start building | ||
entry: path.join(root, 'kit', 'entry'), | ||
|
||
// Webpack configuration files | ||
webpack: path.join(root, 'kit', 'webpack'), | ||
|
||
// Views for internal use | ||
views: path.join(root, 'kit', 'views'), | ||
|
||
// Source path; where we'll put our application files | ||
src: path.join(root, 'src'), | ||
|
||
// Static files. HTML, images, etc that can be processed by Webpack | ||
// before being moved into the final `dist` folder | ||
static: path.join(root, 'static'), | ||
|
||
// Dist path; where bundled assets will wind up | ||
dist: path.join(root, 'dist'), | ||
|
||
// Dist path for development; where dev assets will wind up | ||
distDev: path.resolve(root, 'dist', 'dev'), | ||
|
||
// Public. This is where our web server will start looking to serve | ||
// static files from | ||
public: path.join(root, 'dist', 'public'), | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
const defaultPreset = require('cssnano-preset-default'); | ||
|
||
module.exports = defaultPreset({ | ||
normalizeUrl: false, | ||
}); |
Oops, something went wrong.