Skip to content

Commit

Permalink
feat(Build): First working version
Browse files Browse the repository at this point in the history
  • Loading branch information
nfroidure committed Oct 13, 2017
0 parents commit 4e7c296
Show file tree
Hide file tree
Showing 25 changed files with 13,182 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
- image: circleci/node:7.10

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run: yarn run build
- run: yarn run export

- run: sudo apt-get install python-pip python-dev build-essential
- run: sudo pip install awscli

- deploy:
name: Deploy to preproduction
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
aws s3 sync out s3://sencrop-developer-platform-preproduction --acl public-read --region eu-central-1
fi
- deploy:
name: Deploy to production
command: |
if [[ "${CIRCLE_TAG}" =~ "^v[0-9]+\.[0-9]+\.[0-9]+" ]]; then
aws s3 sync out s3://sencrop-developer-platform-production --acl public-read --region eu-central-1
fi
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.

# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
# 2 space indentation
[*.{js,css}]
charset = utf-8
indent_style = space
trim_trailing_whitespace = true
indent_size = 2
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.

* text eol=lf
*.js text eol=lf
16 changes: 16 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

# Code of Conduct

Be kind, except if one behaves like an asshole,
if so, link to this file and mute.

We try hard to automate things so that you cannot
create noises without really willing to do so.

This is why we'll just delete issues/comments
making us sad.
14 changes: 14 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

Contributing to this project requires you to be
a gentleman.

By contributing you must agree with publishing your
changes into the same license than the actual code.

You will find the license in the LICENSE.md file at
the root of this repository.
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

## Issue
<!--
Thanks for reporting an issue.
Before doing so, there are a few checks to do in
order to optimize its resolution. Just fill in the
following template.
Beware that you also can create a pull request
if you know how to solve the issue.
Finally scroll down if you are asking for a feature ;)
-->

I'm a gentledev i:
- [ ] fully read the README recently
- [ ] searched for existing issues
- [ ] checked I'm up to date with the latest version of the project

### Expected behavior

### Actual behavior

### Steps to reproduce the behavior

### Debugging informations
- `node -v` result:
```
<paste here>
```

- `npm -v` result:
```
<paste here>
```
If the result is lower than 6.10.0, there is
poor chances we even have a look to it. Please,
use the last [NodeJS LTS version](https://nodejs.org/en/).

## Feature request
<!--
If you think a feature need to be added,
your suggestions are welcome. Beware
though that:
- we try to keep things simple so please
ensure the requested feature is really
related to this project. If not, you may
instead create a module that augment/work
with this one,
- prioritization is the key to success so
keep calm and be aware that your request
may stay incomplete for ever. Nothing
impeach you to implement the feature
and get it merged though.
-->

### Feature description

### Use cases

- [ ] I will/have implement the feature
52 changes: 52 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

<!--
Thanks for improving this project!
Before doing so, there are a few checks to do in
order to get your PR merged asap. Just fill in the
following template.
-->

Fixes #

### Proposed changes
-
-

<!-- Check the boxes with a `x` like so `[x]` -->

### Code quality
- [ ] I made some tests for my changes
- [ ] I added my name in the
[contributors](https://docs.npmjs.com/files/package.json#people-fields-author-contributors)
field of the package.json file

### License
To get your contribution merged, you must check the following.

- [ ] I read the project license in the LICENSE file
- [ ] I agree with publishing under this project license

<!--
If you already maintain several NPM modules / NodeJS
project, making significant changes on one of our modules
automatically legitimates you as a core developer.
If you want to help, fill the following with to get
GitHub/NPM r/w access.
-->
### Join
- [ ] I wish to join the core team
- [ ] I agree that with great powers comes responsibilities
- [ ] I'm a nice person

My NPM username:
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.

# This file is automatically generated by a `metapak`
# module. Do not change it elsewhere, changes would
# be overriden.

# 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

# Coveralls key
.coveralls.yml
# Project custom ignored file
out
.next
19 changes: 19 additions & 0 deletions .readme/contents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
This repository contains the code that powers the [Sencrop Developers Platform](https://developers.sencrop.com).

This project is based on [NextJS](https://github.com/zeit/next.js/),
a universal website renderer.

That said, we currently only use it for its
static exports.

# Build
```sh
npm run build
npm run export
```

# Development
To start working on the project, run:
```sh
npm run dev
```
26 changes: 26 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

The MIT License (MIT)
Copyright © Sencrop SAS

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.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
# This file is automatically generated by a
# `metapak` module. Do NOT change it in
# place, your changes would be overriden.
-->

# sencrop-developer-platform
> The Sencrop Developer Platform website

This repository contains the code that powers the [Sencrop Developers Platform](https://developers.sencrop.com).

This project is based on [NextJS](https://github.com/zeit/next.js/),
a universal website renderer.

That said, we currently only use it for its
static exports.

# Build
```sh
npm run build
npm run export
```

# Development
To start working on the project, run:
```sh
npm run dev
```

# License
[MIT](https://github.com/sencrop/sencrop-developer-platform/blob/master/LICENSE.md)
28 changes: 28 additions & 0 deletions components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import Link from 'next/link'

const linkStyle = {
marginRight: 15
}

const Header = () => (
<div>
<Link href="/">
<a style={linkStyle}>Home</a>
</Link>
<Link href="/guide">
<a style={linkStyle}>API Guide</a>
</Link>
<Link href="/reference">
<a style={linkStyle}>API Reference</a>
</Link>
<Link href="/tools">
<a style={linkStyle}>Tools</a>
</Link>
<a href="https://sencrop.typeform.com/to/dFLmCl"
target="_blank">
Bug report
</a>
</div>
)

export default Header
Loading

0 comments on commit 4e7c296

Please sign in to comment.