Skip to content

Commit

Permalink
Merge pull request #290 from insitu-project/release-apiv3
Browse files Browse the repository at this point in the history
Release apiv3
  • Loading branch information
JalilArfaoui authored May 31, 2019
2 parents 0c47819 + c8ab6cb commit 9feac2b
Show file tree
Hide file tree
Showing 552 changed files with 8,859 additions and 23,859 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"presets": [["@babel/preset-env", { "useBuiltIns": "entry" }], "@babel/preset-react"],
"plugins": ["add-module-exports", "babel-plugin-styled-components", "@babel/plugin-proposal-class-properties"]
"plugins": [
"add-module-exports",
"babel-plugin-styled-components",
["babel-plugin-module-resolver", {
"root": ["./src"]
}],
"@babel/plugin-proposal-class-properties"
]
}
4 changes: 1 addition & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ node_modules
build
dev

gulp
gulpfile.babel.js
webpack
webpack/replace

Expand All @@ -14,4 +12,4 @@ test/app

src/app/content/containers/PopUp

src/lib/heap.js
src/lib/heap.ts
21 changes: 16 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{
"extends": "eslint-config-airbnb",
"extends": [
"eslint-config-airbnb",
"plugin:import/errors",
"plugin:import/warnings"
],
"env": {
"mocha": true,
"browser": true,
"es6": true,
"webextensions": true
},
"parser": "babel-eslint",
"plugins": [
"react",
"module-resolver"
],
"settings": {
"import/resolver": {
"babel-module": {}
}
},
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-uses-react": 2,
Expand Down Expand Up @@ -57,9 +70,7 @@
"no-underscore-dangle": 0,
"no-else-return": 0,
"newline-per-chained-call": 0,
"module-resolver/use-alias": 0,
"react/jsx-one-expression-per-line": 0
},
"plugins": [
"react"
]
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.awcache/
node_modules
npm-debug.log
.DS_Store
Expand All @@ -11,4 +12,6 @@ plugins/
platforms/
.floo
.flooignore
.ftppass
.ftppass
storybook-static/*
.sentryclirc
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/lib/heap.ts
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
3 changes: 2 additions & 1 deletion .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
import '@storybook/addon-actions/register'
import '@storybook/addon-actions/register';
import '@storybook/addon-knobs/register';
10 changes: 0 additions & 10 deletions .storybook/config.js

This file was deleted.

31 changes: 31 additions & 0 deletions .storybook/config.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { configure, addDecorator } from "@storybook/react";
import React from "react";
import { createGlobalStyle, ThemeProvider } from "styled-components";
import theme from "../src/app/theme";
import "typeface-lato";
import "typeface-sedgwick-ave";
import NotificationContainer from "components/organisms/Notification/Container";

const Global = createGlobalStyle`
body {
background-color: grey;
}
`;

addDecorator(getStory => (
<div>
<Global />
<ThemeProvider theme={theme}>
<NotificationContainer>{getStory()}</NotificationContainer>
</ThemeProvider>
</div>
));

// automatically import all files ending in *.stories.js
const req = require.context("../src", true, /stories.tsx?$/);

function loadStories() {
req.keys().forEach((filename: string) => req(filename));
}

configure(loadStories, module);
14 changes: 14 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const path = require("path");
const rules = require("../webpack/config.rules");

const env = { build: 'dev'};

module.exports = storybookBaseConfig => {
storybookBaseConfig.module.rules = rules(env, 'development');
storybookBaseConfig.resolve.extensions.push(".ts", ".tsx");
storybookBaseConfig.resolve.modules.push(
path.resolve(__dirname, "..", "src")
);
storybookBaseConfig.stats = require("../webpack/config.stats");
return storybookBaseConfig;
};
96 changes: 69 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Le Même en Mieux - Recommendations
# Bulle.io - Web Extension

[![Build Status](https://semaphoreci.com/api/v1/projects/02861938-a833-4f0e-938d-9bb2cd5ae49f/965710/shields_badge.svg)](https://semaphoreci.com/bmenant_lmem/extension)

At its early stages, this software was a fork of [Crossbuilder](https://github.com/zalmoxisus/crossbuilder).
However, the software has evolved to better embrace our project needs and specificities.
However, the software has evolved to better embrace our project needs and specificities.
As a result, the upstream codebase haven’t be merged for a while and it is unlikely to happen ever again.

## Structure
Expand All @@ -25,32 +25,64 @@ nvm use lts/carbon
yarn
```

### Sentry

To configure Sentry error reporting, you should create a `.sentryclirc` file at the root of the project directory:

```
[defaults]
project=web-extension
org=lmem
[auth]
token=4d786d88c7d9436282c35b4eb82ae2dfeaff5ee296e3404ba3654ab62c151b73
```

> **Note 1:** You'll find your token here https://sentry.io/settings/account/api/auth-tokens/
> **Note 2:** If you ever need to change the Sentry DSN go to `./webpack/config.plugins.js`.
## Environments

You'll find a bunch of env variables defined in `./webpack/config.plugins.js`.

## Development

```bash
# build files to './build/dev/'
# watch files change (do not reload the extension though)
# start WebpackDevServer
# start Webpack Dev Server
yarn start
```

- [Load unpacked extension's `./build/dev/` folder to Chrome.](https://developer.chrome.com/extensions/getstarted#unpacked)

## Sandbox
There is a sandbox for components testing and integration, it's hot reloaded and js and css are linted.
The sandbox may be run with the following command:
## Storybook

There is a Storybook for components design, exploration, testing and documentation. It's hot reloaded.
Storybook may be run with the following command:

```bash
yarn storybook
```
yarn sandbox

It also possible to build a static version, the one you can see here : https://storybook.lmem.net.

You can do this with:

```bash
yarn build-storybook
```

It is automatically deployed to https://storybook.lmem.net on every `develop` branch update.

### Conventional Commits

We follow [conventional commits](https://conventionalcommits.org/) since version 1.0.0 and
we use [Semantic Release](https://github.com/semantic-release/semantic-release) to build and publish new releases.

### Redux DevTools

We use [Redux DevTools](https://extension.remotedev.io/) to inspect Redux actions and state changes.
We use [Redux DevTools](https://extension.remotedev.io/) to inspect Redux actions and state changes.
Once installed, from the Redux DevTools extension’s context menu, choose “Open Remote DevTools” for remote monitoring.

## Build Web extension
Expand Down Expand Up @@ -89,20 +121,30 @@ yarn test

## Lint

### Javascript
Code style rules are available in `.eslintrc`.
You can lint both TypeScript and CSS by running:

You can manually lint .js files running the following command:
```bash
yarn lint
```
npm run lint

### TypeScript

Code style rules are available in `tslint.json`.

You can manually lint .ts files running the following command:

```bash
yarn lint:ts
```

### Styles

Styling rules are available in `.stylelintrc`.

You can manually the styled components running the following command:
```
npm run lint:css

```bash
yarn lint:css
```

### Integration tests
Expand All @@ -113,18 +155,18 @@ Inspect the extension _background_ to get its console and run `window.integratio

[GNU GPL v3](LICENSE)

> Le Même en Mieux est un assistant d’achat indépendant des vendeurs et des marques.
> Copyright (C) 2016 INSITU SAS
> Le Même en Mieux est un assistant d’achat indépendant des vendeurs et des marques.
> Copyright (C) 2016 INSITU SAS
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation, either version 3 of the License, or
> (at your option) any later version.
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation, either version 3 of the License, or
> (at your option) any later version.
>
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
> This program is distributed in the hope that it will be useful,
> but WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> GNU General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with this program. If not, see <http://www.gnu.org/licenses/>.
> You should have received a copy of the GNU General Public License
> along with this program. If not, see <http://www.gnu.org/licenses/>.
52 changes: 0 additions & 52 deletions gulp/tasks/build.js

This file was deleted.

35 changes: 0 additions & 35 deletions gulp/tasks/copy.js

This file was deleted.

Loading

0 comments on commit 9feac2b

Please sign in to comment.