-
Notifications
You must be signed in to change notification settings - Fork 83
First pass at setting up NextGen front-end project #17
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
Closed
georgyangelov
wants to merge
12
commits into
scratchfoundation:develop
from
georgyangelov:gardens-setup
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4114072
Specify node 20 for nvm and nodenv
georgyangelov 8ae9194
chore: add scratch-web project with minimal prettier configuration
georgyangelov 72c0fb2
chore: make prettier not try to auto-format old projects
georgyangelov 87b1850
chore: make prettier check style before commit
georgyangelov 29bd8bf
chore: format prettier config
georgyangelov e286dd9
chore: add scrach-web-shared to store ui components in
georgyangelov 3c7eff2
chore: add tailwind and some port configuration for Vite
georgyangelov 8e622f6
chore: add dynamic config
georgyangelov 27ba732
chore: add env config and .env.example
georgyangelov f2157bd
chore: add readme for running locally
georgyangelov 3627927
Merge remote-tracking branch 'upstream/develop' into gardens-setup
georgyangelov 0315512
chore: add a few notes to the readme regarding projects in the repo
georgyangelov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Scratch-web dynamic variables | ||
# See the README.md for more information on how they get injected into the app | ||
|
||
# The base URL of Keycloak's public interface, used for authentication calls | ||
SCRATCH_WEB_AUTH_BASE_URL=http://localhost:4002 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx lint-staged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.16.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
package.json | ||
|
||
packages/* | ||
!packages/scratch-web | ||
!packages/scratch-web-shared | ||
|
||
## | ||
# The ignores below are copied from .gitignore - please keep them in sync | ||
## | ||
|
||
# build-monorepo.sh | ||
/monorepo.out | ||
/monorepo.tmp | ||
/monorepo.cache | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
.pnpm-debug.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Snowpack dependency directory (https://snowpack.dev/) | ||
web_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache | ||
|
||
# Microbundle cache | ||
.rpt2_cache/ | ||
.rts2_cache_cjs/ | ||
.rts2_cache_es/ | ||
.rts2_cache_umd/ | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variable files | ||
.env | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
.env.local | ||
|
||
# parcel-bundler cache (https://parceljs.org/) | ||
.cache | ||
.parcel-cache | ||
|
||
# Next.js build output | ||
.next | ||
out | ||
|
||
# Nuxt.js build / generate output | ||
.nuxt | ||
dist | ||
|
||
# Gatsby files | ||
.cache/ | ||
# Comment in the public line in if your project uses Gatsby and not Next.js | ||
# https://nextjs.org/blog/next-9-1#public-directory-support | ||
# public | ||
|
||
# vuepress build output | ||
.vuepress/dist | ||
|
||
# vuepress v2.x temp and cache directory | ||
.temp | ||
.cache | ||
|
||
# Docusaurus cache and generated files | ||
.docusaurus | ||
|
||
# Serverless directories | ||
.serverless/ | ||
|
||
# FuseBox cache | ||
.fusebox/ | ||
|
||
# DynamoDB Local files | ||
.dynamodb/ | ||
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Stores VSCode versions used for testing VSCode extensions | ||
.vscode-test | ||
|
||
# yarn v2 | ||
.yarn/cache | ||
.yarn/unplugged | ||
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# There shouldn't be package-lock files in the packages. If there are - someone ran `npm install` | ||
# in the wrong directory | ||
packages/*/package-lock.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
semi: true, | ||
arrowParens: 'avoid', | ||
bracketSameLine: true, | ||
bracketSpacing: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
|
||
plugins: [ | ||
require.resolve('@trivago/prettier-plugin-sort-imports'), | ||
'prettier-plugin-tailwindcss', | ||
], | ||
importOrder: ['^@', '^[./]'], | ||
importOrderSeparation: false, | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["bradlc.vscode-tailwindcss", "esbenp.prettier-vscode"] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "explicit", | ||
"source.organizeImports": "never" | ||
}, | ||
|
||
"files.associations": { | ||
"*.css": "postcss" | ||
}, | ||
|
||
"[css][typescript][javascript][javascriptreact][typescriptreact][html][json][markdown]": { | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
|
||
// Allows constants ending with `Styles` to be recognized by the intellisense as Tailwind strings | ||
"tailwindCSS.classAttributes": [ | ||
"class", | ||
"className", | ||
".*className", | ||
".*Styles", | ||
".*Style", | ||
"classes" | ||
], | ||
|
||
"typescript.preferences.importModuleSpecifierEnding": "minimal" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# scratch-editor | ||
|
||
Scratch editor mono-repo | ||
Scratch editor mono-repo. | ||
|
||
It includes both packages like scratch-gui that are utilized in the current Scratch system and the NextGen one, and NextGen specific ones. | ||
|
||
## Index of Packages | ||
|
||
### scratch-web | ||
|
||
This is the front-end application for the NextGen platform. It's built on React, TypeScript and uses Vite as a build tool. | ||
Please review [packages/scratch-web/README.md] for further detail. | ||
|
||
### scratch-web-shared | ||
|
||
A library for React components and utilities shared between Scratch front-end projects. Currently only scratch-web uses them. | ||
|
||
## Tooling | ||
|
||
The NextGen projects use eslint and prettier. These are run automatically on commit. | ||
If you're using VSCode, we recommend having the eslint, prettier and tailwindcss extensions installed (see [.vscode/extensions.json]). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😎