Plovr demo

This commit is contained in:
Petr Pridal
2012-06-19 09:19:59 +02:00
parent 613b90c7f3
commit 7109bd3868
5 changed files with 98 additions and 0 deletions

4
Makefile Normal file
View File

@@ -0,0 +1,4 @@
all:
java -jar plovr.jar serve main.json
build:
java -jar plovr.jar build main.json > index.js

10
main.html Executable file
View File

@@ -0,0 +1,10 @@
<html>
<head>
<title>Closure Library + Plovr</title>
<script src="http://localhost:9810/compile?id=main"></script>
</head>
<body>
<div id="output"></div>
<script>main()</script>
</body>
</html>

12
main.js Normal file
View File

@@ -0,0 +1,12 @@
goog.provide('ol');
goog.require('ol.Map');
goog.require('goog.dom');
ol.main = function() {
goog.dom.getElement('output').innerHTML = 'test';
}
window['main'] = ol.main;
// or goog.exportSymbol('main', hello.main);

36
main.json Normal file
View File

@@ -0,0 +1,36 @@
{
"id": "main",
"inputs": "main.js",
"paths": [
"."
],
"externs": [
"//google_maps_api_v3.js"
],
"define": {
// "goog.dom.ASSUME_STANDARDS_MODE": true,
"goog.DEBUG": true
},
"mode": "ADVANCED",
"level": "VERBOSE",
"checks": {
// "accessControls": "ERROR",
// "visibility": "ERROR"
"checkTypes": "ERROR",
"checkRegExp": "ERROR",
"checkVars": "ERROR",
"deprecated": "ERROR",
"fileoverviewTags": "ERROR",
"invalidCasts": "ERROR",
"missingProperties": "ERROR",
"nonStandardJsDocs": "ERROR",
"undefinedVars": "ERROR"
},
"jsdoc-html-output-path": "."
}

36
src/main.json Normal file
View File

@@ -0,0 +1,36 @@
{
"id": "main",
"inputs": "main.js",
"paths": [
"."
],
"externs": [
"//google_maps_api_v3.js"
],
"define": {
// "goog.dom.ASSUME_STANDARDS_MODE": true,
"goog.DEBUG": true
},
"mode": "ADVANCED",
"level": "VERBOSE",
"checks": {
// "accessControls": "ERROR",
// "visibility": "ERROR"
"checkTypes": "ERROR",
"checkRegExp": "ERROR",
"checkVars": "ERROR",
"deprecated": "ERROR",
"fileoverviewTags": "ERROR",
"invalidCasts": "ERROR",
"missingProperties": "ERROR",
"nonStandardJsDocs": "ERROR",
"undefinedVars": "ERROR"
},
"jsdoc-html-output-path": "."
}