- Do you use a CLI, such as Vue CLI, create-react-app?
- Do you use
document.querySelectorAll
or related methods? - Do you use a CSS framework, such as Bootstrap, Bulma, Foundation, Tailwind, or some others?
- What JavaScript framework will you use if you need one?
Related would be if multiple pages, what will you use?
- A JavaScript framework?
- A template engine (especially on server-side)?
- A Static Site Generator?
- Some server side scripting for templating engine, such as PHP, rather than API calls?
- None at all?
Also, I have qualms about GatsbyJS <Link/>.
Top comments (4)
For something quick I usually start building something on an online editor, that way I start from a template in a pre-configured environment that comes with git history, shareability, and cloud storage:
Unless it's a project where I'm specifically trying something out in a framework or I think it might grow enough to benefit from a framework's organization, I'll use vanilla JS with the built in features like
document.querySelectorAll
,element.classList.add
,element.addEventListener
etc.Example: A one-off project I built recently on Glitch using vanilla JS and CSS.
Really quick, static? HTML and SCSS, maybe some vanilla JS. And gulp, to automate it. Really, easy to build, run and distribute.
If this has to be bigger, then you have to consider either a monolith (with backend and frontend served from one app) or service approach (with backend served by one or more apps and frontend from another).
But, the easiest way would be to use WordPress, I guess.
For one page it’s just index.html and plain css and js as needed. For multi-page static I use 11ty.dev . Still plain css and js. I try not to add a build process (along with the dozens of dependencies) until absolutely needed.
I’m not often in the realm of sites more complex than that but if I had to pick I’d go with next.js since you can do both static and dynamic pages based on route. It’s react based which means lots of components available etc.. 🤷🏽♂️
Actually im using plain HTML, CSS + PostCSS and Vanilla JS for onepagers.
For other Websites with a bit more pages i`m using gatsby.js with CSS modules and PostCSS