2025-07-24 10:41:30 -04:00
> [!WARNING]
> This repository is no longer maintained. We recommend checking out our [Astro](https://github.com/locomotivemtl/astro-boilerplate) or [Craft](https://github.com/locomotivemtl/craft-boilerplate) boilerplates instead.
2019-03-24 17:15:47 -04:00
<p align="center">
<a href="https://github.com/locomotivemtl/locomotive-boilerplate">
<img src="https://user-images.githubusercontent.com/4596862/54868065-c2aea200-4d5e-11e9-9ce3-e0013c15f48c.png" height="140">
</a>
</p>
<h1 align="center">Locomotive Boilerplate</h1>
2022-03-23 17:49:10 -04:00
<p align="center">Front-end boilerplate for projects by <a href="https://locomotive.ca/">Locomotive</a>.</p>
2015-02-15 15:44:11 -05:00
2022-03-23 17:49:10 -04:00
## Features
2021-03-04 12:24:35 -05:00
2022-03-24 13:57:28 -04:00
* Uses a custom [task runner ](docs/development.md ) for handling assets.
* Uses [BrowserSync] for fast development and testing in browsers.
* Uses [Sass] for a feature rich superset of CSS.
* Uses [ESBuild] for extremely fast processing of JS/ES modules.
2022-03-23 17:49:10 -04:00
* Uses [SVG Mixer] for processing SVG files and generating spritesheets.
* Uses [ITCSS] for a sane and scalable CSS architecture.
* Uses [Locomotive Scroll] for smooth scrolling with parallax effects.
2022-04-11 15:18:11 -04:00
* Uses a custom [grid system ](docs/grid.md ) for layout creation.
2021-03-05 09:23:22 -05:00
2022-03-23 17:49:10 -04:00
Learn more about [languages and technologies ](docs/technologies.md ).
2021-03-04 12:24:35 -05:00
2022-03-23 17:49:10 -04:00
## Getting started
2021-03-04 12:24:35 -05:00
2022-03-23 17:49:10 -04:00
Make sure you have the following installed:
2021-09-18 01:11:54 -04:00
2024-07-04 13:12:54 -04:00
* [Node] — at least 20, the latest LTS is recommended.
* [NPM] — at least 10, the latest LTS is recommended.
2015-03-05 14:57:47 -05:00
2022-03-23 17:49:10 -04:00
> 💡 You can use [NVM] to install and use different versions of Node via the command-line.
2021-09-18 01:11:54 -04:00
2018-09-05 14:39:19 -04:00
```sh
2022-03-23 17:49:10 -04:00
# Clone the repository.
git clone https://github.com/locomotivemtl/locomotive-boilerplate.git my-new-project
# Enter the newly-cloned directory.
cd my-new-project
2018-09-05 14:39:19 -04:00
```
2015-04-20 09:53:11 -04:00
2022-03-23 17:49:10 -04:00
Then replace the original remote repository with your project's repository.
2021-09-18 01:11:54 -04:00
2022-03-23 17:49:10 -04:00
Then update the following files to suit your project:
2021-09-18 01:14:34 -04:00
2022-03-23 17:49:10 -04:00
* [`README.md` ](README.md ):
The file you are currently reading.
* [`package.json` ](package.json ):
2021-09-18 01:14:34 -04:00
* Package name: `@locomotivemtl/boilerplate`
* Package title: `Locomotive Boilerplate`
2022-03-23 17:49:10 -04:00
* [`package-lock.json` ](package-lock.json ):
2021-09-18 01:14:34 -04:00
* Package name: `@locomotivemtl/boilerplate`
2022-03-23 17:49:10 -04:00
* [`loconfig.json` ](loconfig.json ):
* BrowserSync proxy URL: `locomotive-boilerplate.test`
Remove `paths.url` to use BrowserSync's built-in server which uses `paths.dest` .
2021-09-18 01:14:34 -04:00
* View path: `./views/boilerplate/template`
2022-03-23 17:49:10 -04:00
* [`environment.js` ](assets/scripts/utils/environment.js ):
2021-09-18 01:14:34 -04:00
* Application name: `Boilerplate`
2022-03-23 17:49:10 -04:00
* [`site.webmanifest` ](www/site.webmanifest ):
2021-09-18 01:14:34 -04:00
* Manifest name: `Locomotive Boilerplate`
* Manifest short name: `Boilerplate`
* HTML files:
* Page title: `Locomotive Boilerplate`
2015-02-15 15:44:11 -05:00
2022-03-23 17:49:10 -04:00
## Installation
2015-12-07 10:35:27 -05:00
2019-03-31 16:39:37 -04:00
```sh
2022-03-24 13:57:28 -04:00
# Switch to recommended Node version from .nvmrc
nvm use
2022-03-23 17:49:10 -04:00
# Install dependencies from package.json
npm install
2019-03-31 16:39:37 -04:00
```
2018-10-18 09:45:39 -04:00
2022-03-23 17:49:10 -04:00
## Development
2019-03-31 16:39:37 -04:00
2022-03-23 17:49:10 -04:00
```sh
2022-03-24 13:57:28 -04:00
# Start development server, watch for changes, and compile assets
2022-03-23 17:49:10 -04:00
npm start
2021-09-18 01:11:54 -04:00
2022-03-23 17:49:10 -04:00
# Compile and minify assets
npm run build
2019-03-31 16:39:37 -04:00
```
2018-10-18 09:45:39 -04:00
2022-03-23 17:49:10 -04:00
Learn more about [development and building ](docs/development.md ).
2021-09-18 01:11:54 -04:00
2022-03-23 17:49:10 -04:00
## Documentation
2018-10-18 09:45:39 -04:00
2022-03-23 17:49:10 -04:00
* [Development and building ](docs/development.md )
* [Languages and technologies ](docs/technologies.md )
2022-04-28 15:35:52 -04:00
* [Grid system ](docs/grid.md )
2018-10-18 09:45:39 -04:00
2022-03-24 13:57:28 -04:00
[BrowserSync]: https://npmjs.com/package/browser-sync
[ESBuild]: https://npmjs.com/package/esbuild
2022-03-23 17:49:10 -04:00
[ITCSS]: https://itcss.io/
2022-03-24 13:57:28 -04:00
[Locomotive Scroll]: https://npmjs.com/package/locomotive-scroll
[modularJS]: https://npmjs.com/package/modujs
[modularLoad]: https://npmjs.com/package/modularload
2022-03-23 17:49:10 -04:00
[Sass]: https://sass-lang.com/
2022-03-24 13:57:28 -04:00
[SVG Mixer]: https://npmjs.com/package/svg-mixer
2022-03-23 17:49:10 -04:00
[Node]: https://nodejs.org/
[NPM]: https://npmjs.com/
[NVM]: https://github.com/nvm-sh/nvm