mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
a wee bit faster
This commit is contained in:
@ -7,10 +7,10 @@ System.config({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
"ionic/*": "dist/ionic/*.js",
|
//"ionic/*": "dist/js/es6/ionic/*.js",
|
||||||
"github:*": "jspm_packages/github/*.js",
|
"github:*": "jspm_packages/github/*.js",
|
||||||
"npm:*": "jspm_packages/npm/*.js",
|
"npm:*": "jspm_packages/npm/*.js",
|
||||||
"angular2/*": "angular2/dist/js/dev/es6/angular2/*.es6",
|
//"angular2/*": "angular2/dist/js/dev/es6/angular2/*.es6",
|
||||||
"*": "*.js"
|
"*": "*.js"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
72
gulpfile.js
72
gulpfile.js
@ -23,12 +23,20 @@ var webpack = require('gulp-webpack');
|
|||||||
var lazypipe = require('lazypipe');
|
var lazypipe = require('lazypipe');
|
||||||
|
|
||||||
|
|
||||||
gulp.task('build', function() {
|
gulp.task('clean.build', function() {
|
||||||
runSequence(
|
runSequence(
|
||||||
'clean',
|
'clean',
|
||||||
'ionic.traceur',
|
'ionic.transpile',
|
||||||
'ionic.bundle.deps',
|
'ionic.bundle.deps',
|
||||||
'ionic.bundle.js',
|
'ionic.examples',
|
||||||
|
'sass',
|
||||||
|
'fonts',
|
||||||
|
'polyfills');
|
||||||
|
})
|
||||||
|
|
||||||
|
gulp.task('build', function() {
|
||||||
|
runSequence(
|
||||||
|
'ionic.transpile',
|
||||||
'ionic.examples',
|
'ionic.examples',
|
||||||
'sass',
|
'sass',
|
||||||
'fonts',
|
'fonts',
|
||||||
@ -39,24 +47,17 @@ gulp.task('watch', function() {
|
|||||||
|
|
||||||
runSequence(
|
runSequence(
|
||||||
'clean',
|
'clean',
|
||||||
'link.angular',
|
'ionic.traceur',
|
||||||
'ionic.copy.js',
|
'ionic.bundle.deps',
|
||||||
|
'ionic.bundle.js',
|
||||||
'ionic.examples',
|
'ionic.examples',
|
||||||
'sass',
|
'sass',
|
||||||
'fonts',
|
'fonts',
|
||||||
'polyfills',
|
'polyfills',
|
||||||
|
|
||||||
function() {
|
function() {
|
||||||
watch('ionic/**/*.js', function(file) {
|
watch('ionic/**/*.js', function() {
|
||||||
var splt = file.path.split('/');
|
gulp.start('');
|
||||||
var filename = splt[splt.length - 1];
|
|
||||||
|
|
||||||
var dest = file.path.replace(__dirname, '../angular-ionic/modules');
|
|
||||||
dest = dest.replace(filename, '')
|
|
||||||
|
|
||||||
doubleCheckDistFiles();
|
|
||||||
|
|
||||||
return gulp.src(file.path).pipe(gulp.dest(dest));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
watch('ionic/components/*/test/**/*', function() {
|
watch('ionic/components/*/test/**/*', function() {
|
||||||
@ -98,32 +99,37 @@ var babelOptions = {
|
|||||||
'angular2-annotations',
|
'angular2-annotations',
|
||||||
'type-assertion:after'
|
'type-assertion:after'
|
||||||
],*/
|
],*/
|
||||||
modules: "system"
|
modules: "system",
|
||||||
|
moduleIds: true,
|
||||||
|
getModuleId: function(name) {
|
||||||
|
return "ionic/" + name;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
gulp.task('ionic.traceur', function(done) {
|
gulp.task('ionic.transpile', function(done) {
|
||||||
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*'])
|
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*'])
|
||||||
.pipe(traceur(traceurOptions))
|
.pipe(traceur(traceurOptions))
|
||||||
.pipe(gulp.dest('dist/ionic'));
|
.pipe(gulp.dest('dist/js/es6/ionic'))
|
||||||
});
|
.pipe(babel(babelOptions))
|
||||||
|
.pipe(gulp.dest('dist/js/es5/ionic'))
|
||||||
gulp.task('ionic.bundle.js', function() {
|
.pipe(concat('ionic.bundle.js'))
|
||||||
var Builder = require('systemjs-builder');
|
.pipe(gulp.dest('dist/js/'));
|
||||||
var builder = new Builder();
|
|
||||||
return builder.loadConfig('config.js').then(function(){
|
|
||||||
builder.config({ baseURL: 'file:' + process.cwd() });
|
|
||||||
return builder.build('dist/ionic/ionic - dist/js/dependencies', 'dist/js/ionic.bundle.js');
|
|
||||||
}, function(error){
|
|
||||||
throw new Error(error);
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('ionic.bundle.deps', function() {
|
gulp.task('ionic.bundle.deps', function() {
|
||||||
var Builder = require('systemjs-builder');
|
var Builder = require('systemjs-builder')
|
||||||
var builder = new Builder();
|
var builder = new Builder();
|
||||||
return builder.loadConfig('config.js').then(function(){
|
return builder.loadConfig('config.js').then(function(){
|
||||||
builder.config({ baseURL: 'file:' + process.cwd() });
|
// add ionic and angular2 build paths, since config.js is loaded at runtime from
|
||||||
return builder.build('dist/ionic/ionic - [dist/ionic/ionic]', 'dist/js/dependencies.js');
|
// tests we don't want to put them there
|
||||||
|
builder.config({
|
||||||
|
baseURL: 'file:' + process.cwd(),
|
||||||
|
paths : {
|
||||||
|
"ionic/*": "dist/js/es6/ionic/*.js",
|
||||||
|
"angular2/*": "angular2/dist/js/dev/es6/angular2/*.es6",
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return builder.build('dist/js/es6/ionic/**/* - [dist/js/es6/ionic/**/*]', 'dist/js/dependencies.js');
|
||||||
}, function(error){
|
}, function(error){
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
})
|
})
|
||||||
@ -132,7 +138,7 @@ gulp.task('ionic.bundle.deps', function() {
|
|||||||
gulp.task('ionic.examples', function() {
|
gulp.task('ionic.examples', function() {
|
||||||
var buildTest = lazypipe()
|
var buildTest = lazypipe()
|
||||||
.pipe(traceur, traceurOptions)
|
.pipe(traceur, traceurOptions)
|
||||||
.pipe(babel, babelOptions)
|
//.pipe(babel, babelOptions) Let SystemJS load index.js at runtime, saves build time
|
||||||
|
|
||||||
// Get each test folder with gulp.src
|
// Get each test folder with gulp.src
|
||||||
return gulp.src('ionic/components/*/test/*/**/*')
|
return gulp.src('ionic/components/*/test/*/**/*')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {ComponentConfig} from 'ionic/config/component-config'
|
import {ComponentConfig} from 'ionic/config/component'
|
||||||
import {Aside} from 'ionic/components/aside/aside';
|
import {Aside} from 'ionic/components/aside/aside';
|
||||||
import * as asideTypes from 'ionic/components/aside/types/types'
|
import * as asideTypes from 'ionic/components/aside/extensions/types'
|
||||||
import * as asideGestures from 'ionic/components/aside/gestures/gestures';
|
import * as asideGestures from 'ionic/components/aside/extensions/gestures';
|
||||||
|
|
||||||
export let AsideConfig = new ComponentConfig(Aside)
|
export let AsideConfig = new ComponentConfig(Aside)
|
||||||
|
|
||||||
|
@ -8,7 +8,10 @@ import {Injector} from 'angular2/di';
|
|||||||
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
|
import {ViewContainerRef} from 'angular2/src/core/compiler/view_container_ref';
|
||||||
import {Compiler} from 'angular2/angular2';
|
import {Compiler} from 'angular2/angular2';
|
||||||
|
|
||||||
import {NavBase} from './nav-base';
|
import {NavController} from './nav-controller';
|
||||||
|
import {NavItem, NavParams} from './nav-item';
|
||||||
|
import {Tabs} from '../tabs/tabs';
|
||||||
|
//import {nav} from './nav-base';
|
||||||
import {SwipeHandle} from './swipe-handle';
|
import {SwipeHandle} from './swipe-handle';
|
||||||
import {IonicComponent} from '../../config/component';
|
import {IonicComponent} from '../../config/component';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {Component, Parent, Decorator, View, NgElement} from 'angular2/angular2'
|
import {Component, Parent, Decorator, View, NgElement} from 'angular2/angular2'
|
||||||
import {Nav} from 'ionic/components/nav/nav'
|
import {Nav} from 'ionic/components/nav/nav'
|
||||||
import {NavPane} from 'ionic/components/nav-pane/nav-pane'
|
//import {NavPane} from 'ionic/components/nav-pane/nav-pane'
|
||||||
import * as util from 'ionic/util'
|
import * as util from 'ionic/util'
|
||||||
|
|
||||||
// TODO consider more explicit API, a la tabs
|
// TODO consider more explicit API, a la tabs
|
||||||
|
@ -21,16 +21,17 @@
|
|||||||
|
|
||||||
<!-- web animations polyfill for non-chrome browsers
|
<!-- web animations polyfill for non-chrome browsers
|
||||||
<script src="/../../polyfills/web-animations.min.js"></script> -->
|
<script src="/../../polyfills/web-animations.min.js"></script> -->
|
||||||
<script src="/../../../../scripts/component/zone-microtask.js" type="text/javascript"></script>
|
<script src="/../../../../scripts/resources/zone-microtask.js" type="text/javascript"></script>
|
||||||
<!-- <script src="long-stack-trace-zone.js" type="text/javascript"></script> -->
|
<!-- <script src="long-stack-trace-zone.js" type="text/javascript"></script> -->
|
||||||
<!-- <script src="traceur-runtime.js" type="text/javascript"></script>
|
<!-- <script src="traceur-runtime.js" type="text/javascript"></script>
|
||||||
<script src="system.src.js" type="text/javascript"></script>
|
<script src="system.src.js" type="text/javascript"></script>
|
||||||
<script src="extension-register.js" type="text/javascript"></script>
|
<script src="extension-register.js" type="text/javascript"></script>
|
||||||
<script src="extension-cjs.js" type="text/javascript"></script>
|
<script src="extension-cjs.js" type="text/javascript"></script>
|
||||||
<script src="runtime_paths.js" type="text/javascript"></script> -->
|
<script src="runtime_paths.js" type="text/javascript"></script> -->
|
||||||
<script src="/../../../../scripts/component/traceur-runtime.js" type="text/javascript"></script>
|
<script src="/../../../../scripts/resources/traceur-runtime.js" type="text/javascript"></script>
|
||||||
<script src="/../../../../scripts/component/babel-external-helpers.js" type="text/javascript"></script><script src="/../../../../scripts/component/Reflect.js" type="text/javascript"></script>
|
<script src="/../../../../scripts/resources/babel-external-helpers.js" type="text/javascript"></script>
|
||||||
<script src="/../../../../scripts/component/system.src.js"></script>
|
<script src="/../../../../scripts/resources/Reflect.js" type="text/javascript"></script>
|
||||||
|
<script src="/../../../../scripts/resources/system.src.js"></script>
|
||||||
<script src="/../../../../config.js"></script>
|
<script src="/../../../../config.js"></script>
|
||||||
<script src="/../../../../dist/js/dependencies.js"></script>
|
<script src="/../../../../dist/js/dependencies.js"></script>
|
||||||
<script src="/../../../../dist/js/ionic.bundle.js"></script>
|
<script src="/../../../../dist/js/ionic.bundle.js"></script>
|
||||||
|
Reference in New Issue
Block a user