Skip to content

Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod

Notifications You must be signed in to change notification settings

4GeeksAcademy/Random-Card-Generator-Catmagu

 
 

Repository files navigation

Hello World with Vanilla JS

Start coding a JS/HTML/CSS website in 30 seconds by opening this template in codespaces (coming soon) or gitpod.

Before you being

Install the packages by typing: npm install.

How do I run my website to see live changes?

Type on the command line $ npm run start and type localhost on the browser.

Where do I write my code?

It depends on the language, but you have ./src/js/app.js, ./src/style/index.css and ./isrc/index.html respectively, you can add new .html as you please, just make sure to include import it on the index.js.

Note: remember that the JS workflow starts inside window.onload.

Troubleshooting

I don't see my changes...

Everytime you change any file inside the ./src folder the website public URL will automatically refresh the changes (it's a process called hot deploy) Remember also to refresh cleaning the cache (command+shift+r on mac, control+shift+r on pc & linux)

How do I include more images on my project?

Add them inside the ./src/assets/img folder and import them from any of your JS files. E.g: import "../assets/img/rigo-baby.jpg";

How do I include more JS files?

Just add the files into the JS folder and import the file/variables into your index.js. E.g: import myVar from "./file2.js"

How do I publish the website?

This boilerplate is 100% compatible with the free github pages hosting. Publish your website by running:

$ npm run deploy

Very easy and in just one step! Push to your main branch and use the free hosting that comes with GitHub pages, the project is ready to be published. Remember to choose to run the Github Page from your master branch.

Thank you

This template was built as part of the 4Geeks Academy Coding Bootcamp by Alejandro Sanchez and many other contributors. Find out more about our Full Stack Developer Course, and Data Science Bootcamp.

You can find other templates and resources like this at the school github page.

About

Start a VanillaJS website using WebPack in just 30 seconds: HTML,CSS,Babel,SASS,Bootstrap,Prettier,Gitpod

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.0%
  • HTML 13.3%
  • CSS 0.7%