Open zhezixi opened 6 years ago
Hi @zhezixi, this project looks awesome! 😻 The Sass and ignore files look good, the game works, and your package.json
is off to a great start.
Here are some recommendations for improvement:
stylelint
a dev dependencyIt looks like stylelint
was added as a regular dependency instead of as a dev dependency:
"dependencies": {
"stylelint": "^9.2.0"
}
The dependencies
section of package.json
is for tools your website uses while it is running. The devDependencies
section, however, is for tools you use before the website starts.
Would you mind moving the line "stylelint": "^9.2.0"
into the devDependencies
section and then remove the entire dependencies
section?
dev
and deploy
scriptsYour linter scripts look great! Would you mind calling them at the start of your dev
and deploy
scripts so that any code quality issues can be identified while you are developing the website?
Right now, your linters work, but they don't run before you start your live server or deploy your changes to Surge, so there's a possibility that code issues may not be identified.
After you’ve made your changes and pushed them to GitHub and your hosted site, give it a once-over to make sure it looks right, then comment back here and I’ll take another look.
Thanks! 🤘
dependency problem and linter issues fixed!
Hi @zhezixi, this is a good step forward. I have a couple of suggestions to get your project the rest of the way:
build
in your dev
and deploy
scriptsI see you added a build
script that lints and compiles. This is awesome! ✊ The script isn't called as part of your dev
script, though, and you're calling build:*
in your deploy
script, which is leaving out the lint:*
scripts.
Could you do these two things?
build
before dev:*
in your dev
scriptbuild:*
with build
in your deploy
scripthtmlhint
as a dev dependencyIf I run your HTML linter script, it isn't working because htmlhint
is not listed in your devDependencies
section. Would you mind adding this dependency so I can install and run the linter?
After you’ve made your changes and pushed them to GitHub and your hosted site, give it a once-over to make sure it looks right, then comment back here and I’ll take another look.
Thanks! 🎸
I fixed the missing part and the website works fine. btw the only problem I have now is I cannot run yarn on my local terminal now. It always says there is an unexpected token in the end. I check the code but did not notice where I did wrong. Can you have a look and give me some advice?
Hi @zhezixi, it looks like you have an extra ,
at the end of line 28. If you remove that, you should be able to run yarn
again.
Another way you can identify those typos is to install the linter-jsonlint
package in Atom. 😄
fixed!
Sweet, this turned out really nice! 🤘
I don't have any other recommendations for improvement. Good work! :shipit:
Introduce tools to an old web-based game
@KatieMFritz Can you take a look at this? It's hosted here and meets the following criteria:
dev
script inpackage.json
that auto-compiles Sass and refreshes the browser at the same timebuild
script inpackage.json
that lints HTML, Sass, and JavaScript files before compiling Sass files (you can use these linters: htmlhint for HTML, stylelint and stylelint-config-standard for Sass, standard for JavaScript)yarn build
)deploy
script inpackage.json
that builds the project and uploads it to Surge if there are no errorsnode_modules
and your compiled CSS do not exist in your repositorypackage.json
andyarn.lock
are not uploaded to Surge