[examples/data-literate][s]: working script to have this work with your own content.
This commit is contained in:
18
examples/data-literate/datahub-portal-local-cli.js
Normal file
18
examples/data-literate/datahub-portal-local-cli.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const path = require('path')
|
||||
const fs = require('fs');
|
||||
|
||||
const srcPath = process.argv[2]
|
||||
const destForMarkdown = './content'
|
||||
const destForData = './public'
|
||||
|
||||
const readme = path.join(srcPath, 'README.md')
|
||||
const readmeDest = path.join(destForMarkdown, 'README.md')
|
||||
|
||||
fs.copyFileSync(readme, readmeDest)
|
||||
|
||||
const data = path.join(srcPath, 'data.csv')
|
||||
const dataDest = path.join(destForData, 'data.csv')
|
||||
|
||||
fs.copyFileSync(data, dataDest)
|
||||
|
||||
console.log('Done')
|
||||
Reference in New Issue
Block a user