A Website
HTML5, CSS3, Sass, NPM , and JavaScript
Technologies Used
Step 1
create folder for project and open text editor in projects folder
create
dist
folder in main directory
create
index.html
file indist
folder
in
index.html
file, using html emmet type!
followed by tab to create starter html template
add
link
tag in theindex.html
file in theheader
section abovetitle
create
scss
folder in main directory
create
main.scss
file in scss folder
Step 2
in the terminal,
cd
into project-folder and runnpm init
. This createspackage.json
file in the main directory.
in the terminal run
npm i node-sass
. This createsnode_modules
folder in the main directory
Step 3
now inside the
package.json
file in thescript
section, changetest
intoscss
In above code, on line 7
node-sass
is to run node-sass program.-w scss/
to watch Scss folder.-o dist/css/
-o sets an output of the compiled sass eto dist/css.--recursive
for the_partials
loading with auto reload vscode.
to run an
NPM script
typenpm run <script-name>
in the terminal. In above example we called theNPM script
sass
to run an
NPM script
typenpm run <script-name>
in the terminal. In above example we called theNPM script
sass
create
.gitignore
file in main directory and addnode_modules
insidegitignore
file
Last updated