A viewer to display codeclub lessons.
First make sure you have node and yarn installed.
The easiest way is probably to first install
nvm or nvm-windows.
Then install the version of node specified by the file .nvmrc
by executing
nvm install
in the shell.
Install yarn (preferably without node) as instructed on the yarn website.
When node and yarn are installed, just type
git clone https://github.com/kodeklubben/codeclub-viewer.git
git clone https://github.com/kodeklubben/oppgaver.git
cd codeclub-viewer
yarn
yarn start
Then open http://localhost:8080
NOTE: If you recently changed versions of node, and you get error messages during yarn start
(or yarn build
),
try deleting the node_modules
folder and run yarn
again to re-install it.
If you want to use Redux DevTools, your best option is to download the Chrome Extension.
If you want to build and serve the website from static files (which is what is done during deploy), try
yarn build
yarn serve
for development mode or
yarn build:prod
yarn serve
for production mode.
To run all the tests, run
yarn testall
This will run the three commands yarn eslint
, yarn stylelint
and yarn test
, each of which can be run individually.
To publish the website to the beta repository,
first make sure you have a fork of it.
Then make a local clone of the beta
fork next to codeclub-viewer
and oppgaver
(using SSH URL).
For example, if your github username is gituser
and you have forked the beta
repo to this user,
and you have a terminal open and you are located in the codeclub-viewer
folder, type
cd ..
git clone [email protected]:gituser/beta.git
Now return to the codeclub-viewer
folder (cd codeclub-viewer
), type
./publish_beta.sh
and follow the instructions. If everything is ok, and you answer y
to all the questions, the newly compiled
website will be pushed to your beta
fork, and (if your username is gituser
) you can test the site at
gituser.github.io/beta
If you are satisfied and want to publish the new website to the official beta
repo, make a pull request from the gh-pages
branch
of your beta
fork to the gh-pages
branch of kodeklubben/beta
.