Static Template

Version License: MIT Maintainer

This repo serves as a starter template for static web pages.Instead creating your own front-end architecture, use this for quick and easy development.

Table of Contents

πŸ“Œ Prerequisites

Before you begin, ensure you have met the following requirements:

  • If you're using Windows 10 please use this NVM.
Tool Version Description
NVM latest Node version manager for fast switching node version
Node 14.15.0 Install Node via NVM

⚠️ If you have Node in your local machine please delete and reinstall it using the NVM.

πŸš€ Installing Static Template

To install Static template in your local machine, run this following script in your terminal:

Windows:

 git clone https://github.com/hipe-japan-inc/static_template.git

⚠️ Optional : If you have Node in your local machine please delete and reinstall it using the NVM.

πŸ’» How to run scss

  1. go to src/ in terminal (recommended : bash).
  2. run npm install. If npm is missing please refer to the Prerequisites.
  3. verify if gulp is working. gulp --tasks
  4. after the dependencies installed, run gulp build or gulp rebuild then gulp sync

Note: gulp --tasks will display all posible gulp options. If dealing with .php instead of .html use gulp watch

Code Block:
cd src
npm install
gulp build # Or gulp rebuild
gulp sync #if html else use gulp watch

When you run this scripts it will generate a bundled file to public/ folder.

⚠️ You must only edit in src/ folder to avoid confusion.

πŸ“Ž Additional Info

Additional information about Static template

  • src/ is the main source code
  • public/ is the dist folder of compressed file from src/.
    • release/mini/**/*.css [ minified version of css ]
    • release/tiny/**/*.(png,jpg,etc.) [ minified version of images ]
    • release/ugly/**/*.js this refers a compressed javascript
  1. For maintaining the integrity of the images please put it under src/image/raw/**, This will generate a directory public/release/tiny/raw/**
  2. For generating the iconfont put the icon_name to src/icons and run gulp rebuild
  3. For generating vendor you can put it inside src/vendor and run gulp vendor to copy it in release folder. Expected result : public/vendor/gulp/**
  4. For release to production try running gulp purge to clean the release css and remove unused css.

⚠️ Errors

If you encounter this problem bash gulp command not found, Try running the command below to the terminal.

#Installing the gulp in global scope.
npm install --global gulp-cli 

πŸ’• Acknowledgements and References

πŸ“« Credits

🀝 Contribute

Contributions, issues and feature requests are welcome!


Copyright Β© 2020 HiPE Inc. ltd. All rights reserved