All Projects → bstaruk → starbase

bstaruk / starbase

Licence: MIT License
⭐ Production-ready website boilerplate made with webpack 5, modern JS (via Babel 7) & Sass

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
SCSS
7915 projects
shell
77523 projects

Projects that are alternatives of or similar to starbase

Static Site Boilerplate
A better workflow for building modern static websites.
Stars: ✭ 1,633 (+2232.86%)
Mutual labels:  stylelint, babel, eslint
webpack-typescript-react
Webpack 5 boilerplate with support of most common loaders and modules (see tags and description)
Stars: ✭ 185 (+164.29%)
Mutual labels:  eslint, boilerplate-template, webpack5
Barebones
A barebones boilerplate for getting started on a bespoke front end.
Stars: ✭ 127 (+81.43%)
Mutual labels:  stylelint, babel, eslint
Web Configs
Common configurations for building web apps at Shopify
Stars: ✭ 302 (+331.43%)
Mutual labels:  stylelint, babel, eslint
webpack-gulp-wordpress-starter-theme
A WordPress theme with Webpack & Gulp
Stars: ✭ 110 (+57.14%)
Mutual labels:  babel, eslint, webpack5
Express Webpack React Redux Typescript Boilerplate
🎉 A full-stack boilerplate that using express with webpack, react and typescirpt!
Stars: ✭ 156 (+122.86%)
Mutual labels:  stylelint, babel, eslint
Front End Guide
📚 Study guide and introduction to the modern front end stack.
Stars: ✭ 14,073 (+20004.29%)
Mutual labels:  stylelint, babel, eslint
electron-vue-boilerplate
Simple boilerplate for building Vue app with Electron and Webpack.
Stars: ✭ 53 (-24.29%)
Mutual labels:  stylelint, eslint
7-react-admin-ts
用 ts + react-hooks 实现的管理后台
Stars: ✭ 23 (-67.14%)
Mutual labels:  stylelint, eslint
dva-typescript-antd-starter-kit
A admin dashboard application demo based on antd by typescript and dva
Stars: ✭ 61 (-12.86%)
Mutual labels:  stylelint, eslint
ying-template
这是一个基于 `webpack@^5.27.2` + `typescript@^4.2.3` + `@babel/core@^7.2.2` + `jest@^26.6.3` + `eslint@^7.22.0` 的多页面脚手架。
Stars: ✭ 125 (+78.57%)
Mutual labels:  eslint, webpack5
xd-plugin-boilerplate
A boilerplate for plugins for Adobe XD CC including preconfigured linting, autocompletion and Webpack for bundling
Stars: ✭ 25 (-64.29%)
Mutual labels:  eslint, boilerplate-template
db-portfolio
My personal portfolio website.
Stars: ✭ 97 (+38.57%)
Mutual labels:  stylelint, eslint
ExpressSimpleBoilerPlate
Kerangka project Express JS dengan tambahan ES2015, ESLint, Webpack, Babel, beberapa middleware pengaman, Worker Threads, mock data generator, dan masih banyak lagi.
Stars: ✭ 22 (-68.57%)
Mutual labels:  eslint, boilerplate-template
awesome-vue-boilerplate
😍 Awesome Vue Boilerplate 🥳 Vue 🥰 Vuex, vuex-pathify 🤗 element-ui 🤲 tailwindcss
Stars: ✭ 60 (-14.29%)
Mutual labels:  eslint, boilerplate-template
react-js-boilerplate
A React + Redux + HOT + Webpack + Material-UI + Sass boilerplate
Stars: ✭ 14 (-80%)
Mutual labels:  stylelint, eslint
figma-plugin-typescript-boilerplate
Figma plugin TypeScript boilerplate to start developing right away
Stars: ✭ 43 (-38.57%)
Mutual labels:  stylelint, eslint
gulp-boilerplate
Gulp boilerplate
Stars: ✭ 24 (-65.71%)
Mutual labels:  stylelint, sass-boilerplate
react-typescript
A Front-End Project with Typescript/Antd. webpack5+react-router4+antd+typescript4+grahql
Stars: ✭ 63 (-10%)
Mutual labels:  eslint, webpack5
react-component-library-lerna
Build your own React component library managed with lerna, presented with storybook and published in private npm registry.
Stars: ✭ 55 (-21.43%)
Mutual labels:  stylelint, eslint

