Installation • Code samples • Portfolio site
To install all dependencies:
- Open a Terminal; navigate to the project root.
- In the Terminal, type
npm run init
.
If you would prefer to install dependencies manually, the init
script does the following:
composer install
npm install
cp env.example .env
npm run build-linter-eslint
npm run build-linter-markdown
npm run build-linter-prettier
npm run build-linter-phpcsfixer
npm run build-linter-stylelint
Once dependencies have been installed:
- Create a named development server using Laravel Valet or similar.
- Open file
.env
. - Update the variable
APP_URL
with the named server that you created in step one. - Update the variable
APP_KEY
by one of the following: - If
artisan
is installed:php artisan key:generate
- Generate a key here; add to
APP_KEY
.
For those unfamiliar with the file structure of Laravel, here are a few sections where specific code samples can be found.
A system for building similar linter configuartion files but with the added flexibility to change rules from project-to-project.
The file that finds, compiles, and minifies the linter configurations can be found here: resources/config/helpers/buildLinterConfig.js
and the individual configuartion files for each linter (ESLint, Markdownlint, Prettier, PHP-CS-Fixer, and Stylelint) can be found here: resources/config/linters
.
I use a customized version of TailwindCSS that is focused on integrating styles from a Design System—dubbed Oscillator—created and managed in Figma.
The main configuration file (tailwind.config.js
) can be found at the project root and contains all of the paths to the configuration files. Because I appreciate you stopping by, here is a breakdown of the configuration files:
resources/styles/oscillator/tailwindcss
- the folder containing all theme configuration files for TailwindCSS.resources/styles/oscillator/tailwindcss/colors.js
- Project colors and a custom color palette generator.resources/styles/oscillator/tailwindcss/screens.js
- Responsive breakpoints.resources/styles/oscillator/tailwindcss/spacing.js
- Box model values. The functiongenerateRemSpacing
creates values from 0–20 and then multiples of three from 21–300 (e.g. 21, 24, 27, et al). Once active (in a future version), these values will replace the default spacing values provided by TailwindCSS by making the classes 1:1 with the pixel value. The class.mb-6
will equal0.375rem/6px
rather than1.5rem/24px
.resources/styles/oscillator/tailwindcss/typography.js
- Font families, sizes, and weights.
resources/scripts/nks.js
resources/scripts/oscillator
resources/scripts/utilities
-
resources/styles/nks.css
-
resources/styles/oscillator/**
resources/views
.