Giter VIP home page Giter VIP logo

score-exercise's Introduction

BASE

All the files you edit go into src and compiles into build


Setup

NPM is required to be installed.

Run npm install after clone to download gulp and other required modules.


Tasks:

gulp - builds everything into build folder

gulp build - cleans and builds everything into build folder

gulp clean - cleans build folder

gulp css - compile scss to css

gulp js - compile js with browserify

gulp assemble - generate all pages

gulp watch - look for changes in src/pages|scss|js


Folder Structure

└── src
  ├── assets
  │    ├── js
  │    │   ├── libs
  │    │   ├── partials
  │    │   └── main.js
  │    └── scss
  │        ├── base
  │        ├── libs
  │        ├── partials
  │        ├── utils
  │        ├── main.scss
  ├── data
  │   └── *.{json,yml}
  ├── helpers
  │   └── *.js
  └── views
      ├── partials
      │   └── *.{hbs,html,php}
      ├── layouts
      │   └── default.{hbs,html,php}
      └── pages
          └── index.{hbs,html,php}

Pages

All the files in pages folder are used to generate static pages.

These files in pages should contain the core content of the page.

The layout files will contain the major layout and are referenced to by front matter(more on that below)

Pages can also load partials anywhere in the page

Front matter

Pages can use YAML front matter as shown below or call a variable from a data.json file in the data folder, for things like the layout.

---
layout: 'default'
title: 'site'
arr:
- {"a":"b"}
---

this.arr.[0] // {"a","b"}

Loading partial
{{>nav }}

with current front matter
{{>nav this}}

with custom variable
{{>nav key="value"}}

with global data variable
{{>nav site}}

with custom json
{{#parseJSON '{
  "a": "b",
  "c": "d"
}'}}
{{> nav }}
{{/parseJSON}}

{{#parseJSON '{"name": "John", "age": "1"}'}}
    {{> partial title="TITLE" desc=../site.desc person=this}}
{{/parseJSON}}


SCSS

All scss goes into "src/assets/scss/"

All scss goes into "src/assets/scss/libs"

The "_global.scss" file contains some utility classes


JS

Using Browserify for JS

All js goes into "src/assets/js/app" Refrence js in the main.js file located in "src/assets/js/"

All libraries goes into "src/assets/js/libs"

If you do any js templating put that into "src/assets/js/templates/"

score-exercise's People

Contributors

janicelam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.