fix(): update package.json build process and add font files.

This commit is contained in:
Josh Thomas
2017-07-17 17:45:55 -05:00
parent 7fa9aefa5c
commit d825e6abbd
22 changed files with 125 additions and 5 deletions

View File

@ -4,7 +4,7 @@
"description": "Base components for Ionic", "description": "Base components for Ionic",
"main": "dist/collection/collection-manifest.json", "main": "dist/collection/collection-manifest.json",
"scripts": { "scripts": {
"build": "npm run copy.vendor && stencil build --prod", "build": "stencil build --prod",
"dev": "concurrently --raw \"stencil build --watch\" \"stencil-dev-server\"", "dev": "concurrently --raw \"stencil build --watch\" \"stencil-dev-server\"",
"copy.vendor": "mkdir -p ./dist/collection/vendor && cp -Rf ./src/vendor ./dist/collection", "copy.vendor": "mkdir -p ./dist/collection/vendor && cp -Rf ./src/vendor ./dist/collection",
"link.stencil": "npm link @stencil/core", "link.stencil": "npm link @stencil/core",

View File

@ -0,0 +1,50 @@
// Ionicons Icon Font CSS
// --------------------------
// Ionicons CSS for Ionic's <ion-icon> element
// ionicons-icons.scss has the icons and their unicode characters
$ionicons-font-path: $font-path !default;
@import "ionicons-icons";
@import "ionicons-variables";
@font-face {
font-family: "Ionicons";
src: url("#{$ionicons-font-path}/ionicons.woff2?v=#{$ionicons-version}") format("woff2"),
url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"),
url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype");
font-weight: normal;
font-style: normal;
}
ion-icon {
display: inline-block;
font-family: "Ionicons";
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 1;
text-rendering: auto;
text-transform: none;
speak: none;
@include rtl() {
&[aria-label^="arrow"]::before,
&[flip-rtl]::before {
transform: scaleX(-1);
}
&[unflip-rtl]::before {
transform: scaleX(1);
}
}
&::before {
display: inline-block;
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,34 @@
// Noto Sans Font
// Google
// Apache License, version 2.0
// http://www.apache.org/licenses/LICENSE-2.0.html
$noto-sans-font-path: $font-path !default;
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 300;
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 400;
src: local("Noto Sans"), local("Noto-Sans-Regular"), url("#{$noto-sans-font-path}/noto-sans-regular.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-regular.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 500;
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
}
@font-face {
font-family: "Noto Sans";
font-style: normal;
font-weight: 700;
src: local("Noto Sans Bold"), local("Noto-Sans-Bold"), url("#{$noto-sans-font-path}/noto-sans-bold.woff") format("woff"), url("#{$noto-sans-font-path}/noto-sans-bold.ttf") format("truetype");
}

Binary file not shown.

View File

@ -0,0 +1,34 @@
// Roboto Font
// Google
// Apache License, version 2.0
// http://www.apache.org/licenses/LICENSE-2.0.html
$roboto-font-path: $font-path !default;
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 300;
src: local("Roboto Light"), local("Roboto-Light"), url("#{$roboto-font-path}/roboto-light.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-light.woff") format("woff"), url("#{$roboto-font-path}/roboto-light.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 400;
src: local("Roboto"), local("Roboto-Regular"), url("#{$roboto-font-path}/roboto-regular.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-regular.woff") format("woff"), url("#{$roboto-font-path}/roboto-regular.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 500;
src: local("Roboto Medium"), local("Roboto-Medium"), url("#{$roboto-font-path}/roboto-medium.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-medium.woff") format("woff"), url("#{$roboto-font-path}/roboto-medium.ttf") format("truetype");
}
@font-face {
font-family: "Roboto";
font-style: normal;
font-weight: 700;
src: local("Roboto Bold"), local("Roboto-Bold"), url("#{$roboto-font-path}/roboto-bold.woff2") format("woff2"), url("#{$roboto-font-path}/roboto-bold.woff") format("woff"), url("#{$roboto-font-path}/roboto-bold.ttf") format("truetype");
}

View File

@ -1,6 +1,6 @@
import { Component, h, Prop, State, VNodeData } from '@stencil/core'; import { Component, h, Prop, State, VNodeData } from '@stencil/core';
export declare const publicPath: string; const publicPath = '';
@Component({ @Component({
@ -12,7 +12,8 @@ export declare const publicPath: string;
}, },
host: { host: {
theme: 'icon' theme: 'icon'
} },
assetsDir: './svg'
}) })
export class Icon { export class Icon {
mode: string; mode: string;
@ -217,4 +218,4 @@ interface GlobalIonIcon {
activeRequests: {[url: string]: boolean}; activeRequests: {[url: string]: boolean};
loadCallbacks: {[url: string]: {(loadedSvgContent: string): void}[]}; loadCallbacks: {[url: string]: {(loadedSvgContent: string): void}[]};
svgContents: {[url: string]: string}; svgContents: {[url: string]: string};
} }

View File

@ -24,7 +24,8 @@ import { Swiper } from '../../vendor/swiper';
@Component({ @Component({
tag: 'ion-slides', tag: 'ion-slides',
styleUrl: 'slides.scss' styleUrl: 'slides.scss',
assetsDir: '../../vendor'
}) })
export class Slides { export class Slides {
swiper: any; swiper: any;