From 0da264bf5677fb6c116e1a9a29de3c401d237fc8 Mon Sep 17 00:00:00 2001 From: Yuan Gao Date: Thu, 22 Dec 2016 15:51:59 -0800 Subject: [PATCH] Add a script to copy example files to assets folder. Change the example path --- src/app/examples/example-data.ts | 2 +- tools/plunker-example.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100755 tools/plunker-example.sh diff --git a/src/app/examples/example-data.ts b/src/app/examples/example-data.ts index 2847fcf41..a1fc1c883 100644 --- a/src/app/examples/example-data.ts +++ b/src/app/examples/example-data.ts @@ -19,7 +19,7 @@ export class ExampleData { constructor(example: string) { if (example && EXAMPLE_COMPONENTS[example]) { - this.examplePath = `/app/examples/${example}/`; + this.examplePath = `/assets/plunker/examples/${example}/`; // TODO(tinayuangao): Do not hard-code extensions this.exampleFiles = ['html', 'ts', 'css'] .map((extension) => `${example}-example.${extension}`); diff --git a/tools/plunker-example.sh b/tools/plunker-example.sh new file mode 100755 index 000000000..8c67508ff --- /dev/null +++ b/tools/plunker-example.sh @@ -0,0 +1,2 @@ +#!/bin/bash +cp src/app/examples src/assets/plunker -r