Skip to content

Commit

Permalink
Setting up an easy-to-use developer environment
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed Apr 25, 2018
1 parent fa2ca37 commit 0afbeed
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .editorConfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[**.js]
indent_style = space
indent_size = 2

[**.css]
indent_style = tab
indent_size = 2

[**.rb]
indent_style = space
indent_size = 2

[**.html]
indent_style = tab
indent_size = 2

[{Makefile,**.mk}]
# Use tabs for indentation (Makefiles require tabs)
indent_style = tab
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ruby:2.5-alpine

RUN apk add --update alpine-sdk

WORKDIR /tc39-website
EXPOSE 8000

CMD /bin/sh
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.PHONY: docker-image docker-container docker-build install build serve
docker-image:
docker build --tag tc39/website:latest .

docker-container:
docker create --tty --interactive \
--name tc39-website \
--volume ${PWD}:/tc39-website \
--publish 8000:8000 \
tc39/website

docker-build: docker-image docker-container

docker-clean:
docker stop tc39-website || echo "Container not running"
docker rm tc39-website || echo "Container does not exist"
docker rmi tc39/website

install: docker-build
docker start tc39-website
docker exec -ti tc39-website bundle install
docker stop tc39-website

build:
docker start tc39-website
docker exec -ti tc39-website jekyll build
docker stop tc39-website

serve:
docker start tc39-website
docker exec -ti tc39-website jekyll serve --host 0.0.0.0 --port 8000 -w --force_polling
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@

# tc39 web draft


This is a sketch of a potential website to address an information orientation need for the tc39, see [website](http://tc39.github.io/tc39-web-draft/).

To learn more please get in touch with yulia at mozilla.com

## Setting up your environment
Building the website requires [Docker](https://docs.docker.com/install/) This allows you to have a dev environment set up with Ruby and Bundler already installed, along with all the depenencies this project needs.

Once installed you should be able to get set up by running
`$ make install` - This will install all the Ruby dependencies plus the environment for you to run the site
`$ make build` - This runs Jekyll, and rebuilds the _site folder
`$ make serve` - If you're developing this is a better option, as it will run Jekyll and watch for changes, this option also sets up a dev server on `localhost:8000`

0 comments on commit 0afbeed

Please sign in to comment.