sc-react-ions
Version:
An open source set of React components that implement Ambassador's Design and UX patterns.
21 lines (15 loc) • 575 B
JavaScript
var fs = require('fs')
function _genComponentExport(component) {
fs.readFile('./lib/components/' + component + '/index.js', function (error, data) {
var componentData = data.toString().replace('./', './components/')
fs.writeFile('./lib/' + component + '.js', componentData)
})
}
fs.readdir('./src/components', function (err, data) {
var components = data.filter(function (f) { return (/^[A-Z]/.test(f)) })
// Generate individual component exports
for (var i = 0; i < components.length; i++) {
_genComponentExport(components[i])
}
})