diff --git a/.travis.yml b/.travis.yml index 6e25621b..afc82b45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,23 @@ python: - 3.4 - 3.5 - pypy -cache: pip +cache: + - pip + - directories: + - .cache/pip/ + - docs/node_modules install: -- pip install --cache-dir $HOME/.cache/pip pytest pytest-cov coveralls flake8 six blinker pytest-django -- pip install --cache-dir $HOME/.cache/pip -e .[django] +- pip install --download-cache .cache/pip/ pytest pytest-cov coveralls flake8 six + blinker pytest-django +- pip install --download-cache .cache/pip/ -e .[django] - python setup.py develop script: - py.test --cov=graphene - flake8 after_success: - coveralls +- cd docs && npm run deploy + +env: + matrix: + secure: e0iu1FvUcGNcsKEDsGQiGTJZMJ8tJMAQ+c+KCuh7I11likoJbninI9FX85efMglG93Xu4GtND1rUwKWnANM94Cz5IrLrT9ga62Cg1sinbzD+JUOG9EobtmcYcLbfNvA1ybkZf4K0KvkYfH1XUxtL3v6jFI6lLjZ1vKa2M6i5t/38pjgUOOh9KlVGi+rqSp2TUsCyjZkMxE2Wwceen5N/B1yZJDn9yHPA+kiV2ScOMgZOuVMqQd0IAPcjhqTbNdaW2VjNQFtS8CQ8FOjJh9NepRAyA42oII7Aq65YzZbifzYL1eSPKKfUHHdc7Bs+vq1kGuaWz+XBqByZAQvw7OtpkecG+KrcO7XDV38y6z33vgCC5MPu9e0BZwITIvyuUOKmFA9vTAx/w963vBDSzHgskgqYtYswxzOoE55TS9tHsc5rgoSatEGW2VXyI8ytWpgkuluCNwT+/ZvNaQ33SCPTwN7mQGWx+DC+eyMBjI1sP9s4aYCaTggCSFNtwhRpQqqM/0HFa7hHDksK/zJhl4fhFUrbmyrJo6wm6Z7/s/WiSulk+zZkrLC9eBs1+XNtU7PzcmgfFmcsJnPGBmBF8WOa8WiX9hOn9DutBT4mLtlOod3YvU22U0Vwj2TjzhDvx8uyYCpDA03a/q9QjE4+klcI2Mw5UNhJsmTpCZQE06aHDKg= diff --git a/docs/.babelrc b/docs/.babelrc new file mode 100644 index 00000000..ce840ab8 --- /dev/null +++ b/docs/.babelrc @@ -0,0 +1,3 @@ +{ + "stage": 0 +} \ No newline at end of file diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..548fd2f1 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# 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 directory +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git +node_modules + +public/ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..2a8f240f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,16 @@ +# Graphene Docs +Docs for Graphene + + +## Installation + +For running locally this docs. You have to execute +```bash +npm install -g gatsby && npm install +``` + +And then + +```bash +gatsby develop +``` \ No newline at end of file diff --git a/docs/app.js b/docs/app.js new file mode 100644 index 00000000..148e5fd5 --- /dev/null +++ b/docs/app.js @@ -0,0 +1,11 @@ +exports.loadContext = function(callback) { + var context; + context = require.context('./pages', true); + if (module.hot) { + module.hot.accept(context.id, function() { + context = require.context('./pages', true); + return callback(context); + }); + } + return callback(context); +}; diff --git a/docs/assets/icon.js b/docs/assets/icon.js new file mode 100644 index 00000000..1d0b3c61 --- /dev/null +++ b/docs/assets/icon.js @@ -0,0 +1,7 @@ +import React from 'react'; + +export default class Icon extends React.Component { + render() { + return + } +} diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 00000000..297830fe --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1,10 @@ + diff --git a/docs/assets/starwars-icon.png b/docs/assets/starwars-icon.png new file mode 100644 index 00000000..b99a2a0a Binary files /dev/null and b/docs/assets/starwars-icon.png differ diff --git a/docs/assets/starwars-icon@2x.png b/docs/assets/starwars-icon@2x.png new file mode 100644 index 00000000..7f2239c3 Binary files /dev/null and b/docs/assets/starwars-icon@2x.png differ diff --git a/docs/config.toml b/docs/config.toml new file mode 100644 index 00000000..08df109a --- /dev/null +++ b/docs/config.toml @@ -0,0 +1 @@ +siteTitle="Graphene" diff --git a/docs/css/main.styl b/docs/css/main.styl new file mode 100644 index 00000000..71c00739 --- /dev/null +++ b/docs/css/main.styl @@ -0,0 +1,212 @@ +@import 'nib' +@import 'jeet' + +@import 'https://fonts.googleapis.com/css?family=Raleway:400,500,600,200,100&.css' + +normalize-css() + +$wrapper + center(960px, pad:20px) + +.wrapper + @extend $wrapper + position relative + +a, a:hover + text-decoration none + +html, body + font-family "Helvetica Neue", Helvetica, Arial, sans-serif + font-weight 300 + font-size 16px + color #606060 + line-height 1.5 + +.header + clearfix() + position relative + text-align center + background: #DB594C; + background-image: radial-gradient(95% 101%, #E46643 5%, rgba(226,91,72,0.00) 100%) + .logo + width 42px + height @width + vertical-align middle + + h1 + max-width 380px + font-family 'Raleway', sans-serif + font-weight 200 + font-size 42px + color #FFFFFF + line-height 49px + margin 80px auto 40px + z-index 110 + + .get-started + font-family 'Raleway' + display inline-block + margin 0 auto + font-size 13px + color #FFFFFF + padding 0 18px + text-transform uppercase + font-weight 600 + line-height 15px + border 1px solid #FFFFFF + border-radius 2px + padding 12px 18px + z-index 111 + position relative + &:hover + background white + color #E05B49 + text-decoration none + +.header-wrapper + @extend $wrapper + text-align left + padding-top 32px + padding-bottom 32px + position relative + z-index 100 + +.header-extended + padding-bottom 100px + +.header-nav + margin-top 8px + a + font-family 'Raleway' + font-size 13px + color #FFFFFF + margin 0 16px + padding 0 2px + text-transform uppercase + font-weight 600 + line-height 15px + +.header-logo + font-family 'Raleway' + font-size 22px + color #FFFFFF + float left + font-weight 500 + text-transform uppercase + text-decoration none + +.header-nav + float right + +.logo + path + stroke-dasharray 250 + stroke-dashoffset 250 + animation logo-dash .9s ease-in-out forwards + animation-delay .12s + g + ellipse + animation logo-dot .3s ease forwards + animation-fill-mode both + transform-origin 50% 50% + &:nth-child(2) + ellipse + animation-delay .1s + &:nth-child(3) + ellipse + animation-delay .2s + &:nth-child(4) + ellipse + animation-delay .3s + &:nth-child(5) + ellipse + animation-delay .4s + &:nth-child(6) + ellipse + animation-delay .5s + &:nth-child(7) + ellipse + animation-delay .6s + &:nth-child(8) + ellipse + animation-delay .7s + +@keyframes logo-dash + to + stroke-dashoffset 0 + +@keyframes logo-dot + from + opacity 0.5 + transform scale(0) + to + opacity 1 + transform scale(1) + +#header-background + z-index 0 + display block + position absolute + width 100% + top 0 + bottom 0 + right 0 + left 0 + +.particles-js-canvas-el + display block + opacity 0 + position absolute + +.starwars-example + background: #3C3C3C + display inline-block + position absolute + right 20px + top -100px + box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.25); + border-radius: 100px + font-size 13px + padding 17px 17px 17px 71px + width 226px + box-sizing border-box + color white + font-family 'Raleway' + font-weight 500 + &:before + content: '' + display block + position absolute + left 0 + top 0 + height 32px + width 32px + image '../assets/starwars-icon.png' + +.improve-document-link + @extend $wrapper + +.markdown + .wrapper + margin-top 60px + + h1, h2, h3, h4, h5, h6 + font-family: 'Raleway'; + font-weight 600 + color #4A4A4A + strong + font-weight 500 + + margin-bottom 40px + +.title + background: #F9F9F9; + padding 30px 0 + + h1 + @extend $wrapper + font-family: 'Raleway'; + font-size: 42px; + font-weight 200 + color: #585858; + line-height: 49px; diff --git a/docs/gatsby.config.js b/docs/gatsby.config.js new file mode 100644 index 00000000..80be7b41 --- /dev/null +++ b/docs/gatsby.config.js @@ -0,0 +1,26 @@ +var nib = require("nib"); +var jeet = require("jeet"); +var ExtractTextPlugin = require("extract-text-webpack-plugin"); + +module.exports = function(config, env) { + var IS_STATIC = env === 'static'; + config.merge({ + stylus: { + use: [nib(), jeet()] + } + }); + if (IS_STATIC) { + config.plugin('extract-css', ExtractTextPlugin, ["app.css"]); + } + config.loader('stylus', function(cfg) { + cfg.test = /\.styl$/; + if (IS_STATIC) { + cfg.loader = ExtractTextPlugin.extract('style-loader', 'css-loader!stylus-loader', { allChunks: true }); + } + else { + cfg.loader = 'style-loader!css-loader!stylus-loader'; + } + return cfg + }); + return config; +}; diff --git a/docs/html.js b/docs/html.js new file mode 100644 index 00000000..e93eda04 --- /dev/null +++ b/docs/html.js @@ -0,0 +1,25 @@ +import React from 'react'; +import DocumentTitle from 'react-document-title'; + +export default class Html extends React.Component { + render() { + var title = this.props.title || DocumentTitle.rewind(); + return ( + + + + + + {title} + + + + + +
+