mon-entreprise/source/engine/load-entity-rules.js

18 lines
275 B
JavaScript

import R from 'ramda'
/* Load yaml files */
let context = require.context(
'../../règles/entités/salariat', true,
/([a-zA-Z]|-|_)+.yaml$/)
let rules = R.pipe(
R.map(context),
//flatten
R.unnest,
)(context.keys())
export default rules.filter(r => r != null)