-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[epic] v0.2: create-portal-app command and steps #33
Comments
I finish those tasks and created pull request #52, but I need to be validated before stub package.
|
@cotts can you update the acceptance section in bold with what you've done and we'll look at PR. |
@cotts can you update the main issue tasks and acceptance as per https://playbook.datopian.com/issues-tasks/#completing-tasks and then close this as FIXED if it is done (or flag what is not done). |
@rufuspollock , I updated the related tasks and the label, but before continue, I think it can't be closed yet because there are more things to accomplish and test before publishing. |
FIXED / WONTFIX. We created a working create-portal-app https://github.com/datopian/portal.js/tree/4a6577fd38d482696e27492bd166050495bc0c4c/packages/create-portal-app. However, for now we are parking and won't go further as we are not sure a separate |
create-portal-app
command and steps to boot a new portal.Job Story
When I'm a portal developer wanting to create a new portal I want a very simple experience (e.g. one command) to boot a new portal that i can then customize.
Approach
We are taking the modern
create-react-app
/create-next-app
approach:BONUS 🍬 : like
create-next-app
it would be nice to be able to run off a template e.g.Acceptance
create-portal-app
package on npmTasks
create-react-app
andcreate-nextjs-app
and evaluate which we usecreate-portal-app
and make datopian the owner on npm (reserves it for later) (don't put under @datopin as that would breaknpx create-portal-app
)create-portal-app
so not a big deal I thinkAnalysis
Our approach is different frontend v2 (compositional vs inheritance)
Instead of developing themes, we want to be able to init the frontend app and customize as per our needs. For example, have a look how the following frameworks work.
Inspiration
npx create-react-app my-app-name
npm init react-app my-app-name
oryarn create react-app my-app-name
npm start
gatsby new my-blazing-fast-site
npm install -g gatsby-cli
gatsby develop
In GatsbyJS, you first need to install CLI tool that helps you to init an app, start server etc. We want to simplify the process and use Create React App style => use
npx
for initiating the app and then we can usenpm run ...
commands for running server etc.npx is a very powerful command that's been available in npm starting version 5.2
How does
npx
works?Research on
create-xxx-app
in detailFB create-react-app
https://github.com/facebook/create-react-app
https://github.com/facebook/create-react-app/blob/master/tasks/cra.js
Main file for managing all the params for creating react app. tasks/cra.js -> from package.json
package.json
- https://github.com/facebook/create-react-app/blob/master/package.json#L7cra.js
- https://github.com/facebook/create-react-app/blob/master/tasks/cra.jsChild processes here that are used to create project dir.
create-nextjs-app https://github.com/vercel/next.js
Codebase here for next: https://github.com/vercel/next.js/tree/canary/packages/create-next-app
Also let's clean the codebase to use either javascript or typescript. Right now its mixed for open source repo.
package.json
index.ts
- https://github.com/vercel/next.js/blob/canary/packages/create-next-app/index.tsCalls this sub lib
The text was updated successfully, but these errors were encountered: