buildit-website

static website using npm scripts (cli) as a build tool, jade/pug, semantic-ui sass, docker container

Buildit website

Static website using npm scripts (cli version) to build assets.
pug/jade, semantic-ui are used as front-end.
A docker container will be provided for local development.

Pre-requisites

assets dir contains your source code.
assets/scripts/main.js is the entrypoint

Static files will be served from dist dir.

  • nvm/ruby installed on your OS.
  • install npm dependencies.
  • npm run ruby:config to install the gem bundler.
  • install gems from your Gemfile for scss (sass) with the bundler, npm run install:gems - gem dependencies will be available in your Gemfile.lock when deploying.
  • expose a token.js file at the root with a google key containing your google-map api key.

Install and using the project locally (without Docker)

Development: npm run dev, opens on port :9090 and live-reload on port 9091.
Build: npm run build.

Docker


jonlazarini/buildit-website docker image is available on Dockerhub.

running the container

exposes port :3030 from container to the client which maps http-server (:9090) for live reload
docker run -p 3030:9090 -itd jonlazarini/buildit-website npm run serve

spinning up a container

docker run -i -t <container ID | NAME> /bin/bash

Improvements

  • Refactor npm scripts to make them more readable
  • Refactor scripts for CI/CD: prepush linting, code-coverage/test when deploying
  • CI/CD integration
  • Tasks for deploying
  • Optimisations (images, builds)

Other

npm run sass-convert can be used if you wish to convert scss files from scss to sass.


**
Build process inspired by [how to use NPM as a build tool][post] from Keith Cirkel.
**

Related Repositories

build-it-website

build-it-website

buildit website ...

buildit-website

buildit-website

static website using npm scripts (cli) as a build tool, jade/pug, semantic-ui sass, docker container ...