https://github.com/yext/closure_playground
Simple closure template playground.
https://github.com/yext/closure_playground
Last synced: 9 months ago
JSON representation
Simple closure template playground.
- Host: GitHub
- URL: https://github.com/yext/closure_playground
- Owner: yext
- License: apache-2.0
- Created: 2015-05-19T19:13:21.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T15:45:13.000Z (almost 3 years ago)
- Last Synced: 2024-12-30T03:28:00.934Z (over 1 year ago)
- Language: JavaScript
- Size: 12.3 MB
- Stars: 0
- Watchers: 36
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Closure Template Builder
This project is meant to be used for writing simple closure templates, compiling them, and viewing them on your local machine.
## Requirements
* Java - JDK and JRE
* Python
## Quickstart
1. Open two terminals to the root directory of the repository
1. In one of the terminals, run `./compile.sh sample`
1. In the other terminal, run `./serve.sh sample`
## Create a New Project
1. Run `./create.sh [PROJECT_NAME]` using a project name with alphanumeric characters and underscores **only**
1. Open two terminals to the root directory of the repository
1. In one of the terminals, run `./compile.sh [PROJECT_NAME]`
1. In the other terminal, run `./serve.sh [PROJECT_NAME]`
## Structure
| Path | Notes |
|------|-------|
| bin/ | Binaries and dependencies for compiling closure to JS functions, and web page JS dependencies |
| templates/ | The root directory for the template projects are stored. |
| templates/[PROJECT_NAME] | A project directory. This contains .soy files and a data.json file. |
| out/ | The location where the compiled JS and HTML file are output. Not tracked by Git. |
| create.sh | The script file that creates a new template project. |
| compile.sh | The script file to run that monitors a particular project and recompiles when changes are made. |
| serve.sh | The script file to run to start a web server in the root directory. It also will attempt to open a browser to the URL for the compiled HTML file. |