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

18 lines
284 B
JavaScript
Raw Normal View History

import R from 'ramda'
/* Load yaml files */
let context = require.context(
'../../règles/rémunération-travail/cdd', true,
2016-12-07 18:08:10 +00:00
/([a-zA-Z]|-|_)+.yaml$/)
let rules = R.pipe(
R.map(context),
//flatten
R.unnest,
)(context.keys())
2016-12-07 18:08:10 +00:00
export default rules.filter(r => r != null)