Coder Social home page Coder Social logo

stapetro / stapetro.github.io Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 21.35 MB

stapetro Blog

Home Page: https://stapetro.github.io

License: MIT License

Ruby 0.02% PowerShell 0.07% Shell 0.11% HTML 45.08% XSLT 0.41% CSS 1.73% JavaScript 22.11% SCSS 30.46%
blog website jekyll-site javascript-es6 javascript-tests webpack4 sass

stapetro.github.io's Introduction

Welcome to stapetro's blog

Table of Contents

Instructions apply only for Linux/POSIX based OS. I use Ubuntu 18.04.4 LTS (bionic).

Tools

Node version manager

Install nvm (v0.35.2).

Install node and npm

nvm install 12.14.1 --lts=erbium --latest-npm
nvm --version
# 0.35.2
node --version
# v12.14.1
npm --version
# 6.14.5

npx comes with latest npm versions by default.

Docker

Follow official Docker installation guide.

Build

Install dependencies

(cd src && npm install)

Modernizr JS lib

Use modernizr CLI to build a minified JS version.

(cd src && \
npx modernizr -c modernizr-config.json -d ../assets/js/modernizr.min.js)

Build all

Runs static code analysis, tests and webpack bundling of JS files and CSS / SASS styles.

(cd src && npm run lint && npm test && npm run bundle && echo 'Successful build')
# or with test coverage included
(cd src && npm run lint && npm run test:coverage && npm run bundle && echo 'Successful build')

Run a specific test suite

$ cd src
$ npx jest --verbose --runTestsByPath ./main/headerLink.test.js

Generate jekyll site

Bash

$ cd <project_root_dir>
# generate only
$ src/scripts/docker_jekyll.sh build
# generate and serve jekyll site
$ src/scripts/docker_jekyll.sh serve

Powershell

PS> cd <project_root_dir>
# generate only
PS> .\src\scripts\docker_jekyll.ps1 "Build"
# generate and serve jekyll site
PS> .\src\scripts\docker_jekyll.ps1 "Serve"

Generate favicon

Favicons are generated from code monkey image by free favicon generator website.

Performance

Bundle analyzer

I use webpack bundle analyzer.

Remove unused JS modules

Import explicitly foundation modules.

Remove unused CSS styles

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.