[x] Have the portal nextjs app use an ENV variable to locate the file
[x] Add CLI app folder
[x] Create CLI file
[x] that clones the portal repo
[x] installs portal
[x] exports the dataset folder
[x] starts the portal app
Analysis
Starter, hacky approach
A starter, a shell script like ... this
cd /Users/rgrp/src/datopian/sandbox/portal
export DATASET=...
npm run dev
portal PATH
How it works:
cd ~/.portal/
git clone https://github.com/datopian/portal.js/
cd portal.js/packages/portal-app
# or yarn install ...
npm install
export DATASET=PATH
next dev
# watch and reload next ... (perhaps a hack by writing something into next folder to trigger reload)
# or use https://github.com/hashicorp/next-remote-watch
The
portal cli
can automatically display dataset page with information when we run the command:Acceptance
portal
command as a basic shell script ... Done https://github.com/datopian/portal-experiment/pull/11portal
command as a proper bundled CLI Done https://github.com/datopian/portal-experiment/pull/11https://user-images.githubusercontent.com/29900845/109830797-1dd1ba80-7c3f-11eb-908e-adf4389d5240.mov
Tasks
Analysis
Starter, hacky approach
A starter, a shell script like ... this
How it works: