Last active
December 13, 2022 23:14
-
-
Save jhadev/3bba9f304fe3c8cd4879ab2c94c0f9f2 to your computer and use it in GitHub Desktop.
Scaffold an entire simple html, css, js project in one command
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
# put in .zshrc | |
# cd into the folder you want to put your project in | |
# scaffold [PROJECT NAME] | |
scaffold() { | |
mkdir $1 && cd $1 && touch index.html && mkdir assets && mkdir assets/js && mkdir assets/css && touch assets/js/script.js && touch assets/css/style.css && echo '<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<link rel="stylesheet" href="./assets/css/style.css"> | |
</head> | |
<body> | |
<h1>Hi!</h1> | |
<script src="./assets/js/script.js"></script> | |
</body> | |
</html>' > index.html | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment