-
Notifications
You must be signed in to change notification settings - Fork 145
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
Update new template #734
Update new template #734
Conversation
No more need for ts-jest
Inline bash command are not working on windows.
@@ -124,7 +124,7 @@ const NewCommand: GluegunCommand = { | |||
|
|||
const target = | |||
`${props.name}/` + | |||
(props.language === 'typescript' && file.includes('.js.ejs') | |||
(props.language === 'typescript' && file.includes('.js.ejs') && !file.startsWith('.') |
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.
This is to avoid .eslintrc.js
Β to be convert into a typescript file
@@ -0,0 +1,20 @@ | |||
/** | |||
* @type {import("eslint").Linter.Config} |
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.
This is to have autocomplete on the eslint config (very practicle π )
@@ -1,4 +1,8 @@ | |||
const { system, filesystem } = require('gluegun') | |||
<% if (props.language === "typescript") { %> | |||
import { system, filesystem } from 'gluegun' |
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.
eslint was not happy with require
syntax and this is more natural in a typescript setup
"clean-build": "rm -rf ./build", | ||
"compile": "tsc -p .", | ||
"copy-templates": "if [ -e ./src/templates ]; then cp -a ./src/templates ./build/; fi", | ||
"build": "yarn format && yarn lint && yarn clean-build && yarn compile && yarn copy-templates", | ||
"copy-templates": "copyfiles ./src/templates/* ./build/templates", |
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.
Do the exact same but in a cross-platform version (I'm working on windows π)
@jamonholmgren Can you help me on this failing CI? Not really sure why this is taking so much time⦠|
@fabien0102 I apparently missed this PR, apologies. I'll be looking at it soon! |
Can you push a new empty commit to this to restart the CI and see if it passes? |
I can, but will be tomorrow, no computer around ;) (but I think I already tried... But with a bit of luck π€) |
@jamonholmgren The CI is still failing⦠|
This has taken me way too long to get to, @fabien0102, but it looks amazing. I'll be publishing a new version this week. |
# [5.0.0](v4.7.1...v5.0.0) (2022-01-21) ### Bug Fixes * **deps:** Pin colors to 1.3.3 ([#745](#745) by [@otaviopace](https://github.com/otaviopace)) ([c33f24f](c33f24f)), closes [#744](#744) * **deps:** Updates cli-table, cosmiconfig, ejs, execa, and fs-jetpack ([#741](#741) by [@jamonholmgren](https://github.com/jamonholmgren)) ([ee9d84a](ee9d84a)) ### Features * **boilerplate:** New CLI template includes eslint and better Windows support ([#734](#734) by [@fabien0102](https://github.com/fabien0102)) ([627bcb8](627bcb8)) ### BREAKING CHANGES * **deps:** Updates cli-table, cosmiconfig, ejs, execa, and fs-jetpack major (breaking) versions * Also updates other dependencies to minor or patch versions
π This PR is included in version 5.0.0 π The release is available on: Your semantic-release bot π¦π |
fixes #737
Hello,
First of all, very nice project, this looks really amazing and I can't wait to try this framework on my projects π
This said, the
new
template looks a bit out-of-date, so this is my little contribution to this projectWhat's inside?
copyfiles
to be able to build the project on a windows machinehusky
&pretty-quick
to format on pre-commitimport
instead ofrequire
on typescript project (so eslint is happy)How to test
gluegun new
and runyarn test
gluegun new
and runyarn test
/yarn build