npm i --save-dev style-loader css-loader
we have to use both of these loaders because the css-loader lets webpack parse the css and the style loader adds a<style>
tag to the head of the html file so the css can be added to it- Add the
style-loader
andcss-loader
to the webpack rules array (we dont need to import it into the file)
I started hosting this beginner's guide site with a github pages branch because I am using handlebar templates to build out the pages. That way I can have a clean build for the project. My goals for hosting the beginners guide were to have all of the built HTML files in the root of the project, and to have a clean build where I could clean out the static folder before building the static assets into it each time. This is how I set that up with a GitHub Pages branch:
- From the master branch create a gh-pages branch
git checkout -b gh-pages
- Push up the branch
git push -u origin gh-pages
- Run your build tasks. Mine is npm start. It runs a few npm scripts from the package.json, and compiles the static assets in a folder called dist
npm start
- Navigate to the static assets folder
- From the master branch create the tag
git tag -a tag_name -m 'message here'
- Push up the tag
git push origin tag_name
- Or push all tags
git push --tags
- In GitHub navigate to the releases tab, next to the branches tag
- Select the Tags button
- Click the group of three dots in the right corner
Check item of it is meets standards and/or content is still readable
- Check color contrast with Color Ratio & Colorable
I this is part of the first node web scraper I created with axios and cheerio. I took out all of the logic, since I only wanted to showcase how a basic setup for a nodejs web scraper would look.
const cheerio = require('cheerio'),
axios = require('axios'),
url = `<url goes here>`;
version: 2 | |
jobs: | |
build: | |
environment: | |
CC_TEST_REPORTER_ID: { CodeClimateId } | |
docker: | |
- image: circleci/node:7.10 | |
working_directory: ~/repo |
One thing I had trouble grasping at first were dotfiles, and I know that is pretty basic, but all the articles I read skipped the initial, what and went into customization details. So, I am documenting the basics of what dotfiles are, how to see them, access them, set them up etc.
Mac, Bash, Terminal.app, Git
One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).
- Make sure you are in the right place
-
That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.
fatal: refusing to merge unrelated histories
-
That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error
-
- An easy way to check where you are is the command: