Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

build: fix fetch assets local script #198

Merged
merged 1 commit into from
Jun 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor",
"build-themes": "./tools/build-themes.sh",
"build-themes": "bash ./tools/build-themes.sh",
"prod-build": "npm run build-themes && ng build --aot --prod && npm run prerender && cp -r tmp/prerendered/* dist/",
"postinstall": "webdriver-manager update && tools/fetch-assets.sh",
"postinstall": "webdriver-manager update && bash ./tools/fetch-assets.sh",
"publish-prod": "npm run build-themes && ng build --aot --prod && firebase use material-angular-io && firebase deploy",
"publish-dev": "npm run build-themes && ng build --aot --prod && firebase use material2-docs-dev && firebase deploy"
},
Expand Down
9 changes: 7 additions & 2 deletions tools/fetch-assets-local.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash

# Go to project directory
cd $(dirname ${0})/..

# Base Source Path
if [ -d ~/material2 ] ; then
echo "- Using path ~/material2"
Expand All @@ -21,8 +24,10 @@ fi
# Base Target Path
baseTargetPath=./src/assets

# Path to all overview HTML files.
overviewHtmlFiles=$(find ${baseSrcPath}/dist/docs/markdown -path "*/*.html" ! -name 'README.*')

# Copy Packages
mkdir -p ./node_modules/@angular/material-examples
cp -r ${baseSrcPath}/dist/releases/material-examples ./node_modules/@angular/

# Copy Examples
Expand All @@ -37,4 +42,4 @@ cp ${baseSrcPath}/dist/docs/markdown/*.html ${baseTargetPath}/documents/guides

# Copy Overview
mkdir -p ./src/assets/documents/overview
cp ${baseSrcPath}/dist/docs/markdown/*/*.html ${baseTargetPath}/documents/overview
cp ${overviewHtmlFiles} ${baseTargetPath}/documents/overview