mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
chore(demos): update demo scripts
This commit is contained in:

committed by
Adam Bradley

parent
1b65f2d040
commit
4260940814
11
scripts/demos/entry.ts
Normal file
11
scripts/demos/entry.ts
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
import 'core-js/es6';
|
||||||
|
import 'core-js/es7/reflect';
|
||||||
|
import 'zone.js/dist/zone';
|
||||||
|
import 'zone.js/dist/long-stack-trace-zone';
|
||||||
|
|
||||||
|
import { platformBrowser } from '@angular/platform-browser';
|
||||||
|
import { enableProdMode } from '@angular/core';
|
||||||
|
import { AppModuleNgFactory } from './AppModule.ngfactory';
|
||||||
|
|
||||||
|
enableProdMode();
|
||||||
|
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
@ -9,7 +9,6 @@
|
|||||||
<link ios-href="../output.ios.css" rel="stylesheet">
|
<link ios-href="../output.ios.css" rel="stylesheet">
|
||||||
<link md-href="../output.md.css" rel="stylesheet">
|
<link md-href="../output.md.css" rel="stylesheet">
|
||||||
<link wp-href="../output.wp.css" rel="stylesheet">
|
<link wp-href="../output.wp.css" rel="stylesheet">
|
||||||
<script type="text/javascript" src="/dist/demos/scrollbar-fix.js"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -17,6 +16,6 @@
|
|||||||
<ion-app>
|
<ion-app>
|
||||||
</ion-app>
|
</ion-app>
|
||||||
|
|
||||||
<script src="bundle.js"></script>
|
<script src="./index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,56 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<!-- https://www.chromium.org/developers/design-documents/chromium-graphics/how-to-get-gpu-rasterization -->
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="/dist/demos/scrollbar-fix.css">
|
|
||||||
<link ios-href="../output.ios.css" rel="stylesheet">
|
|
||||||
<link md-href="../output.md.css" rel="stylesheet">
|
|
||||||
<link wp-href="../output.wp.css" rel="stylesheet">
|
|
||||||
<script type="text/javascript" src="/dist/demos/scrollbar-fix.js"></script>
|
|
||||||
|
|
||||||
<script src="../../js/es6-shim.min.js"></script>
|
|
||||||
<script src="../../js/es6-module-loader.src.js"></script>
|
|
||||||
<script src="../../js/Reflect.js"></script>
|
|
||||||
<script src="../../js/zone.js"></script>
|
|
||||||
<script src="../../js/system.src.js"></script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
System.config({
|
|
||||||
map: {
|
|
||||||
'@angular/core': '/node_modules/@angular/core/bundles/core.umd.js',
|
|
||||||
'@angular/compiler': '/node_modules/@angular/compiler/bundles/compiler.umd.js',
|
|
||||||
'@angular/common': '/node_modules/@angular/common/bundles/common.umd.js',
|
|
||||||
'@angular/forms': '/node_modules/@angular/forms/bundles/forms.umd.js',
|
|
||||||
'@angular/http': '/node_modules/@angular/http/bundles/http.umd.js',
|
|
||||||
'@angular/platform-browser': '/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js',
|
|
||||||
'@angular/platform-browser-dynamic': '/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
|
||||||
'ionic-angular': '/src'
|
|
||||||
},
|
|
||||||
packages: {
|
|
||||||
'ionic-angular': {
|
|
||||||
main: 'index'
|
|
||||||
},
|
|
||||||
'rxjs': {
|
|
||||||
defaultExtension: 'js'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script src="../../bundles/ionic.system.js"></script>
|
|
||||||
<script src="../../js/Rx.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<ion-app>
|
|
||||||
<ion-loading-icon></ion-loading-icon>
|
|
||||||
</ion-app>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
System.import('index.js').then(function(m) {}, console.error.bind(console));
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
22
scripts/demos/ngcConfig.json
Normal file
22
scripts/demos/ngcConfig.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "es2015",
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"es2015"
|
||||||
|
],
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"noImplicitAny": false,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"experimentalDecorators": true
|
||||||
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"skipMetadataEmit": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"dist/demos/**/entry.ts",
|
||||||
|
"dist/demos/**/AppModule.ts"
|
||||||
|
]
|
||||||
|
}
|
@ -1,38 +1,18 @@
|
|||||||
|
var entryData = require('./webpackEntryPoints.json');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [
|
devtool: "source-map",
|
||||||
path.normalize('es6-shim/es6-shim.min'),
|
|
||||||
'reflect-metadata',
|
entry: entryData,
|
||||||
path.normalize('zone.js/dist/zone'),
|
|
||||||
],
|
output: {
|
||||||
module: {
|
"path": path.join(__dirname, '../../'),
|
||||||
loaders: [
|
"filename": "[name].js"
|
||||||
{
|
|
||||||
test: /\.ts$/,
|
|
||||||
loader: "awesome-typescript-loader",
|
|
||||||
query: {
|
|
||||||
'doTypeCheck': false
|
|
||||||
},
|
|
||||||
include: /\/demos\//,
|
|
||||||
exclude: /node_modules/
|
|
||||||
},
|
|
||||||
{
|
|
||||||
test: /\.js$/,
|
|
||||||
include: path.resolve('node_modules/angular2'),
|
|
||||||
loader: 'strip-sourcemap'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
noParse: [
|
|
||||||
/es6-shim/,
|
|
||||||
/reflect-metadata/,
|
|
||||||
/zone\.js(\/|\\)dist(\/|\\)zone-microtask/
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
extensions: ["", ".js", ".json"],
|
||||||
'ionic-angular': path.normalize(process.cwd() + '/dist')
|
mainFields: ["main", "browser"]
|
||||||
},
|
|
||||||
extensions: ["", ".js", ".ts"]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
42
scripts/demos/webpackEntryPoints.json
Normal file
42
scripts/demos/webpackEntryPoints.json
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"dist/demos/action-sheet/index": "./dist/demos/action-sheet/entry",
|
||||||
|
"dist/demos/alert/index": "./dist/demos/alert/entry",
|
||||||
|
"dist/demos/button/index": "./dist/demos/button/entry",
|
||||||
|
"dist/demos/checkbox/index": "./dist/demos/checkbox/entry",
|
||||||
|
"dist/demos/config/index": "./dist/demos/config/entry",
|
||||||
|
"dist/demos/datetime/index": "./dist/demos/datetime/entry",
|
||||||
|
"dist/demos/events/index": "./dist/demos/events/entry",
|
||||||
|
"dist/demos/hide-when/index": "./dist/demos/hide-when/entry",
|
||||||
|
"dist/demos/icon/index": "./dist/demos/icon/entry",
|
||||||
|
"dist/demos/infinite-scroll/index": "./dist/demos/infinite-scroll/entry",
|
||||||
|
"dist/demos/input/index": "./dist/demos/input/entry",
|
||||||
|
"dist/demos/item-reorder/index": "./dist/demos/item-reorder/entry",
|
||||||
|
"dist/demos/item-sliding/index": "./dist/demos/item-sliding/entry",
|
||||||
|
"dist/demos/item/index": "./dist/demos/item/entry",
|
||||||
|
"dist/demos/label/index": "./dist/demos/label/entry",
|
||||||
|
"dist/demos/list/index": "./dist/demos/list/entry",
|
||||||
|
"dist/demos/loading/index": "./dist/demos/loading/entry",
|
||||||
|
"dist/demos/local-storage/index": "./dist/demos/local-storage/entry",
|
||||||
|
"dist/demos/menu/index": "./dist/demos/menu/entry",
|
||||||
|
"dist/demos/modal/index": "./dist/demos/modal/entry",
|
||||||
|
"dist/demos/nav-params/index": "./dist/demos/nav-params/entry",
|
||||||
|
"dist/demos/navbar/index": "./dist/demos/navbar/entry",
|
||||||
|
"dist/demos/navigation/index": "./dist/demos/navigation/entry",
|
||||||
|
"dist/demos/platform/index": "./dist/demos/platform/entry",
|
||||||
|
"dist/demos/popover/index": "./dist/demos/popover/entry",
|
||||||
|
"dist/demos/radio/index": "./dist/demos/radio/entry",
|
||||||
|
"dist/demos/range/index": "./dist/demos/range/entry",
|
||||||
|
"dist/demos/refresher/index": "./dist/demos/refresher/entry",
|
||||||
|
"dist/demos/scroll/index": "./dist/demos/scroll/entry",
|
||||||
|
"dist/demos/searchbar/index": "./dist/demos/searchbar/entry",
|
||||||
|
"dist/demos/segment/index": "./dist/demos/segment/entry",
|
||||||
|
"dist/demos/select/index": "./dist/demos/select/entry",
|
||||||
|
"dist/demos/show-when/index": "./dist/demos/show-when/entry",
|
||||||
|
"dist/demos/slides/index": "./dist/demos/slides/entry",
|
||||||
|
"dist/demos/tabs/index": "./dist/demos/tabs/entry",
|
||||||
|
"dist/demos/textarea/index": "./dist/demos/textarea/entry",
|
||||||
|
"dist/demos/title/index": "./dist/demos/title/entry",
|
||||||
|
"dist/demos/toast/index": "./dist/demos/toast/entry",
|
||||||
|
"dist/demos/toggle/index": "./dist/demos/toggle/entry",
|
||||||
|
"dist/demos/toolbar/index": "./dist/demos/toolbar/entry"
|
||||||
|
}
|
Reference in New Issue
Block a user