tiagob / create-full-stack Goto Github PK
View Code? Open in Web Editor NEWSet up a TypeScript full stack with one command.
Home Page: https://create-full-stack.com
License: MIT License
Set up a TypeScript full stack with one command.
Home Page: https://create-full-stack.com
License: MIT License
Example for web and apollo backend. Only include what's needed
{
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Chrome",
"url": "http://localhost:3000",
"webRoot": "${workspaceFolder}/client/src",
"sourceMapPathOverrides": {
"webpack:///client/src/*": "${webRoot}/*"
}
},
{
"type": "node",
"request": "attach",
"name": "Node: Nodemon",
"processId": "${command:PickProcess}",
"restart": true,
"protocol": "inspector"
}
]
}
A lot of duplicate code across templates. It would be ideal to simplify this with TS macros inside these templates.
microsoft/TypeScript#4892
I spoke with John Boggs. He's interested in this and is down to make his own project to tackle this use case
Becomes a bigger problem with additional templates like chat, maps, pictures which are just added in
Need to update the package (bump version in package.json)
https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages#publishing-unscoped-public-packages
CRA installs react-scripts
on every run which does most of the changes. This is to avoid changes to the global package. Should we do the same or should we check for updates?
https://github.com/facebook/create-react-app/blob/f5c3bdb65480f93b2d4a4c2f3214fc50753de434/packages/create-react-app/createReactApp.js
https://github.com/facebook/create-react-app/blob/f5c3bdb65480f93b2d4a4c2f3214fc50753de434/packages/react-scripts/scripts/init.js
Need to take create-full-stack and eslint-config-full-stack
apollo-server uses /
apollo-server-express uses /graphql
Review how CRA works and test generating all permutations
https://github.com/facebook/create-react-app/tree/master/test
CRA uses lerna and lerna-changelog
https://github.com/facebook/create-react-app/blob/f5c3bdb65480f93b2d4a4c2f3214fc50753de434/lerna.json
https://github.com/facebook/create-react-app/blob/f5c3bdb65480f93b2d4a4c2f3214fc50753de434/package.json#L34-L35
Other options in
https://github.com/lerna/lerna#independent-mode
Include everything a new dev needs to get started.
Ex. install postgres, sync-db, buildNodeBackend etc.
Include in README. Should this be in TS or bash? If it's in bash could install the latest yarn. If it's in TS we have access to a better scripting language and the only thing we're missing is yarn installation (is this true?) which could be included in the README
https://www.apollographql.com/docs/react/caching/cache-configuration/
Currently only using ~half the time. Is this the default?
Right now it's including everything in npm pack
under packages/create-full-stack
. It only needs to include what tsc compiles into build/
and any templates.
It needs to copy over the templates directory or make templates packages (#49)
Using files
in npm package.json
like CRA does is confusing because it's in packages/create-full-stack and packages/create-full-stack/build so the filter gets applied twice (ex. if templates
is in files it doesn't get included in npm pack
)
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/package.json#L22-L23 (this isn't needed because they moved them to packages)
Is there a way to always publish from build/
? Could lerna handle this? Trying to overwrite the publish script in package.json
with yarn --cwd build/ publish
doesn't work
https://github.com/facebook/create-react-app/blob/master/packages/create-react-app/createReactApp.js#L416
https://github.com/facebook/create-react-app/tree/master/packages
cra-template-
https://github.com/expo/expo/tree/master/templates
https://github.com/expo/expo-cli/blob/d1e02e31a4091ec43dd77053758f64c4b83ea00f/packages/expo-cli/src/commands/init.ts#L29
expo-template-
Could do cfs-template-
create-full-stack.com
createfullstack.com (redirect to create-full-stack.com)
When you have multiple clients open it would be cool if you update one and the others update. Is this too complicated to include in the example app?
https://www.apollographql.com/docs/react/data/subscriptions/
https://www.apollographql.com/docs/apollo-server/data/subscriptions/
https://hasura.io/docs/1.0/graphql/manual/subscriptions/index.html
Support 2 paths:
Is path 2 useful? How many dependencies does it really reduce?
Use concurrently. Should this be start
(like CRA and expo) or watch
(like node)?
Could this solve the single version of react and react-native on web and mobile problem? Blocked on tsc supporting pnp
https://classic.yarnpkg.com/en/docs/pnp/getting-started
microsoft/TypeScript#28289
Something like what's in root but for all template packages. Some of the template packages use prettier instead of eslint.
"scripts": {
"lint": "eslint src/**.ts"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**.{ts,tsx}": "eslint --fix"
}
Should lint-staged
include git add
? It's some examples.
May want to use prettier on files outside of .ts
and .tsx
. An example would be .md
Can we use https://docs.expo.io/guides/authentication/ in conjunction with Firebase?
4 different patterns:
Configuration in .env
. Both Firebase variables and Google ios and android client ids. Need to add the client ids under the Google whitelist in Firebase itself.
https://docs.expo.io/versions/latest/sdk/google/
https://console.developers.google.com/apis/credentials?project=create-full-stack
Currently explicitly using forward slashes in the path. Windows uses backslashes
New structure. Use copySync on the auth level to the root of the packages. Exclude not flagged clients (ex. for --web
exclude mobile/
).
Also, rename backend/
to server/
for apollo-server-express/
?
Merge dependencies from package.json
s . Verify app name isn't included
Could make this change in CRA too
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.