GithubHelp home page GithubHelp logo

stencil-docker's Introduction

Introduction

Docker image for running the stencil command without requiring it to be installed. We have experienced a number of annoying issues installing the cli from time-to-time, as well as it have a huge number of deprecated node modules included. This method of use does not require you to run the npm install process or have any of the prerequisites installed (although it does require you to have Docker installed).

The image is available on Docker Hub as aligent/stencil.

This code simply wraps bigcommerce/stencil-cli in docker for convenience.

Installation

Ensure you have a .npm directory for caching dependancies (mkdir -p ~/.npm)

Add the following line to your ~/.bash_aliases (or .bash_profile, .bashrc, etc) file to be able to run it easily...

alias stencil='docker run --rm -p 3000:3000 -p 3002:3002 -it --volume ~/.npm:/home/node/.npm --volume $PWD:/app aligent/stencil stencil'

You will then need to reload your bashrc file, either by running . ~/.bashrc or starting a new terminal session.

If you want to specify a specific version of stencil, you can use the version number in the alias (Docker tags should match the version number of the cli), eg

alias stencil='docker run --rm -p 3000:3000 -p 3002:3002 -it --volume ~/.npm:/home/node/.npm --volume $PWD:/app aligent/stencil:3.8.5 stencil'

Usage

You can now run stencil normally.

To start using it with the cornerstone theme:

  1. Clone the theme git clone https://github.com/bigcommerce/cornerstone.git && cd cornerstone
  2. Install deps node-run npm install
  3. Init stencil stencil init

Development / Updates

We gladdly accept contributions, and if you have issues please log them to Github issues.

To test the building of the docker container locally, a simple script test-stencil.sh can be used. It will build the container and then output the stencil cli version. To update the stencil version, simply edit Dockerfile on the line where it installs stencil.

After a new tag is pushed to this repo it is automatically built in Docker Hub. Version tags should match the Stencil CLI version.

stencil-docker's People

Contributors

jswift avatar adamjhall avatar krishanthisera avatar hellboy1975 avatar

Stargazers

Jefferson Souza avatar  avatar Dat avatar Andrea S avatar  avatar  avatar Jan P avatar

Watchers

 avatar Ben Petering avatar  avatar Jonathan Day avatar James Cloos avatar Hubert Ott avatar Matthew O'Loughlin  avatar Kanchana Liyanagamage avatar Zhi avatar Belal Al Mazlom avatar Liam Fewings avatar Kusal Fernando avatar Jan P avatar Daniel van der Ploeg avatar  avatar  avatar Torbjorn van Heeswijck avatar Nick On avatar Jonathan Petrinolis avatar  avatar  avatar  avatar  avatar

stencil-docker's Issues

Invalid schema: keyword "id", use "$id" for schema ID

When running ajv on the stencil-cli config schema, it fails validation.

schema /home/node/.npm-global/lib/node_modules/@bigcommerce/stencil-cli/lib/schemas/privateThemeConfig.json is invalid
error: NOT SUPPORTED: keyword "id", use "$id" for schema ID

It appears stencil-cli is based on JSON Schema draft-04, ajv version 7 onwards does not support this old version.

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.