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

18 lines
280 B
JavaScript
Raw Normal View History

import R from 'ramda'
/* Load yaml files */
let context = require.context(
2017-01-20 10:52:39 +00:00
'../../règles/rémunération-travail', 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)