Lancement de l'application Web
parent
b5060a082f
commit
e1b97aedc4
|
@ -0,0 +1,34 @@
|
|||
rules:
|
||||
indent:
|
||||
- 2
|
||||
- tab
|
||||
quotes:
|
||||
- 2
|
||||
- single
|
||||
linebreak-style:
|
||||
- 2
|
||||
- unix
|
||||
semi:
|
||||
- 2
|
||||
- never
|
||||
curly:
|
||||
- 2
|
||||
- multi-or-nest
|
||||
space-before-blocks: 2
|
||||
no-console: 1
|
||||
react/prop-types: 0
|
||||
react/display-name: 0
|
||||
|
||||
parser: babel-eslint
|
||||
|
||||
env:
|
||||
browser: true
|
||||
commonjs: true
|
||||
extends:
|
||||
- eslint:recommended
|
||||
- plugin:react/recommended
|
||||
plugins:
|
||||
- react
|
||||
parserOptions:
|
||||
ecmaFeatures:
|
||||
jsx: true
|
|
@ -1 +1,2 @@
|
|||
.tags*
|
||||
node_modules/
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
import React from 'react'
|
||||
|
||||
// Exported from redux-devtools
|
||||
import { createDevTools } from 'redux-devtools'
|
||||
|
||||
// Monitors are separate packages, and you can make a custom one
|
||||
import LogMonitor from 'redux-devtools-log-monitor'
|
||||
import DockMonitor from 'redux-devtools-dock-monitor'
|
||||
|
||||
// createDevTools takes a monitor and produces a DevTools component
|
||||
const DevTools = createDevTools(
|
||||
// Monitors are individually adjustable with props.
|
||||
// Consult their repositories to learn about those props.
|
||||
// Here, we put LogMonitor inside a DockMonitor.
|
||||
// Note: DockMonitor is visible by default.
|
||||
<DockMonitor toggleVisibilityKey='ctrl-h'
|
||||
changePositionKey='ctrl-q'
|
||||
defaultPosition='left'
|
||||
defaultIsVisible={false}>
|
||||
<LogMonitor theme='tomorrow' />
|
||||
</DockMonitor>
|
||||
)
|
||||
|
||||
export default DevTools
|
|
@ -0,0 +1,5 @@
|
|||
export const SELECT_TAG = 'SELECT_TAG'
|
||||
|
||||
export function selectTag(tagName, tagValue) {
|
||||
return {type: SELECT_TAG, tagName, tagValue}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
body {
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
import React, {Component} from 'react'
|
||||
|
||||
import Explorer from './Explorer'
|
||||
import { Provider } from 'react-redux'
|
||||
import DevTools from '../DevTools'
|
||||
|
||||
import './App.css'
|
||||
|
||||
export default class App extends Component {
|
||||
render() {
|
||||
const { store } = this.props
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<div>
|
||||
<Explorer />
|
||||
<DevTools />
|
||||
</div>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
if (process.env.NODE_ENV === 'production')
|
||||
module.exports = require('./App.prod')
|
||||
else
|
||||
module.exports = require('./App.dev')
|
|
@ -0,0 +1,17 @@
|
|||
import React, {Component} from 'react'
|
||||
|
||||
import Explorer from './Explorer'
|
||||
import { Provider } from 'react-redux'
|
||||
|
||||
import './App.css'
|
||||
|
||||
export default class App extends Component {
|
||||
render() {
|
||||
const { store } = this.props
|
||||
return (
|
||||
<Provider store={store}>
|
||||
<Explorer />
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
import React from 'react'
|
||||
import parameters from '../load-parameters'
|
||||
import deepAssign from 'deep-assign'
|
||||
|
||||
let
|
||||
groupedByVariableName = parameters
|
||||
.filter(p => p && p.variable)
|
||||
.reduce((acc, p) => {
|
||||
let variableName = p.variable
|
||||
if (acc[variableName])
|
||||
acc[variableName].push(p)
|
||||
else
|
||||
acc[variableName] = [p]
|
||||
return acc
|
||||
}, {}),
|
||||
|
||||
conflictingTags = (tags1, tags2) =>
|
||||
Object.keys(tags1).reduce((conflicts, k) => {
|
||||
if (typeof tags2[k] != 'undefined' && tags2[k] !== tags1[k])
|
||||
conflicts.push(k)
|
||||
return conflicts
|
||||
}, []),
|
||||
|
||||
groupedMergedVariables =
|
||||
Object.keys(groupedByVariableName)
|
||||
.reduce((list, name) => {
|
||||
let items = groupedByVariableName[name]
|
||||
/* Les items sont des fragments de variables.
|
||||
Les premiers fragments vont être fusionnés dans les suivants,
|
||||
sauf s'il introduit un écrasement d'un tag */
|
||||
let variableList = items.slice(1).reduce((mergedItems, item) => {
|
||||
let mergedItem = mergedItems.reduce((final, itemBefore) => {
|
||||
let oups = conflictingTags(itemBefore.tags, item.tags)
|
||||
//console.log('conflicts for ', itemBefore.tags, item.tags)
|
||||
return oups.length ? item : deepAssign({}, item, itemBefore)
|
||||
},
|
||||
item)
|
||||
mergedItems.push(mergedItem)
|
||||
return mergedItems
|
||||
},
|
||||
[items[0]])
|
||||
return [...variableList, ...list]
|
||||
}, [])
|
||||
console.log('groupedMergedVariables', groupedMergedVariables)
|
||||
|
||||
|
||||
|
||||
export default class Explorer extends React.Component {
|
||||
render() {
|
||||
return <div>{JSON.stringify(groupedMergedVariables['agff'], null, 2)}</div>
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
# Cotisation non triviale.
|
||||
# C'est pas juste ça ?
|
||||
si < PSS -> cotisation forfaitaire GMP
|
||||
si > PSS alors le mec va payer une cotisation AGIRC, et la GMP sera le complément pour arriver à un montant total = cotisation forfaitaire GMP
|
|
@ -0,0 +1,47 @@
|
|||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
import { compose, createStore, applyMiddleware } from 'redux'
|
||||
import App from './containers/App'
|
||||
import reducers from './reducers'
|
||||
import DevTools from './DevTools'
|
||||
import { AppContainer } from 'react-hot-loader'
|
||||
import createSagaMiddleware from 'redux-saga'
|
||||
import rootSaga from './sagas'
|
||||
|
||||
const sagaMiddleware = createSagaMiddleware()
|
||||
|
||||
const createFinalStore = compose(
|
||||
// Enables your middleware:
|
||||
applyMiddleware(sagaMiddleware), // any Redux middleware, e.g. redux-thunk
|
||||
// Provides support for DevTools:
|
||||
DevTools.instrument()
|
||||
)(createStore)
|
||||
|
||||
|
||||
const store = createFinalStore(reducers)
|
||||
sagaMiddleware.run(rootSaga)
|
||||
|
||||
let anchor = document.querySelector('#js')
|
||||
|
||||
render(
|
||||
<AppContainer>
|
||||
<App store={store}/>
|
||||
</AppContainer>,
|
||||
anchor
|
||||
)
|
||||
|
||||
if (module.hot) {
|
||||
module.hot.accept('./containers/App', () => {
|
||||
// If you use Webpack 2 in ES modules mode, you can
|
||||
// use <App /> here rather than require() a <NextApp />.
|
||||
const NextApp = require('./containers/App').default
|
||||
render(
|
||||
<AppContainer>
|
||||
<NextApp store={store} />
|
||||
</AppContainer>,
|
||||
anchor
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export {anchor}
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>prel2</title>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="js">lOl</div>
|
||||
<script type="text/javascript" src="dist/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,6 @@
|
|||
/* Load all yaml files in a dir */
|
||||
let requireContext = require.context('./parameters/cotisations', false, /(agirc|arrco|agff).yaml$/)
|
||||
export default requireContext.keys()
|
||||
.map( requireContext )
|
||||
//flatten
|
||||
.reduce((acc, next) => acc.concat(next), [])
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "prel2",
|
||||
"version": "0.0.1",
|
||||
"license": "AGPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:laem/prel2.git"
|
||||
},
|
||||
"description": "Expérimentation sur les prélèvements sociaux en code",
|
||||
"engines": {
|
||||
"node": ">=6.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-runtime": "^6.6.1",
|
||||
"classnames": "^2.2.1",
|
||||
"deep-assign": "^2.0.0",
|
||||
"react": "^15.0.1",
|
||||
"react-dom": "^15.0.1",
|
||||
"react-hot-loader": "3.0.0-beta.1",
|
||||
"react-redux": "^4.4.5",
|
||||
"redux": "^3.5.2",
|
||||
"redux-saga": "^0.10.5",
|
||||
"whatwg-fetch": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.3.3",
|
||||
"babel-core": "^6.7.4",
|
||||
"babel-eslint": "^6.0.0-beta.6",
|
||||
"babel-loader": "^6.2.4",
|
||||
"babel-polyfill": "^6.9.1",
|
||||
"babel-preset-es2015": "^6.6.0",
|
||||
"babel-preset-react": "^6.5.0",
|
||||
"babel-preset-stage-0": "^6.5.0",
|
||||
"core-js": "^2.2.0",
|
||||
"css-loader": "^0.23.1",
|
||||
"eslint": "^2.3.0",
|
||||
"eslint-plugin-react": "^5.1.1",
|
||||
"express": "^4.13.3",
|
||||
"file-loader": "^0.8.5",
|
||||
"html-loader": "^0.4.2",
|
||||
"img-loader": "^1.2.2",
|
||||
"json-loader": "^0.5.4",
|
||||
"postcss-loader": "^0.8.0",
|
||||
"redux-devtools": "^3.2.0",
|
||||
"redux-devtools-dock-monitor": "^1.1.1",
|
||||
"redux-devtools-log-monitor": "^1.0.9",
|
||||
"style-loader": "^0.13.0",
|
||||
"url-loader": "^0.5.7",
|
||||
"webpack": "^1.12.14",
|
||||
"webpack-dev-server": "^1.14.1",
|
||||
"yaml-loader": "^0.2.0"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
# Les tags communs à toutes les variables de ce répertoire sont renseignés
|
||||
# dans ce fichier du même nom,
|
||||
# pour éviter de polluer les déclarations de variables.
|
||||
|
||||
domaine: prélèvements sociaux
|
||||
revenus: salaires
|
||||
type: cotisation sociale
|
||||
-
|
||||
domaine: prélèvements sociaux
|
||||
revenus: salaires
|
||||
type: cotisation sociale
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1 @@
|
|||
#
|
|
@ -0,0 +1,4 @@
|
|||
# Cotisation non triviale.
|
||||
# C'est pas juste ça ?
|
||||
#si < PSS -> cotisation forfaitaire GMP
|
||||
#si > PSS alors le mec va payer une cotisation AGIRC, et la GMP sera le complément pour arriver à un montant total = cotisation #forfaitaire GMP
|
|
@ -2,7 +2,7 @@
|
|||
description: |
|
||||
Cotisation de retraite complémentaire
|
||||
(Cotisation pour l'Association pour la Gestion du Fonds de Financement de l’AGIRC et de l’ARRCO)
|
||||
@:
|
||||
tags:
|
||||
branche: retraite
|
||||
type de retraite: complémentaire
|
||||
destinataire: AGFF
|
||||
|
@ -13,27 +13,10 @@
|
|||
marginalRateTaxScale:
|
||||
base: plafond_securite_sociale
|
||||
|
||||
- variable: agff
|
||||
?:
|
||||
categorie_salarié: privé non cadre
|
||||
@:
|
||||
- variable: AGFF
|
||||
tags:
|
||||
au nom de: employeur
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
rate:
|
||||
values:
|
||||
2001-04-01: .008
|
||||
- threshold: 1
|
||||
rate:
|
||||
values:
|
||||
2001-04-01: .009
|
||||
- threshold: 3
|
||||
rate: 0
|
||||
|
||||
- variable: agff
|
||||
@:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé non cadre
|
||||
|
||||
marginalRateTaxScale:
|
||||
|
@ -48,10 +31,28 @@
|
|||
- threshold: 3
|
||||
rate: 0
|
||||
|
||||
- variable: agff
|
||||
@:
|
||||
- variable: AGFF
|
||||
tags:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé non cadre
|
||||
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
rate:
|
||||
values:
|
||||
2001-04-01: .008
|
||||
- threshold: 1
|
||||
rate:
|
||||
values:
|
||||
2001-04-01: .009
|
||||
- threshold: 3
|
||||
rate: 0
|
||||
|
||||
- variable: AGFF
|
||||
tags:
|
||||
au nom de: salarié
|
||||
conditions:
|
||||
categorie_salarié: privé cadre
|
||||
|
||||
marginalRateTaxScale:
|
||||
|
@ -71,10 +72,10 @@
|
|||
- threshold: 8
|
||||
rate: 0
|
||||
|
||||
- variable: agff
|
||||
@:
|
||||
- variable: AGFF
|
||||
tags:
|
||||
au nom de: employeur
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé cadre
|
||||
|
||||
marginalRateTaxScale:
|
|
@ -2,12 +2,12 @@
|
|||
description: |
|
||||
Cotisation de retraite complémentaire cadre, complémentant le régime ARRCO
|
||||
(pour l'Association Générale des Institutions de Retraite des Cadres)
|
||||
@:
|
||||
tags:
|
||||
branche: retraite
|
||||
type de retraite: complémentaire
|
||||
destinataire: AGIRC
|
||||
reference: http://www.agirc-arrco.fr/l-agirc-et-larrco/chiffres-cles
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé cadre
|
||||
commentaires: |
|
||||
Il éxiste une tranche C, de 4 à 8 fois la base, sur laquelle la répartition des cotisations est décidée au sein de l’entreprise jusqu’à 20 %. De 20 % à 20,30 %, la répartition est la suivante : 66,67 % à la charge du salarié et 33,33 % pour l’employeur.
|
||||
|
@ -15,8 +15,8 @@
|
|||
marginalRateTaxScale:
|
||||
base: plafond_securite_sociale
|
||||
|
||||
- variable: agirc
|
||||
@:
|
||||
- variable: AGIRC
|
||||
tags:
|
||||
au nom de: employeur
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
|
@ -38,8 +38,8 @@
|
|||
- threshold: 8
|
||||
rate: 0
|
||||
|
||||
- variable: agirc
|
||||
@:
|
||||
- variable: AGIRC
|
||||
tags:
|
||||
au nom de: salarié
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
|
@ -2,7 +2,7 @@
|
|||
description: |
|
||||
Cotisation de retraite complémentaire cadre, pour le fonctionnement de l'APEC
|
||||
(Association Pour l’Emploi des Cadres)
|
||||
@:
|
||||
tags:
|
||||
branche: retraite
|
||||
type de retraite: complémentaire
|
||||
destinataire: APEC
|
||||
|
@ -11,8 +11,8 @@
|
|||
avertissements: |
|
||||
Avant 2011, il y avait une cotisation forfaitaire au lieu de la tranche A
|
||||
|
||||
- variable: apec
|
||||
@:
|
||||
- variable: APEC
|
||||
tags:
|
||||
au nom de: employeur
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
|
@ -29,8 +29,8 @@
|
|||
- threshold: 4
|
||||
rate: 0
|
||||
|
||||
- variable: apec
|
||||
@:
|
||||
- variable: APEC
|
||||
tags:
|
||||
au nom de: salarié
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
|
@ -3,7 +3,7 @@
|
|||
Cotisation de retraite complémentaire pour tous les salariés du secteur privé,
|
||||
(pour l'Association pour le Régime de Retraite Complémentaire des salariés)
|
||||
reference: http://www.agirc-arrco.fr/l-agirc-et-larrco/chiffres-cles
|
||||
@:
|
||||
tags:
|
||||
branche: retraite
|
||||
type de retraite: complémentaire
|
||||
destinataire: ARRCO
|
||||
|
@ -12,10 +12,10 @@
|
|||
base: plafond_securite_sociale
|
||||
|
||||
|
||||
- variable: arrco
|
||||
@:
|
||||
- variable: ARRCO
|
||||
tags:
|
||||
au nom de: employeur
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé cadre
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
|
@ -32,10 +32,10 @@
|
|||
- threshold: 1
|
||||
rate: 0
|
||||
|
||||
- variable: arrco
|
||||
@:
|
||||
- variable: ARRCO
|
||||
tags:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé cadre
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
|
@ -52,10 +52,10 @@
|
|||
- threshold: 1
|
||||
rate: 0
|
||||
|
||||
- variable: arrco
|
||||
@:
|
||||
- variable: ARRCO
|
||||
tags:
|
||||
au nom de: employeur
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé non cadre
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
||||
|
@ -82,9 +82,10 @@
|
|||
- threshold: 3
|
||||
rate: 0
|
||||
|
||||
@:
|
||||
- variable: ARRCO
|
||||
tags:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
categorie_salarié: privé non cadre
|
||||
marginalRateTaxScale:
|
||||
- threshold: 0
|
|
@ -1,5 +1,5 @@
|
|||
- variable: chomage
|
||||
@:
|
||||
tags:
|
||||
branche: chomage
|
||||
recouvreur: URSSAF
|
||||
destinataire: Pôle emploi
|
||||
|
@ -8,7 +8,7 @@
|
|||
base: assiette_cotisations_sociales
|
||||
|
||||
- variable: chomage
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
linear:
|
||||
values:
|
||||
|
@ -17,7 +17,7 @@
|
|||
1992-07-01: 0.128
|
||||
|
||||
- variable: chomage
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
linear:
|
||||
values:
|
|
@ -1,6 +1,6 @@
|
|||
- variable: contribution solidarité autonomie
|
||||
abbreviation: CSA
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
contribution: oui
|
||||
branche: vieillesse
|
|
@ -1,12 +1,12 @@
|
|||
- variable: cotisation exceptionnelle temporaire
|
||||
?:
|
||||
conditions:
|
||||
categorie salarie: prive cadre
|
||||
linear:
|
||||
base: assiette cotisations sociales
|
||||
limit: 8 * plafond_securite_sociale
|
||||
|
||||
- variable: cotisation exceptionnelle temporaire
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
linear:
|
||||
values:
|
||||
|
@ -18,7 +18,7 @@
|
|||
1997-01-01: .00044
|
||||
|
||||
- variable: cotisation exceptionnelle temporaire
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
linear:
|
||||
values:
|
|
@ -1,5 +1,5 @@
|
|||
- variable: maladie
|
||||
@:
|
||||
tags:
|
||||
branche: maladie
|
||||
plafonnée: oui
|
||||
linear:
|
||||
|
@ -7,7 +7,7 @@
|
|||
limit: 4
|
||||
|
||||
- variable: maladie
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
linear:
|
||||
values:
|
||||
|
@ -25,7 +25,7 @@
|
|||
1993-07-01: 0.0483
|
||||
|
||||
- variable: maladie
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
linear:
|
||||
values:
|
||||
|
@ -46,9 +46,9 @@
|
|||
complete la variable: maladie
|
||||
# Ceci signifie que cette spécification ne remplace pas
|
||||
# la variable de base du même nom, mais s'y ajoute !
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
régime géographique: Alsace-Moselle
|
||||
linear:
|
||||
values:
|
||||
|
@ -63,9 +63,9 @@
|
|||
1989-09-01: 0.75
|
||||
|
||||
- variable: maladie alsace moselle
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
?:
|
||||
conditions:
|
||||
régime géographique: Alsace-Moselle
|
||||
régime: agricole
|
||||
linear:
|
|
@ -1,5 +1,5 @@
|
|||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
branche: retraite
|
||||
type de retraite: base
|
||||
recouvreur: URSSAF
|
||||
|
@ -9,7 +9,7 @@
|
|||
base: assiette_cotisations_sociales
|
||||
|
||||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
plafonnée: non
|
||||
linear:
|
||||
|
@ -22,7 +22,7 @@
|
|||
2004-07-01: .001
|
||||
|
||||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
plafonnée: non
|
||||
linear:
|
||||
|
@ -35,13 +35,13 @@
|
|||
1991-02-01: 0.016
|
||||
|
||||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
plafonnée: oui
|
||||
linear:
|
||||
limit: 4 * plafond_securite_sociale
|
||||
|
||||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
au nom de: salarié
|
||||
plafonnée: oui
|
||||
linear:
|
||||
|
@ -55,7 +55,7 @@
|
|||
1993-07-01: .0655
|
||||
|
||||
- variable: vieillesse
|
||||
@:
|
||||
tags:
|
||||
au nom de: employeur
|
||||
plafonnée: oui
|
||||
linear:
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
import { combineReducers } from 'redux'
|
||||
import { SELECT_TAG } from './actions'
|
||||
|
||||
function selectTag(state = {}, action) {
|
||||
switch (action.type) {
|
||||
case SELECT_TAG:
|
||||
return Object.assign({}, state, {
|
||||
[action.tagName]: action.tagValue
|
||||
})
|
||||
default:
|
||||
return state
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export default combineReducers({
|
||||
selectTag
|
||||
})
|
|
@ -0,0 +1,16 @@
|
|||
import { takeEvery} from 'redux-saga'
|
||||
import { call, put} from 'redux-saga/effects'
|
||||
import Promise from 'core-js/fn/promise'
|
||||
|
||||
|
||||
function* handleSubmitStep() {
|
||||
console.log('salut')
|
||||
}
|
||||
|
||||
function* watchSteps() {
|
||||
yield* takeEvery('SUBMIT_STEP', handleSubmitStep)
|
||||
}
|
||||
|
||||
export default function* rootSaga() {
|
||||
yield [ watchSteps() ]
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
var webpack = require('webpack')
|
||||
var WebpackDevServer = require('webpack-dev-server')
|
||||
var config = require('./webpack.config')
|
||||
|
||||
new WebpackDevServer(webpack(config), {
|
||||
publicPath: config.output.publicPath,
|
||||
hot: true,
|
||||
historyApiFallback: true,
|
||||
stats: {
|
||||
colors: true
|
||||
},
|
||||
noInfo: false
|
||||
}).listen(3000, 'localhost', function (err) {
|
||||
if (err)
|
||||
console.log(err)
|
||||
console.log('Bonjour ! Je vous sers sur localhost:3000')
|
||||
})
|
|
@ -0,0 +1,53 @@
|
|||
var webpack = require('webpack'),
|
||||
autoprefixer = require('autoprefixer')
|
||||
|
||||
module.exports = {
|
||||
devtool: 'cheap-module-source-map',
|
||||
entry: [
|
||||
'webpack-dev-server/client?http://localhost:3000/',
|
||||
'webpack/hot/only-dev-server',
|
||||
'react-hot-loader/patch',
|
||||
'babel-polyfill',
|
||||
'./entry.js'
|
||||
],
|
||||
output: {
|
||||
path: require('path').resolve('./dist/'),
|
||||
filename: 'bundle.js',
|
||||
publicPath: '/dist/'
|
||||
},
|
||||
module: {
|
||||
loaders: [ {
|
||||
test: /\.css$/,
|
||||
loader: 'style!css!postcss-loader'
|
||||
}, {
|
||||
test: /\.html$/,
|
||||
loader: 'html'
|
||||
},
|
||||
{
|
||||
test: /\.yaml$/,
|
||||
loader: 'json!yaml'
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel-loader'
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
loader: 'url?limit=10000!img?progressive=true'
|
||||
} ]
|
||||
},
|
||||
postcss: [
|
||||
autoprefixer({
|
||||
browsers: [ '> 1% in FR', 'not ie < 10' ]
|
||||
})
|
||||
],
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoErrorsPlugin(),
|
||||
// in order to use the fetch polyfill:
|
||||
new webpack.ProvidePlugin({
|
||||
'fetch': 'imports?this=>global!exports?global.fetch!whatwg-fetch'
|
||||
})
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue