datopian / portal.js.bak

🌀 The JS data presentation framework. For a single dataset to a full catalog.
https://portal-78qurbwf9-datopian1.vercel.app/
MIT License
22 stars 2 forks source link

Add portal show CLI feature #73

Closed risenW closed 3 years ago

risenW commented 3 years ago

The portal cli can automatically display dataset page with information when we run the command:

# PATH defaultso to current directory
portal [show [PATH]]

Acceptance

Screen Shot 2021-03-03 at 4 34 26 PM Screen Shot 2021-03-03 at 4 36 21 PM

https://user-images.githubusercontent.com/29900845/109830797-1dd1ba80-7c3f-11eb-908e-adf4389d5240.mov

Tasks

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