Skip to content

Commit

Permalink
Merge pull request #120 from CPatchane/start_over
Browse files Browse the repository at this point in the history
Start over the application from CCA
  • Loading branch information
CPatchane authored Nov 26, 2018
2 parents 19f62b3 + 9415272 commit fa1e2e7
Show file tree
Hide file tree
Showing 27 changed files with 3,507 additions and 4,126 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ mobile/fastlane/Error*.png
mobile/fastlane/Preview.html
mobile/Preview.html

.eslintcache

# Default
# /!\ KEEP THIS SECTION THE LAST ONE
!.gitkeep

.eslintcache
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ env:
global:
- CXX=g++-4.8
# GITHUB_TOKEN for yarn deploy script
# to generate yours : travis encrypt GITHUB_TOKEN=<your_GITHUB_TOKEN> -r cozy/cozy-interapp-sandbox --org
# to generate yours : travis encrypt GITHUB_TOKEN=<your_GITHUB_TOKEN> -r cozy/cozy-sandbox --org
# REGISTRY_TOKEN for yarn cozyPublish script
# to generate yours : travis encrypt REGISTRY_TOKEN=<your_REGISTRY_TOKEN> -r cozy/cozy-interapp-sandbox --org
# to generate yours : travis encrypt REGISTRY_TOKEN=<your_REGISTRY_TOKEN> -r cozy/cozy-sandbox --org
# N.B.: the --org option is needed only for public repositories
- secure: FeRG/wfbiA+tj5BnxFvAnoVeU2EL93UNR1CqbYboMPv7RsbPvxarbkt9whkf1dVCAj1xIWzHrQnPOl0yIvt2FKFu/rJcuf0jc4Ab7SuBFsKJ5U7620FOuL5IZh/tklP8nlM0BI8xCHOj6ZsUei4qKe3gsO2dcjazYXzG8eKY6x02KY2rv6u0BfWtgU16BouazcQwVzTehcyxWUMwM6rzagwiYA8bDu4Qp+L8NiFay+IjRQVIIPJ05wLG2hY8+cBnObcAFWNaTtA7BFJn77uW9NmHM32/b56obikgrKxyJkZwIrj1QM08+idTPTxwnh3KIzpAudBvyoCks5WrKpJfjMmMEWjwKipdzcFE9HT9/gG8+JSHecUkmtAcMt5h2MSwgJfmdU12i211/xUbBWv496m9cYGtW7lMHG0lOGOGwHmiRNtOuW2kwqR4l1UOC2GNOWbBzvf32+SEIvIJ/kZXSsmQC/nN5YUjh2MYWzZc2onqjG6J1Xy28lkGOF6Qkio78NxfjHXgcSqn8ZbkHxZaqzPJFPTQi2oeR1ZbPkxEanRuQMsqB/0qpY6F593ibYAobx6cYj37RwaQ9qN5DGQDoYRLVydMQUislM94JEba4C2CLLpz2CjqmfV44nD+PB7nc2asKyd9CFq66hezOThlIg/xY/P8j3QqIktZSACr6nU=
addons:
Expand All @@ -28,8 +28,9 @@ cache:
directories:
- node_modules
script:
- yarn test
- yarn build:browser
- yarn lint
- yarn test --runInBand
- yarn build
deploy:
- provider: script
repo: cozy/cozy-interapp-sandbox
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to contribute to Cozy Interapp Sandbox?
# How to contribute to Cozy Sandbox?

Thank you for your interest in contributing to this Cozy application! There are many ways to contribute, and we appreciate all of them.

Expand All @@ -20,7 +20,7 @@ Opening an issue is as easy as following [this link][issues] and filling out the
- What did you try, step by step?
- What did you expect?
- What did happen instead?
- What is the version of the Cozy Cozy Interapp Sandbox?
- What is the version of the Cozy Sandbox?


## Pull Requests
Expand All @@ -44,9 +44,9 @@ Pull requests are the primary mechanism we use to change Cozy. GitHub itself has
Fork the project on GitHub and [check out your copy locally][forking].

```
$ git clone github.com/cozy/cozy-interapp-sandbox.git
$ cd cozy-interapp-sandbox
$ git remote add fork git://github.com/yourusername/cozy-interapp-sandbox.git
$ git clone github.com/cozy/cozy-sandbox.git
$ cd sandbox
$ git remote add fork git://github.com/yourusername/cozy-sandbox.git
```

