diff --git a/.gitignore b/.gitignore index ed5c657ad9..a0318c246e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ *.pyc /build/ -/examples/ /node_modules/ /dist/ /coverage/ diff --git a/build.py b/build.py index a2a1a7b0bd..a5b51a02bd 100755 --- a/build.py +++ b/build.py @@ -122,7 +122,7 @@ EXAMPLES_SRC_HTML = [path EXAMPLES_SRC_JS = [example.replace('.html', '.js') for example in EXAMPLES_SRC_HTML] -EXAMPLES_DEST_ALL = [path.replace('examples_src', 'examples') +EXAMPLES_DEST_ALL = [path.replace('examples_src', 'build/examples') for path in EXAMPLES_SRC_ALL] GLSL_SRC = [path @@ -255,7 +255,7 @@ def build_test_rendering_requires(t): virtual('examples', EXAMPLES_DEST_ALL) -@rule(r'\Aexamples/(?P.*)\Z') +@rule(r'\Abuild\/examples/(?P.*)\Z') def examples_dest(name, match): def action(t): t.run('node', 'tasks/build-examples.js') @@ -299,7 +299,7 @@ def examples_star_json(name, match): "src": [ "src/**/*.js", "build/ol.ext/*.js", - "examples/%(id)s.js" % match.groupdict()], + "build/examples/%(id)s.js" % match.groupdict()], "compile": { "js": [ "externs/olx.js", @@ -623,7 +623,7 @@ def build_check_whitespace_timestamp(t): virtual('apidoc', 'build/jsdoc-%(BRANCH)s-timestamp' % vars(variables)) -@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), 'host-resources', +@target('build/jsdoc-%(BRANCH)s-timestamp' % vars(variables), SRC, SHADER_SRC, ifind('config/jsdoc/api/template'), NPM_INSTALL) def jsdoc_BRANCH_timestamp(t): @@ -665,14 +665,7 @@ def split_example_file(example, dst_dir): target_require.close() -@target('host-resources', phony=True) -def host_resources(t): - resources_dir = 'build/hosted/%(BRANCH)s/resources' - t.rm_rf(resources_dir) - t.cp_r('resources', resources_dir) - - -@target('host-examples', 'build', 'host-resources', 'examples', phony=True) +@target('host-examples', 'build', 'examples', phony=True) def host_examples(t): examples_dir = 'build/hosted/%(BRANCH)s/examples' build_dir = 'build/hosted/%(BRANCH)s/build' @@ -680,7 +673,7 @@ def host_examples(t): closure_lib_path = output('node', '-e', 'process.stdout.write(require("closure-util").getLibraryPath())') t.rm_rf(examples_dir) - t.cp_r('examples', examples_dir) + t.cp_r('build/examples', examples_dir) for example in EXAMPLES_SRC_JS: split_example_file(example, examples_dir % vars(variables)) t.cp('bin/loader_hosted_examples.js', examples_dir + '/loader.js') diff --git a/config/examples-all.json b/config/examples-all.json index 29e51fb47e..3e75c54f08 100644 --- a/config/examples-all.json +++ b/config/examples-all.json @@ -3,7 +3,7 @@ "src": [ "src/**/*.js", "build/ol.ext/*.js", - "build/examples/all.js" + "build/compiled-examples/all.js" ], "compile": { "js": [ diff --git a/config/examples/example.html b/config/examples/example.html index 4eae12fb83..406338166c 100644 --- a/config/examples/example.html +++ b/config/examples/example.html @@ -4,14 +4,13 @@ + - - - + {{{ extraHead }}} {{{ css.tag }}} - - + + {{ title }} @@ -19,7 +18,7 @@ @@ -77,10 +76,10 @@ - - - - + + + + {{{ js.tag }}} diff --git a/resources/logo-70x70.png b/config/jsdoc/api/template/static/logo-70x70.png similarity index 100% rename from resources/logo-70x70.png rename to config/jsdoc/api/template/static/logo-70x70.png diff --git a/config/jsdoc/api/template/tmpl/layout.tmpl b/config/jsdoc/api/template/tmpl/layout.tmpl index 626499b0b5..4094774323 100644 --- a/config/jsdoc/api/template/tmpl/layout.tmpl +++ b/config/jsdoc/api/template/tmpl/layout.tmpl @@ -18,7 +18,7 @@