Project is updated to use create-react-app 2.0
which comes with lot of improvements but also a lot of changes. Please read the changelog.
Shortly:
webpack
updated to version 4Babel
jsx/js-compiler to 7- built in SASS-support so all styles imported from
node_modules
folder needs to be added within.scss
file - No need to import
Fragments
use native<>...</>
tags instead - Node version on
.nvmrc
is updated to10
so if build failes removenode_modules
and runnpm install
- Beta-version of the site has been published on beta.digit.fi
Install/ensure Node/NPM is installed (prefer NVM)
git clone [email protected]:YOUR-USERNAME/website2.0.git
cd website2.0
nvm use
npm install
npm start
Check docs folder:
Nothing :)
Frontend can be run without backend running but it's highly recommended setting it up. Source code can be found here: DigitKoodit/digit-backend
Build product using: npm run build
Creates dist
folder on project root which then can be ran individually.
Deploying / Publishing beta.digit.fi
The website is running on DigitalOcean droplet managed by Sami Nieminen. Contact for more information
TODO
TODO
Fork the project -> do changes -> make a pull request.
git clone [email protected]:YOUR-USERNAME/website2.0.git
cd website2.0
git remote add upstream [email protected]:DigitKoodit/website2.0.git
git fetch upstream
Creates local master
branch
git checkout -b blazing-feature
Create a new branch from the master
branch so you can always pull latest changes from upstream origin without interrupting your own feature development if new changes are available.
git pull upstream master
or
git pull --rebase upstream master
Please follow the steps on the previous block. If . Rebasing helps to keep the project history more readable and therefore more maintainable. Here's a good article about what it means and why to use it: Git Fork Workflow Using Rebase.
Example of how to create a new feature/fix
# After the step 2. is performed
git checkout -b blazing-feature
# Make changes and commit with meaningful message
git commit -m "Add new blazing feature"
git checkout master
# Update local master and rebase moves possible changes after the ones which are already on production
git pull --rebase upstream master
git checkout blazing-feature
git rebase master
# Check that everything works and then perform merge or rebase
git checkout master
git merge blazing-feature
# Check that your new feature works on master branch and make a pull request
Take away:
- Only update
feature
branch to keep project more maintainable for everyone - Keep master always up to date with
upstream master
- Keep commits small and on the topic
- Keep master always up to date with
upstream master
!! - Rebase
feature
to your master branch
"The code in this project is licensed under MIT license."