-
Notifications
You must be signed in to change notification settings - Fork 40
Setup process node, npm, gulp tasks, scss lint, bourbon, neat
linasmatakas edited this page Dec 2, 2015
·
1 revision
- https://nodejs.org/en/
- Download
- Install
- Check if node and npm are available in Command Prompt. Restart Command Prompt if it was open before/during installation.
1. Run
node –v
2. Runnpm –v
- Navigate(in Command Prompt) to your project folder where "package.json" is("starter-template" folder in "front-end-toolkit" repository’s case)
- Run
npm install
. Wait for installation to complete. "node-modules" folder should be created during installation. - Run
npm list --depth 0
to see if everything is installed.
- Use gulp
- Run
gulp --tasks
to see available tasks - Choose task and run
gulp <task-name>
, f.e.gulp watch-all
- Ability to add gulp tasks interface in case gulpfile.js is not in project root
- Gulp tasks interface
- You can run commands in terminal
- http://rubyinstaller.org/downloads/
- Download
- Start Installation
- Check "Add Ruby executables to your PATH"
- Install
- Go to Command Prompt, run
ruby -v
, rungem -v
- If
gem -v
fails, you might need to install rubygems - https://rubygems.org/pages/download - Run
gem install scss-lint
- Run
scss-lint -v
to check if it is installed
- Download plugin
- Set scss-lint executable location
- Choose config or use the one in project root
- Results:
All steps for Windows, jump to step 5 on other OS:
- http://rubyinstaller.org/downloads/ ruby devkit for windows
- Extract
- cd to directory
- Run
ruby dk.rb init
- Run
ruby dk.rb install
- Run
gem install windows-pr
- Run
gem install win32console
(needs ruby devkit) - Run
gem install rainbow
(needs win32console & windows-pr) (required for colorful output on Windows) - Run in console or WebStorm terminal
scss-lint scss/site
- Results:
linters:
Indentation:
width: 4
@import 'bourbon';
Should be set before @import 'bourbon';
in order to take effect
$em-base: 14px;
- This should be the same size as your body font-size
. Setting default is 16px
.
@import 'neat';
Should be set before @import 'neat';
in order to take effect
$border-box-sizing: false !default;
- to prevent html {box-sizing: border-box;} *, *::after, *::before {box-sizing: inherit;}
$gutter: 1em;
- http://thoughtbot.github.io/neat-docs/latest/#gutter
$max-width: em(1200px) !default;
- http://thoughtbot.github.io/neat-docs/latest/#max-width
Useful for debugging
$visual-grid: true !default;
- http://thoughtbot.github.io/neat-docs/latest/#visual-grid