iamturns / create-exposed-app Goto Github PK
View Code? Open in Web Editor NEWApp generator with everything exposed for maximum control (powered by TypeScript, ESBuild, Jest, ESLint, GitHub Actions, Prettier, and more)
License: MIT License
App generator with everything exposed for maximum control (powered by TypeScript, ESBuild, Jest, ESLint, GitHub Actions, Prettier, and more)
License: MIT License
Currently the following message is printed after init:
VS Code users: run 'Extensions: Show Recommended Extensions'
This should instead (or as well as) be added to the DEVELOPING.md
file(s)
Running npm run dev
should simply compile files.
Currently the npm run dev
command is also building DTS files, which runs type checking. If something breaks type checking, the build shows a failure.
This is not ideal. Type checking should be a separate process manually run after development, along with linting and testing. Having type checking errors during development breaks the flow.
✅ Checklist
It's possible for files to go unformatted.
The npm run lint
command should alert to this issue.
Can use --list-different
option with Prettier. However, we have other formatting tools besides Prettier. Perhaps the best way is to run npm run format
and check if any files changed. However, this means the git must be clear. Perhaps this should only be run during CI.
✅ Checklist
Apply imagemin to image files automatically.
Logging is common for every app, and having these provided will save time.
Ideally with tests.
It's outta date!
Move husky settings into package.json
The setting is so minor, is just an alias to npm run pre-commit
, and will never be changed.
"husky": {
"hooks": {
"pre-commit": "npm run pre-commit"
}
}
An 'active: yes' badge can actually become out of date, whereas a 'last commit' badge will always be true.
https://shields.io/category/activity
✅ Checklist
Currently only code contributors are recognised, and only by a very small link the README file.
Implement the all-contributors table: https://github.com/all-contributors/all-contributors
✅ Checklist
I think this should work:
roots: ["<rootDir>/src/"]
When hovering over an issue in GitHub, the first few lines are displayed. Currently this displays the checklist. It would be better to display the actual issue.
It is annoying to re-type the project package name when re-syncing with create-exposed-app
.
Default the answer to the name of the directory.
I believe package.json
should be human readable. Currently the URLs are pushed too high on the page, when it's more common scan for version numbers and dependencies.
Default options: https://github.com/cameronhunter/prettier-package-json/blob/master/src/defaultOptions.js
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@commitlint/cli
, @commitlint/config-conventional
)@types/jest
, babel-jest
, jest
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@babel/core
, @babel/preset-env
, @babel/preset-typescript
)@commitlint/cli
, @commitlint/config-conventional
)@types/jest
, babel-jest
, jest
)@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
).github/workflows/coveralls.yml
actions/checkout v2
actions/setup-node v2
.github/workflows/formatter.yml
actions/checkout v2
actions/setup-node v2
stefanzweifel/git-auto-commit-action v4
.github/workflows/push-branch.yml
actions/checkout v2
actions/setup-node v2
.github/workflows/push-master.yml
actions/checkout v2
wagoid/commitlint-github-action v4
actions/setup-node v2
GoogleCloudPlatform/release-please-action v3
package.json
debug ^4.3.3
dotenv ^10.0.0
hygen ^6.1.0
@babel/core 7.16.7
@babel/preset-env 7.16.7
@babel/preset-typescript 7.16.7
@commitlint/cli 16.0.1
@commitlint/config-conventional 16.0.0
@types/debug 4.1.7
@types/jest 27.4.0
@typescript-eslint/eslint-plugin 5.8.1
@typescript-eslint/parser 5.8.1
babel-jest 27.4.5
doctoc 2.1.0
esbuild 0.14.10
eslint 8.6.0
eslint-config-airbnb-base 15.0.0
eslint-config-airbnb-typescript 16.1.0
eslint-config-prettier 8.3.0
eslint-formatter-pretty 4.1.0
eslint-plugin-eslint-comments 3.2.0
eslint-plugin-import 2.25.3
eslint-plugin-jest 25.3.3
eslint-plugin-jsx-a11y 6.5.1
eslint-plugin-promise 6.0.0
eslint-plugin-react 7.28.0
eslint-plugin-unicorn 40.0.0
gen-esm-wrapper 1.1.3
import-sort-cli 6.0.0
import-sort-parser-babylon 6.0.0
import-sort-parser-typescript 6.0.0
import-sort-style-module 6.0.0
jest 27.4.5
markdownlint-cli 0.30.0
npm-run-all 4.1.5
prettier 2.5.1
rimraf 3.0.2
sort-package-json 1.53.1
typescript 4.5.4
There are many dependencies which are no longer required, or should be moved to devDependencies
instead.
✅ Checklist
This is useful for every project I know of.
Notes:
.gitignore
file.env.example
file (is this the convention?).env
fileCurrently the test
script generates a coverage report. However this is quite slow, and is better off to be run only when required. Recommend adding a test:coverage
command.
{
"test": "jest --passWithNoTests",
"test:coverage": "jest --passWithNoTests --coverage",
}
Prettier plugin sort imports
A prettier plugin to sort import declarations by provided Regular Expression order.
https://github.com/trivago/prettier-plugin-sort-imports#readme
TBD
TBD
It's easy for ADR titles and file names to become out of sync. Fix this with a script that writes the ADR title to the filename, and run it automatically on changes.
✅ Checklist
it would be useful to browse an example app, to see how create-exposed-app
is pieced together.
It could be run before being published and stored in an examples
directory.
✅ Checklist
Add test coverage reporting tool, e.g. https://coveralls.io/
What other tools exist?
Markdown files that aren't staged are linted within lint-staged.
Lint-staged should be successful.
Lint-staged lints the other file.
create-exposed-app
version: latestNot all markdown files are linted when running npm run lint:markdown
.
.github
directoryLinting should fail
Linting is successful
npm install babel-plugin-macros --save-dev
And then in babel config:
plugins: [
"macros",
]
Example:
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
There are many many more.
Requires tweaks to Babel config (ignore if NODE_ENV is not test
), and typescript configs
As I go through the getting started, and run the npm init exposed-app
, my terminal gets stuck after the new 'hello-world' git branch is checked out.
Please include if possible and/or relevant: code, config, links, repository that reproduces the bug.
Installation should progress to 'Copying 50 files' as per the gif shows on the Read me.
No error message is logged, and the Terminal session keeps hangin.
create-exposed-app
version: latestNo ideas.
✅ Checklist
Tests within dist
directory are run. They should be ignored.
✅ Checklist
Ask for name and email address.
Default to settings in git config.
Keep your manual linting overrides to yourself
Use eslint-config-iamturns
as a central repository to store these rules instead. Potentially use it within the src
directory, but definitely not within template
directory.
✅ Checklist
Currently with dev
and dev:onchange
command, the scripts get confusing if adding other dev:*
commands (e.g. "dev:debug": "DEBUG=1 npm run dev"
) (FYI - might be useful to add this, too!)
Recommended to rename to something like:
{
"build-serve": "babel-node --extensions .js,.jsx,.ts,.tsx src/course-directory-api.ts --inspect",
"build-serve:watch": "nodemon --ext js,jsx,ts,tsx --delay 1 --exec npm run build-serve",
"dev": "NODE_ENV=development npm run build-serve:watch",
"dev:debug": "DEBUG=1 npm run dev",
}
Prefer an ESLint plugin, if it exists.
If not, I know there is a separate markdown linting tool.
Upgrade to Jest 24.
It includes built-in TypeScript support.
Hopefully can simplify the configuration, and possibly remove babel-jest dependency
Bug report
Running npm run dev
searches for missing file
Steps to reproduce
Run npm run dev
Expected behavior
The command should run successfully.
Actual behaviour
Searching for missing src/create-exposed-app.ts
file.
On commit 8755684
I run create-exposed-app-cli.js
I try add all those files to git and commit - git commit -m "Add files"
error mesage:
` ✖ markdownlint
Running tasks for /.{css,gql,graphql,html,json,less,md,mdx,scss,vue,yaml,yml}
Running tasks for **/.{js,jsx,ts,tsx}
Running tasks for src//*
✖ markdownlint found some errors. Please fix them and try committing again.
/home/dewi/tempdewi/test6/docs/adr/README.md: 5: MD041/first-line-h1 First line in file should be a top level heading [Context: "- ADRs"]`
Supporting both TS and JS is adding unnecessary weight to the project.
Instead, assume TS by default. It can be easily removed and converted to JS if needed. Possibly provide instructions for this.
Currently files are overwritten without warning. This can be dangerous, especially for those without version control.
✅ Checklist
It is easy for commits to appear in master
that do not follow conventional commits, and then break the automated release process.
Example: https://github.com/seek-oss/commitlint-config-seek
Note: this only needs to apply in the master
branch. Other branches can follow any commit messages they like. When they are squashed + merged, the commit should then follow conventional commits.
I want to optionally pass in --name example email [email protected]
instead of filling out the interactive answers.
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.