6.0.2 • Published 2 years ago

imarc-boilerplate v6.0.2

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
2 years ago

Imarc Boilerplate · Netlify Status

This is a front-end development framework that includes a curated set of conventions and libraries, including

  • Sass and Vue components, built using
  • Atomic Design and ABEM conventions, powered by
  • Vite for fast builds and hot reloading, and
  • starter documentation and a pattern library powered by Fractal and Twig.

This is an work in progress branch that replaces Webpack/Mix with Vite. Please give us feedback!

Framework, not a Library

Unlike traditional libraries, the code included within Boilerplate is scaffolded into your project so you can adapt it to do your needs. It adds a fractal.config.js, vite.config.js, as well as everything in the resources/ folder to your project. Learn more about Boilerplate's structure.

Goals

See GOALS.

Contributing

See CONTRIBUTING.

Getting Started

On a new or existing project

First, make sure you have a package.json file. If you don't have one, you an create one by running

npm init -y

Once you have a package.json file, you can install Boilerplate:

npm install imarc-boilerplate@next
npx imarc-boilerplate

The npx command automatically copies fractal.config.js, vite.config.js, and the resources/ folder out of node_modules/ into your project for your use. It also updates the npm scripts section within your package.json.

Using the Build (Vite)

After Boilerplate is installed, you can build your front-end files by running the following:

  • npm run lint uses eslint to lint your code.
  • npm run dev runs Vite's development server and fractal.
  • npm run prod will run the production build which is optimized for deployment in production.
  • npm run preview runs a Vite development server but serves the files build by npm run prod so you can test the production build locally.

Using the Pattern Library (Fractal)

Boilerplate includes Fractal, a pattern library. Within Fractal you can see all the components available within your project. You can see an example here.

Fractal's development server is automatically started whenever you're running Vite's development server, and is served by default when you run npm run dev. Both Vite's hot reloading of compiled code as well as Fractal's automatic detection of new components work together.

You can still run npm run fractal build to build a static version of the pattern library, however it requires that you have already run npm run prod to compile your CSS/JS first.

You can customize this behavior further by editing either the vite.config.js or fractal.config.js files per the Vite or Fractal documentation respectively.

It's no longer needed to run npm run watch and npm run fractal start in different terminals at the same time. Enjoy!

Using with Craft or Laravel

To use with Craft, try the Vite plugin by nystudio107.

To use with Laravel, try out Laravel Vite.

What's New From Boilerplate 5

  • Vite
  • Explicit imports (no globbing)
  • Directory structure changes
  • Less mixins
  • Modular Sass: @use, @forwards, _index.scss
  • Grid
  • CSS custom properties
  • Vue 3
  • Cypress (Vitest)
6.0.1

2 years ago

6.0.2

2 years ago

6.0.0-alpha.3

2 years ago

6.0.0-alpha.4

2 years ago

5.3.1

2 years ago

6.0.0-beta.1

2 years ago

6.0.0-alpha.1

2 years ago

6.0.0-alpha.2

2 years ago

5.3.0

2 years ago

5.2.1

2 years ago

5.2.0

2 years ago

5.1.3

2 years ago

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.11

2 years ago

5.0.12

2 years ago

5.0.10

3 years ago

5.0.6

3 years ago

5.0.5

3 years ago

5.0.4

3 years ago

5.0.3

3 years ago

5.0.2

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

5.0.0-beta.7

3 years ago

5.0.9

3 years ago

5.0.8

3 years ago

5.0.7

3 years ago

5.0.0-beta.6

3 years ago

5.0.0-beta.4

3 years ago

5.0.0-beta.5

3 years ago

5.0.0-beta.3

3 years ago

4.1.4

3 years ago

4.1.3

3 years ago

4.1.5

3 years ago

4.1.2

3 years ago

4.0.3

3 years ago

5.0.0-beta.2

3 years ago

4.0.2

3 years ago

4.1.0

4 years ago

3.3.0

5 years ago

3.2.4

5 years ago

3.1.3

6 years ago

3.1.4

6 years ago

4.0.0

6 years ago

3.1.2

7 years ago