Skip to content

Project Template to start using Closure Tools, such as closure-library, compiler, template, and stylesheet compiler

Notifications You must be signed in to change notification settings

zorio/closure_project_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT
Author: zorio <zoriorz@gmail.com>

This is a web project template that uses closure tools.


Prerequisites:

  - python (which works on closure tools)
  - java (which works on closure tools)
  - svn (need to get closure-library)
  - scons


Setup:

  1. You need to get closure tools first.
   - python setup.py

  2. This template contains sample files that uses closure tools. To build them, run scons.
   - scons

  3. See the html file in your browser.
   - (your browser) static/html/index_debug.html (for debug build)
   - (your browser) static/html/index_release.html (for release build)

  4. Change project name and namespace in SConstruct file for your project. 
   - project name: Name of your project. This is used for generated file names.
   - namespace: The name space of the root of dependencies in your project.


Directory Structure:

  - static:
    - javascript: Put your javascript files this directory or its sub directories.
    - soy: soy(closure-template) files are here(or sub directories).
    - stylesheet: CSS files here. These files are processed by Closure Stylesheets.
    - html: This directory is only for sample files. You don't need to use this.

  - _generated: Compiled javascript file is created here.
    - javascript: Generated javascript files.
    - stylesheet: Generated stylesheet files.


About Sample files:

  Sample is consists of the following 5 files.
    - static/javascript/index.js: This file uses soy and css and creates screen.
    - static/javascript/soy/index.soy: soy template file. Called from index.js.
    - static/stylesheet/index.gss: CSS source code.
    - static/html/index_debug.html: This file shows how to use the generated js & css files in debug mode.
    - static/html/index_release.html: This file show how to use them in release mode.


For detail about closure tools, see https://developers.google.com/closure/

About

Project Template to start using Closure Tools, such as closure-library, compiler, template, and stylesheet compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published