#### Step 2: Branch
Expand All @@ -66,7 +66,7 @@ Well, we think you know how to do that. Just be sure to follow the coding guidel
Don't forget to add tests and be sure they are green:

```
$ cd cozy-interapp-sandbox
$ cd cozy-sandbox
$ npm run test
```

Expand All @@ -89,7 +89,7 @@ $ git rebase origin/master my-branch
$ git push -u fork my-branch
```

Go to https://github.com/yourusername/cozy-interapp-sandbox and select your branch. Click the 'Pull Request' button and fill out the form.
Go to https://github.com/yourusername/cozy-sandbox and select your branch. Click the 'Pull Request' button and fill out the form.

Alternatively, you can use [hub] to open the pull request from your terminal:

Expand All @@ -107,7 +107,7 @@ Documentation improvements are very welcome. We try to keep a good documentation

## Translations

The Cozy Interapp Sandbox is translated on a platform called [Transifex][tx]. [This tutorial][tx-start] can help you to learn how to make your first steps here. If you have any question, don't hesitate to ask us!
The Cozy Sandbox is translated on a platform called [Transifex][tx]. [This tutorial][tx-start] can help you to learn how to make your first steps here. If you have any question, don't hesitate to ask us!


## Community
Expand All @@ -116,12 +116,12 @@ You can help us by making our community even more vibrant. For example, you can



[issues]: https://github.com/cozy/cozy-interapp-sandbox/issues/new
[issues]: https://github.com/cozy/cozy-sandbox/issues/new
[pr]: https://help.github.com/categories/collaborating-with-issues-and-pull-requests/
[forking]: http://blog.campoy.cat/2014/03/github-and-go-forking-pull-requests-and.html
[stdjs]: http://standardjs.com/
[commitmsg]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[localization]: https://github.com/cozy/cozy-interapp-sandbox/blob/master/README.md#localization
[localization]: https://github.com/cozy/cozy-sandbox/blob/master/README.md#localization
[hub]: https://hub.github.com/
[tx]: https://www.transifex.com/cozy/
[tx-start]: http://docs.transifex.com/getting-started/translators/
Expand Down
45 changes: 19 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
[![Travis build status shield](https://img.shields.io/travis/cozy/cozy-interapp-sandbox/master.svg)](https://travis-ci.org/cozy/cozy-interapp-sandbox)
[![Github Release version shield](https://img.shields.io/github/tag/cozy/cozy-interapp-sandbox.svg)](https://github.com/cozy/cozy-interapp-sandbox/releases)
[![Travis build status shield](https://img.shields.io/travis/cozy/cozy-sandbox/master.svg)](https://travis-ci.org/cozy/cozy-sandbox)
[![Github Release version shield](https://img.shields.io/github/tag/cozy/cozy-sandbox.svg)](https://github.com/cozy/cozy-sandbox/releases)
[![jest](https://facebook.github.io/jest/img/jest-badge.svg)](https://github.com/facebook/jest)


# Cozy Interapp Sandbox
# Cozy Sandbox

## What's Cozy Interapp Sandbox?
## What's Cozy Sandbox?

Cozy Interapp Sandbox is a common tool to help developer test Cozy's interapp mechanisms.
Cozy Sandbox is a common tool to help developer test Cozy's interapp mechanisms.


## Hack

_:pushpin: Note:_ we recommend to use [Yarn] instead of NPM for package management. Don't hesitate to [install][yarn-install] and use it for your Cozy projects, it's now our main node packages tool for Cozy official apps.

### Install and run in dev mode
### Install

Hacking the Cozy Cozy Interapp Sandbox app requires you to [setup a dev environment][setup].
Hacking the Cozy Cozy Sandbox app requires you to [setup a dev environment][setup].

You can then clone the app repository and install dependencies:

```sh
$ git clone https://github.com/cozy/cozy-interapp-sandbox.git
$ cd cozy-interapp-sandbox
$ git clone https://github.com/Cozy/cozy-sandbox.git
$ cd cozy-sandbox
$ yarn install
```

Expand All @@ -31,24 +31,17 @@ $ yarn install
Cozy's apps use a standard set of _npm scripts_ to run common tasks, like watch, lint, test, build…


### Run it inside the VM
### Run it inside a Cozy using Docker

You can easily view your current running app, you can use the [cozy-stack docker image][cozy-stack-docker]:
You can run your application inside a Cozy thanks to the [cozy-stack docker image][cozy-stack-docker]:

```sh
# in a terminal, run your app in watch mode
$ cd cozy-interapp-sandbox
$ yarn watch:browser
# in a terminal, run your app in watch mode with a docker running Cozy
$ cd cozy-sandbox
$ yarn start
```

```sh
# in another terminal, run the docker container
$ docker run --rm -it -p 8080:8080 -v "$(pwd)/build":/data/cozy-app/cozy-interapp-sandbox cozy/cozy-app-dev
or
$ yarn stack:docker
```

your app is available at http://cozy-interapp-sandbox.cozy.tools:8080.
After the build and the stack launched, your app is now available at http://sandbox.cozy.tools:8080.


### Living on the edge
Expand Down Expand Up @@ -77,7 +70,7 @@ yarn link cozy-ui
Tests are run by [jest] under the hood. You can easily run the tests suite with:

```sh
$ cd cozy-interapp-sandbox
$ cd cozy-sandbox
$ yarn test
```

Expand All @@ -98,7 +91,7 @@ Whenever your app needs to use a given `doctype`, you should:

### Open a Pull-Request

If you want to work on Cozy Interapp Sandbox and submit code modifications, feel free to open pull-requests! See the [contributing guide][contribute] for more information about how to properly open pull-requests.
If you want to work on Cozy Sandbox and submit code modifications, feel free to open pull-requests! See the [contributing guide][contribute] for more information about how to properly open pull-requests.


## Community
Expand All @@ -125,7 +118,7 @@ As a _developer_, you must [configure the transifex client][tx-client], and clai

### Maintainer

The lead maintainer for Cozy Interapp Sandbox is [cozy](https://github.com/cozy), send him/her a :beers: to say hello!
The lead maintainer for Cozy Sandbox is [Cozy](https://github.com/Cozy), send him/her a :beers: to say hello!


### Get in touch
Expand All @@ -140,7 +133,7 @@ You can reach the Cozy Community by:

## License

Cozy Interapp Sandbox is developed by cozy and distributed under the [AGPL v3 license][agpl-3.0].
Cozy Sandbox is developed by Cozy and distributed under the [AGPL v3 license][agpl-3.0].



Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['cozy-app']
}
32 changes: 12 additions & 20 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'styl'
],
setupFiles: [
'<rootDir>/test/jestLib/setup.js'
],
moduleDirectories: [
'node_modules',
'src'
],
testURL: 'http://localhost/',
moduleFileExtensions: ['js', 'jsx', 'json', 'styl'],
setupFiles: ['<rootDir>/test/jestLib/setup.js'],
moduleDirectories: ['src', 'node_modules'],
transform: {
'^.+\\.(js|jsx)?$': '<rootDir>/test/jestLib/babel-transformer.js'
},
moduleNameMapper: {
'\\.(png|gif|jpe?g|svg)$': '<rootDir>/test/__mocks__/fileMock.js',
// identity-obj-proxy module is installed by cozy-scripts
'styles': 'identity-obj-proxy'
styles: 'identity-obj-proxy'
},
transformIgnorePatterns: [
'node_modules/(?!cozy-ui)'
],
transformIgnorePatterns: ['node_modules/(?!cozy-ui)'],
globals: {
'__ALLOW_HTTP__': false,
'__TARGET__': 'browser',
'cozy': {}
__ALLOW_HTTP__: false,
__TARGET__: 'browser',
cozy: {}
}
}
6 changes: 3 additions & 3 deletions manifest.webapp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "Cozy Sandbox",
"slug": "cozy-sandbox",
"slug": "sandbox",
"icon": "icon.svg",
"categories": [],
"version": "0.1.0",
"licence": "AGPL-3.0",
"editor": "",
"source": "https://github.com/cozy/cozy-interapp-sandbox.git@build",
"source": "https://github.com/Cozy/cozy-sandbox.git@build",
"developer": {
"name": "cozy",
"name": "Cozy",
"url": ""
},
"routes": {
Expand Down
85 changes: 34 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,57 @@
{
"name": "cozy-interapp-sandbox",
"name": "cozy-sandbox",
"version": "0.1.0",
"scripts": {
"clean:browser": "rm -rf build/",
"clean:mobile": "rm -rf targets/mobile/www",
"lint": "npm-run-all --parallel lint:*",
"lint:js": "eslint '{src,test}/**/*.{js,jsx}'",
"format:js": "yarn lint:js --fix",
"tx": "tx pull --all || true",
"lint": "yarn lint:js && yarn lint:styles",
"lint:js": "cozy-scripts lint '{src,test}/**/*.{js,jsx}'",
"lint:styles": "stylint src/styles --config ./.stylintrc",
"prebuild": "yarn lint",
"build": "yarn build:browser",
"commons:build": "cozy-scripts build",
"build:browser": "npm-run-all --serial clean:browser lint 'commons:build --browser --production'",
"build:mobile": "npm-run-all --serial clean:mobile lint 'commons:build --mobile --production'",
"build:browser": "cozy-scripts build --browser",
"build:mobile": "cozy-scripts build --mobile",
"watch": "yarn watch:browser",
"commons:watch": "cozy-scripts watch",
"watch:browser": "npm-run-all --serial clean:browser 'commons:watch --browser --development'",
"watch:mobile": "npm-run-all --serial clean:mobile 'commons:watch --mobile --development'",
"watch:standalone": "yarn watch:browser:standalone",
"commons:watch:standalone": "cozy-scripts standalone",
"watch:browser:standalone": "npm-run-all --serial clean:mobile 'commons:watch:standalone --browser --development'",
"watch:mobile:standalone": "npm-run-all --serial clean:mobile 'commons:watch:standalone --browser --development'",
"deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://[email protected]/cozy/cozy-interapp-sandbox.git}",
"watch:browser": "cozy-scripts watch --browser",
"watch:mobile": "cozy-scripts watch --mobile",
"start": "cozy-scripts start --hot --browser",
"deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://[email protected]/cozy/cozy-sandbox.git}",
"test": "cozy-scripts test --verbose --coverage",
"stack:docker": "docker run --rm -it -p 8080:8080 -p 5984:5984 -v \"$(pwd)/build\":/data/cozy-app/app cozy/cozy-app-dev",
"cozyPublish": "cozy-scripts publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})"
"cozyPublish": "git fetch origin ${DEPLOY_BRANCH:-build}:${DEPLOY_BRANCH:-build} && cozy-scripts publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})"
},
"repository": {
"type": "git",
"url": "git+https://github.com/cozy/cozy-interapp-sandbox.git"
"url": "git+https://github.com/cozy/cozy-sandbox.git"
},
"author": "",
"contributors": [],
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/cozy/cozy-interapp-sandbox/issues"
"url": "https://github.com/cozy/cozy-sandbox/issues"
},
"homepage": "https://github.com/cozy/cozy-interapp-sandbox#readme",
"homepage": "https://github.com/cozy/cozy-sandbox#readme",
"devDependencies": {
"babel-polyfill": "6.26.0",
"babel-preset-cozy-app": "1.1.1",
"enzyme": "3.3.0",
"enzyme-adapter-react-16": "1.1.1",
"eslint": "5.9.0",
"eslint-config-cozy-app": "1.1.4",
"babel-core": "7.0.0-bridge.0",
"babel-preset-cozy-app": "1.2.1",
"enzyme": "3.7.0",
"enzyme-adapter-react-16": "1.7.0",
"eslint-plugin-prettier": "3.0.0",
"eslint-plugin-react": "7.11.1",
"git-directory-deploy": "1.5.1",
"npm-run-all": "4.1.3",
"prettier": "1.14.2",
"react": "16.4.1",
"react-dom": "16.4.1",
"react-test-renderer": "16.4.1",
"redux-logger": "3.0.6",
"redux-mock-store": "1.5.3",
"prettier": "1.15.2",
"react-hot-loader": "4.3.12",
"react-test-renderer": "16.6.3",
"stylint": "1.5.9"
},
"dependencies": {
"cozy-bar": "5.0.8",
"cozy-client": "^2.13.1",
"cozy-client-js": "0.11.0",
"cozy-interapp": "^0.2.3",
"cozy-scripts": "^0.10.6",
"cozy-ui": "10.9.2",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "^7.11.1",
"preact": "8.3.1",
"preact-compat": "3.18.0",
"preact-context": "^1.1.0",
"react-redux": "5.0.7",
"react-router-dom": "4.3.1",
"redux": "4.0.0",
"redux-raven-middleware": "1.2.0",
"redux-thunk": "2.3.0"
"cozy-bar": "6.8.3",
"cozy-client": "3.6.4",
"cozy-client-js": "^0.14.2",
"cozy-interapp": "^0.2.13",
"cozy-scripts": "1.2.0",
"cozy-ui": "17.2.0",
"eslint-config-cozy-app": "1.1.4",
"react": "16.6.3",
"react-dom": "16.6.3",
"react-router-dom": "4.3.1"
}
}
Loading

0 comments on commit fa1e2e7

Please sign in to comment.