starbase

npm version dependencies status FOSSA Status

starbase is a production-ready website boilerplate built with webpack 5, Babel 7 & Sass that enables developers to get up and running in minutes using some of the most powerful front-end tools available in 2022:

The primary mission is to be small in scope so that it may be easily extended and customized, or used as a learning tool for developers who are trying to become familiar with webpack 5, Sass and/or modern JS.


Getting Started

After completing the steps below, you will be ready to begin using starbase:

  1. Install Node.js (latest LTS recommended)
  2. Clone starbase into your project root directory
  3. Install dependencies by running npm install in your project root directory

Local Development

starbase uses webpack-dev-server to serve up your project at http://localhost:8080 for streamlined and convenient development.

After running npm run start in the project root, your /src code will be served at the url above and watched for changes. As you modify code in /src, the project will be recompiled and your browser will refresh to show the latest changes.

cd /path/to/starbase
npm run start

Building for Production

Use npm run build in your project root to run a production build.

Production builds compile & minify your assets into /dist for distribution and/or integration into whatever codebase you'll be using these assets in.

cd /path/to/starbase
npm run build

Features & Configurations

JS & Sass Linting

starbase uses ESLint for Javascript (ES6) linting and stylelint for Sass linting to encourage consistent code throughout your project. The configs (/.eslintrc.js and /.stylelintrc respectively) include a solid foundation to build upon, utilizing the most popular industry-standardized plugins such as eslint-config-airbnb and stylelint-config-sass-guidelines.

Prettier Formatting

starbase uses Prettier to enforce and simplify code consistency. If you use VS Code, check out the Prettier VS Code extension. If you'd rather prettify your code via CLI, run npm run prettify at your project root.

Linting & Formatting Pre-Commit Hook

starbase uses Husky & lint-staged to run ESLint, stylelint & Prettier as pre-commit hooks, ensuring only clean code ends up in version control.

HTML Webpack Plugin

starbase uses HTML Webpack Plugin, which enables webpack to handle assets that are linked from within our HTML templates, such as images and embedded videos. It also makes sure our generated .js & .css files are included where they need to be.

Open the webpack configs if you need to add more pages -- and be sure to check out the plugin documentation to learn about the more advanced features such as .ejs and environment variable support.

Asset Hashing (Cache Busting)

The assets generated by starbase are hashed as a cache-busting mechanism. Hashes are generated via file contents so they will only change when the files themselves have changed.

This feature ships with webpack (and the loaders we use), so removing it is pretty straightforward. Open the webpack configs and remove the hashes from the filenames, which should look something like this: .[hash:8].

Removing hashing for production builds is not recommended.

Build-Time Cleanup

starbase is setup to clear all contents of /dist (where compiled assets are piped into) during each npm run build. If you'd like to remove this part of the build process, perform the following steps:

  1. remove CleanWebpackPlugin from the plugins array in /webpack/webpack.config.prod.js
  2. remove CleanWebpackPlugin as a requirement at the top of /webpack/webpack.config.prod.js
  3. remove the CleanWebpackPlugin dependency from /package.json

Removing the cleanup process means that deleted assets in /src will not be deleted in /dist until you manually do so. I recommend keeping the cleanup process intact unless you have a specific reason not to, such as having un-managed assets in /dist.


Notes & Considerations

Root Path

starbase is setup to run with assets referenced via relative paths so generated .html files can be opened without needing a deployment. If you plan on deploying to a web server, it'll be a good idea to set the publicPath in /webpack/webpack.config.base.js.

This variable should be set to / if the app will run at the root of a domain or subdomain, or to /folderName (example) if it'll be deployed to a subfolder.


License

starbase is open source and free software, so you may to do whatever you wish with it -- commercially or personally. You can buy me a beer next time you're in Boston, star the project and tell a friend, or you can erase all signs of origin and tell your coworkers that you made it yourself. It's all good!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].