-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setting up an easy-to-use developer environment
- Loading branch information
1 parent
fa2ca37
commit 0afbeed
Showing
4 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |