Skip to content

Commit

Permalink
Merge pull request #94 from marzeelabs/release/1.1.0
Browse files Browse the repository at this point in the history
Release/1.1.0
  • Loading branch information
jolidog authored Sep 17, 2018
2 parents 4a7defc + 7be6cdc commit df437f9
Show file tree
Hide file tree
Showing 81 changed files with 4,640 additions and 3,662 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
public/
temp/
38 changes: 38 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"extends": "airbnb",

"globals": {
"CMS": true,
"MutationObserver": true,
"document": true,
"name": true,
"window": true
},

"rules": {
"array-bracket-spacing": ["error", "always"],
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
"class-methods-use-this": 0,
"global-require": 0,
"jsx-a11y/alt-text": 0,
"no-continue": 0,
"no-param-reassign": 0,
"no-plusplus": 0,
"no-underscore-dangle": 0,
"no-useless-constructor": 0,
"react/jsx-curly-spacing": { "when": "always" },
"react/prop-types": 0,
"wrap-iife": 0
},

"parser": "babel-eslint",

"settings": {
"import/parser": "babel-eslint",
"import/resolver": {
"node": {
"paths": ["components"]
}
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ yarn-error.log
Thumbs.db
.DS_Store
!.gitkeep
/config.yml
9 changes: 4 additions & 5 deletions BesugoComponent.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,17 @@ A static object that defines this component within our website. All properties a
- `styles`: (arr [str]) array of stylesheets, both internal and external, to be loaded into the CMS page.

```js
static get config() {
return {
tag: "Person",
categories: [ "people", "people-pt" ]
};
static config = {
tag: "Person",
categories: [ "people", "people-pt" ],
}
```

### constructor()
```js
constructor(props) {
super(props);
...
}
```
Only mandatory if the component expects to be passed any props (i.e. data from attributes in html). Should always have the `super(props)` call as above.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Below are listed the versions used in Netlify to create the live, preview and br
- If after running the above command it complains that *xcode alone is not sufficient on sierra*, try running `xcode-select --install`. Note that **macOS Sierra 10.12.6 or higher and XCode 9.2 are required.**


1. [hugo](https://gohugo.io/) v0.37.1 - builds the structure of the website based on the content setup, although we're phasing it out in favor of a fully JS/React solution. Any version over 0.27.1 should still work though.
1. [hugo](https://gohugo.io/) v0.47.1 - builds the structure of the website based on the content setup, although we're phasing it out in favor of a fully JS/React solution. Any version over 0.27.1 should still work though.
- Install:
```sh
Expand All @@ -30,7 +30,7 @@ Below are listed the versions used in Netlify to create the live, preview and br
brew update && brew upgrade hugo
```
2. [yarn](https://yarnpkg.com/) v1.5.1 - package/dependency manager. Any version of yarn above 0.27.5 should still work though.
2. [yarn](https://yarnpkg.com/) v1.10.0 - package/dependency manager. Any version of yarn above 0.27.5 should still work though.
- Install:
```sh
Expand All @@ -46,22 +46,22 @@ Below are listed the versions used in Netlify to create the live, preview and br
```
- Switch between yarn versions (global change):
```sh
brew switch yarn 1.5.1
brew switch yarn 1.10.0
```
3. [nvm](https://github.com/creationix/nvm) v0.33.8 - (not used by Netlify), very useful to manage your locale Node.js versions.
3. [nvm](https://github.com/creationix/nvm) v0.33.11 - (not used by Netlify), very useful to manage your locale Node.js versions.
- Install or update:
```sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
```
- After installing you may need to re-open the terminal or run this for it to recognize the `nvm` command (repeat for every terminal you currently have open in which you want to use it):
```sh
source ~/.bash_profile
```
4. [Node.js](https://nodejs.org/en/) v8.9.3 LTS (lts/carbon) - our JavaScript runtime, we need it, for everything. Any Node v8.x.x or even v6.x.x (lts/boron) should still work though.
4. [Node.js](https://nodejs.org/en/) v8.11.3 LTS (lts/carbon) - our JavaScript runtime, we need it, for everything. Any Node v8.x.x or even v6.x.x (lts/boron) should still work though.
- Install or update:
```sh
Expand Down Expand Up @@ -220,8 +220,8 @@ We can use *jpg* (and the *jpeg* variant), *png*, *webp* and *tiff* file types.
To take advantage of these, you must first define in *package.json* what sizes and suffixes (to be appended to the original filename) sharp should work with; e.g.:
```json
"sharp-config": {
"src": "static/images",
"dest": "public/images",
"src": "static/media",
"dest": "public/media",
"quality": 80,
"sizes": [
{
Expand Down
9 changes: 4 additions & 5 deletions components/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import BesugoComponent from 'Besugo';

import Previews from 'Previews';
Expand All @@ -13,7 +12,7 @@ import PersonCard from 'people/Card';
import Person from 'people/Person';
import BlogPost from 'blog/BlogPost';

const initialized = [
[
Previews,
SVGElements,
TopHeader,
Expand All @@ -25,9 +24,9 @@ const initialized = [
SrcSetBg,
PersonCard,
Person,
BlogPost
].map((Comp) => {
return Comp.initialize();
BlogPost,
].forEach((Comp) => {
Comp.initialize();
});

export default BesugoComponent.build();
Loading

0 comments on commit df437f9

Please sign in to comment.