Skip to content

Commit a0c9b78

Browse files
domoritzkanitw
authored andcommitted
Use images that we have already compiled on the website
1 parent 300715e commit a0c9b78

File tree

10 files changed

+13
-29
lines changed

10 files changed

+13
-29
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ before_install:
1212

1313
script:
1414
- npm run build
15-
- npm run build:examples-only
1615
- npm run test:nocompile # already run schema and tsc in build
16+
- npm run data
17+
- npm run build:examples-only
1718
- npm run check:schema
1819
- npm run check:examples
1920
- npm run codecov

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ description: Vega-Lite - a high-level grammar for statistical graphics.
1515

1616
baseurl: "/vega-lite" # the subpath of your site, e.g. /blog/
1717
url: "http://vega.github.io" # the base hostname & protocol for your site
18-
exclude: [bin, coverage, examples/_original, examples/_output, examples/_diff, Gemfile, Gemfile.lock,
19-
lib/schema.json, node_modules, scripts, test, test-gallery, typings, package.json, bower.json, src, tsconfig.json, tslint.json,
20-
nodemon.json, CONTRIBUTING.md, README.md, LICENSE]
18+
exclude: [bin, coverage, Gemfile, Gemfile.lock, lib/schema.json, node_modules,
19+
scripts, test, test-gallery, typings, package.json, bower.json, src, tsconfig.json,
20+
tslint.json, nodemon.json, yarn.lock, CONTRIBUTING.md, README.md, LICENSE]
2121

2222
markdown: kramdown
2323
highlighter: rouge

_data/versions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
vega: 3.0.0-rc2
1+
vega: 3.0.0-rc4
22
vega-lite: 2.0.0-beta.10
33
vega-embed: 3.0.0-beta.19
4-
vega-tooltip: 0.4.2
4+
vega-tooltip: 3.0.0-beta.19
55

_includes/preview

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<a class="imagegroup" href="https://vega.github.io/editor/#/examples/vega-lite/{{ include.spec }}">
2-
<span class="image" alt="{{ include.title | strip }}" style="background-image: url({{site.baseurl}}/build/examples/images/{{ include.spec }}.vl.svg);"></span>
2+
<span class="image" alt="{{ include.title | strip }}" style="background-image: url({{site.baseurl}}/examples/compiled/{{ include.spec }}.svg);"></span>
33
<span class="image-title">{{ include.title | strip }}</span>
44
</a>

_includes/showcase.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="examples">
33
{% for image in page.images %}
44
<a class="preview" href="https://vega.github.io/editor/#/examples/vega-lite/{{image.spec}}"
5-
style="background-image: url('build/examples/images/{{image.spec}}.vl.svg')">
5+
style="background-image: url('{{site.baseurl}}/examples/compiled/{{image.spec}}.svg')">
66
</a>
77
{% endfor %}
88
</div>

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,12 @@
2222
"scripts": {
2323
"pretsc": "mkdir -p build && rm -rf build/*/** && cp package.json build/",
2424
"tsc": "tsc",
25-
"prebuild": "mkdir -p build/site build/examples/images build/test-gallery",
25+
"prebuild": "mkdir -p build/site build/test-gallery",
2626
"build": "npm run build:only",
2727
"build:only": "npm run tsc && cp package.json build && browserify src/index.ts -p tsify -d -s vl | exorcist build/vega-lite.js.map > build/vega-lite.js",
2828
"postbuild": "node node_modules/uglify-js/bin/uglifyjs build/vega-lite.js -cm --source-map content=build/vega-lite.js.map,filename=build/vega-lite.min.js.map -o build/vega-lite.min.js && npm run schema",
29-
"build:examples": "npm run build:only && npm run build:examples-only",
29+
"build:examples": "npm run data && npm run build:only && npm run build:examples-only",
3030
"build:examples-only": "TZ=America/Los_Angeles ./scripts/build-examples.sh && rm -rf examples/specs/normalized/* && scripts/build-normalized-examples",
31-
"build:images": "npm run data && scripts/generate-images.sh",
3231
"build:toc": "bundle exec jekyll build -q && scripts/generate-toc",
3332
"build:site": "browserify site/static/main.ts -p [tsify -p site] -d | exorcist build/site/main.js.map > build/site/main.js",
3433
"build:versions": "scripts/update-version.sh",

scripts/build-examples.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ mkdir $dir
1111
if type parallel >/dev/null 2>&1
1212
then
1313
echo "Using parallel to generate vega specs from examples in parallel."
14-
ls examples/specs/*.vl.json | parallel --no-notice --plus --halt 1 "bin/vl2vg -p {} > examples/compiled/{/..}.vg.json && node_modules/vega/bin/vg2svg examples/compiled/{/..}.vg.json examples/compiled/{/..}.svg -b node_modules/vega-datasets/"
14+
ls examples/specs/*.vl.json | parallel --no-notice --plus --halt 1 "bin/vl2vg -p {} > examples/compiled/{/..}.vg.json && node_modules/vega/bin/vg2svg examples/compiled/{/..}.vg.json examples/compiled/{/..}.svg -b ."
1515
else
1616
echo "Parallel not found! Sequentially generate vega specs from examples."
1717
for file in examples/specs/*.vl.json; do
1818
filename=$(basename "$file")
1919
name="${filename%.vl.json}"
2020
bin/vl2vg -p $file > $dir/$name.vg.json
21-
node_modules/vega/bin/vg2svg $dir/$name.vg.json $dir/$name.svg -b node_modules/vega-datasets/
21+
node_modules/vega/bin/vg2svg $dir/$name.vg.json $dir/$name.svg -b .
2222
done
2323
fi

scripts/deploy-gh.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ git merge master --no-edit
1111

1212
# build
1313
npm run presite
14-
npm run build:images
15-
npm run schema
1614
git add data/* -f
1715
git add build/** -f
1816
git add _data/* -f

scripts/generate-images.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

scripts/update-data.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)