Commercial Website for company Stass (LJB Konfektion AB).
Project uses Gulp to build and serve content from source files in /src.
These instructions will get you a copy of the project up and running on your local machine for development. See Deployment for notes on how to deploy the project on Github Pages.
npm install
-
npm start
Runs gulp script (defined in ./gulpfile.js)gulp watch
, using local gulp install; Builds and serves content atlocalhost:3000
. Watches for changes in /src -
npm run build
Runs gulp script (defined in ./gulpfile.js)gulp build
, using local gulp install; Builds and packages project for deployment in /dist
Website is currently deployed to Github Pages from gh-pages branch – through a worktree in the /dist folder.
To deploy:
git clone
(get the files)- navigate to project root
git worktree add dist gh-pages
(set up git worktree, and gh-pages upstream)- (make changes to src, commit to master, etc.)
gulp build
(build and package for production)- navigate to
/dist
(make sure the branch changes to gh-pages when in /dist) - git add, commit and push to
gh-pages
branch:git add .
git commit
git push origin gh-pages
- When commiting for production at gh-pages branch – in the commit message, it is preferred to reference the master commit (hash) from which the build is produced from, e.g.:
// put master's commit hash in variable $commithash
set commithash (git log '--format=format:%H' master -1)
// check the hash is correct
echo $commithash
// commit with hash in the message
git commit -m "Build output as of $commithash"
- Handling git worktree:
git worktree list
see present worktreesgit worktree prune
remove local worktreesgit worktree add -b new_branch_name dist
set up worktree with new branch into dist-folder
Designed and built by Robin Andersson.