Removing gulp install and updating version of Typings / few other packages
This commit is contained in:
Родитель
383fddff46
Коммит
f18461e8a6
58
gulpfile.js
58
gulpfile.js
|
@ -1,13 +1,8 @@
|
|||
/// <binding BeforeBuild='default' />
|
||||
var gulp = require('gulp');
|
||||
var gutil = require('gulp-util');
|
||||
var bower = require('bower');
|
||||
var concat = require('gulp-concat');
|
||||
var sass = require('gulp-sass');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var rename = require('gulp-rename');
|
||||
var sh = require('shelljs');
|
||||
|
||||
var paths = {
|
||||
sass: ['./scss/**/*.scss'],
|
||||
tsc: ['./app/**/*.ts']
|
||||
|
@ -15,50 +10,43 @@ var paths = {
|
|||
|
||||
gulp.task('default', ['sass','tsc']);
|
||||
|
||||
gulp.task('sass', function(done) {
|
||||
gulp.src('./scss/ionic.app.scss')
|
||||
.pipe(sass())
|
||||
.on('error', sass.logError)
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.pipe(minifyCss({
|
||||
keepSpecialComments: 0
|
||||
}))
|
||||
.pipe(rename({ extname: '.min.css' }))
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.on('end', done);
|
||||
gulp.task('sass', function (done) {
|
||||
gulp.src('./scss/ionic.app.scss')
|
||||
.pipe(sass())
|
||||
.on('error', sass.logError)
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.pipe(minifyCss({
|
||||
keepSpecialComments: 0
|
||||
}))
|
||||
.pipe(rename({ extname: '.min.css' }))
|
||||
.pipe(gulp.dest('./www/css/'))
|
||||
.on('end', done);
|
||||
});
|
||||
|
||||
// Run gulp watch in conjunction with Ionic serve to
|
||||
// reflect live changes to TypeScript files in app directory
|
||||
gulp.task('watch', function() {
|
||||
gulp.task('watch', function () {
|
||||
gulp.watch(paths.sass, ['sass']);
|
||||
gulp.watch(paths.tsc, ['tsc']);
|
||||
});
|
||||
|
||||
// Run gulp tsc to transpile your TypeScript files from
|
||||
// app directory to www/js directory
|
||||
gulp.task('tsc', function() {
|
||||
var sourcemaps = require("gulp-sourcemaps");
|
||||
var ts = require('gulp-typescript');
|
||||
var tsProject = ts.createProject('tsconfig.json');
|
||||
return tsProject
|
||||
gulp.task('tsc', function () {
|
||||
var sourcemaps = require("gulp-sourcemaps");
|
||||
var ts = require('gulp-typescript');
|
||||
var tsProject = ts.createProject('tsconfig.json');
|
||||
return tsProject
|
||||
.src('app')
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(ts(tsProject))
|
||||
.js
|
||||
.pipe(sourcemaps.write('./',
|
||||
.pipe(sourcemaps.write('./',
|
||||
{
|
||||
includeContent:true,
|
||||
sourceRoot: function(file) {
|
||||
return file.cwd + '\\js';
|
||||
}
|
||||
includeContent: true,
|
||||
sourceRoot: function (file) {
|
||||
return file.cwd + '\\js';
|
||||
}
|
||||
}))
|
||||
.pipe(gulp.dest('www/js/'));
|
||||
});
|
||||
|
||||
gulp.task('install', ['git-check'], function() {
|
||||
return bower.commands.install()
|
||||
.on('log', function(data) {
|
||||
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
|
||||
});
|
||||
});
|
22
package.json
22
package.json
|
@ -3,24 +3,21 @@
|
|||
"version": "1.1.1",
|
||||
"description": "ionic-ts-sidemenu: An Ionic project",
|
||||
"dependencies": {
|
||||
"gulp": "^3.5.6",
|
||||
"gulp-sass": "^2.0.4",
|
||||
"gulp-concat": "^2.2.0",
|
||||
"gulp-minify-css": "^0.3.0",
|
||||
"gulp-rename": "^1.2.0"
|
||||
"gulp": "3.9.1",
|
||||
"gulp-sass": "^2.3.1",
|
||||
"gulp-minify-css": "^1.2.4",
|
||||
"gulp-rename": "^1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.3.3",
|
||||
"gulp-sourcemaps": "^2.0.0-alpha",
|
||||
"gulp-typescript": "^2.13.0",
|
||||
"gulp-util": "^2.2.14",
|
||||
"shelljs": "^0.3.0",
|
||||
"typings": "^0.8.1"
|
||||
"bower": "^1.7.9",
|
||||
"gulp-sourcemaps": "1.6.0",
|
||||
"gulp-typescript": "2.13.6",
|
||||
"typings": "^1.0.4"
|
||||
},
|
||||
"scripts": {
|
||||
"bower": "node_modules/.bin/bower install",
|
||||
"typings": "node_modules/.bin/typings install",
|
||||
"postinstall": "npm run typings && npm run bower"
|
||||
"postinstall": "npm run typings && npm run bower && npm run build"
|
||||
},
|
||||
"cordovaPlugins": [
|
||||
"cordova-plugin-device",
|
||||
|
@ -31,5 +28,6 @@
|
|||
"ionic-plugin-keyboard"
|
||||
],
|
||||
"cordovaPlatforms": [
|
||||
"android", "ios", "windows"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
"sourceMap": true,
|
||||
"outDir": "www/js"
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts",
|
||||
"www/lib",
|
||||
"platforms",
|
||||
"bld",
|
||||
".vscode"
|
||||
]
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"typings/main",
|
||||
"typings/main.d.ts",
|
||||
"www/lib",
|
||||
"platforms",
|
||||
"bld",
|
||||
".vscode"
|
||||
]
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -9,15 +9,17 @@
|
|||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
|
||||
<link href="css/ionic.app.css" rel="stylesheet">
|
||||
-->
|
||||
<link href="css/ionic.app.css" rel="stylesheet"> -->
|
||||
|
||||
<!--For users deploying their apps to Windows 8.1 or Android Gingerbread, platformOverrided.js
|
||||
will inject platform-specific code from the /merges folder -->
|
||||
<script src="js/platformOverrides.js"></script>
|
||||
|
||||
<!-- ionic/angularjs js -->
|
||||
<script src="lib/ionic/js/ionic.bundle.js"></script>
|
||||
|
||||
<!-- cordova script (this will be a 404 during development) -->
|
||||
<script src="cordova.js"></script>
|
||||
<script type="text/javascript" src="js/platformOverrides.js"></script>
|
||||
|
||||
<!-- your app's js -->
|
||||
<script src="js/app.js"></script>
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
/// <reference path="../typings/browser.d.ts" />
|
||||
// Ionic Starter App
|
||||
// angular.module is a global place for creating, registering and retrieving Angular modules
|
||||
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
|
||||
// the 2nd parameter is an array of 'requires'
|
||||
// 'starter.controllers' is found in controllers.js
|
||||
angular.module('starter', ['ionic', 'starter.controllers'])
|
||||
.run(function ($ionicPlatform) {
|
||||
$ionicPlatform.ready(function () {
|
||||
alert('app');
|
||||
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
|
||||
// for form inputs)
|
||||
if (window.cordova && window.cordova.plugins.Keyboard) {
|
||||
}
|
||||
if (window.StatusBar) {
|
||||
// org.apache.cordova.statusbar required
|
||||
StatusBar.styleDefault();
|
||||
}
|
||||
});
|
||||
})
|
||||
.config(function ($stateProvider, $urlRouterProvider) {
|
||||
$stateProvider
|
||||
.state('app', {
|
||||
url: '/app',
|
||||
abstract: true,
|
||||
templateUrl: 'templates/menu.html',
|
||||
controller: 'AppCtrl as AppCtrl'
|
||||
})
|
||||
.state('app.search', {
|
||||
url: '/search',
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: 'templates/search.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('app.browse', {
|
||||
url: '/browse',
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: 'templates/browse.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('app.playlists', {
|
||||
url: '/playlists',
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: 'templates/playlists.html',
|
||||
controller: 'PlaylistsCtrl as PlaylistsCtrl'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('app.single', {
|
||||
url: '/playlists/:playlistId',
|
||||
views: {
|
||||
'menuContent': {
|
||||
templateUrl: 'templates/playlist.html',
|
||||
controller: 'PlaylistCtrl'
|
||||
}
|
||||
}
|
||||
});
|
||||
// if none of the above states are matched, use this as the fallback
|
||||
$urlRouterProvider.otherwise('/app/playlists');
|
||||
});
|
||||
//# sourceMappingURL=app.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../app/app.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,oBAAoB;AACpB,4FAA4F;AAC5F,sGAAsG;AACtG,8CAA8C;AAC9C,mDAAmD;AACnD,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;KAC1D,GAAG,CAAC,UAAS,cAAkD;IAC5D,cAAc,CAAC,KAAK,CAAC;QACjB,KAAK,CAAC,KAAK,CAAC,CAAC;QACjB,8FAA8F;QAC9F,mBAAmB;QACnB,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;QAGxD,CAAC;QACD,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YACrB,wCAAwC;YACxC,SAAS,CAAC,YAAY,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;KAED,MAAM,CAAC,UAAS,cAAc,EAAE,kBAAkB;IACjD,cAAc;SACX,KAAK,CAAC,KAAK,EAAE;QACd,GAAG,EAAE,MAAM;QACX,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,qBAAqB;QAClC,UAAU,EAAE,oBAAoB;KACjC,CAAC;SAED,KAAK,CAAC,YAAY,EAAE;QACnB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,WAAW,EAAE,uBAAuB;aACrC;SACF;KACF,CAAC;SAED,KAAK,CAAC,YAAY,EAAE;QACjB,GAAG,EAAE,SAAS;QACd,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,WAAW,EAAE,uBAAuB;aACrC;SACF;KACF,CAAC;SACD,KAAK,CAAC,eAAe,EAAE;QACtB,GAAG,EAAE,YAAY;QACjB,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,WAAW,EAAE,0BAA0B;gBACvC,UAAU,EAAE,gCAAgC;aAC7C;SACF;KACF,CAAC;SAEH,KAAK,CAAC,YAAY,EAAE;QACnB,GAAG,EAAE,wBAAwB;QAC7B,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,WAAW,EAAE,yBAAyB;gBACtC,UAAU,EAAE,cAAc;aAC3B;SACF;KACF,CAAC,CAAC;IACH,oEAAoE;IACpE,kBAAkB,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;AACjD,CAAC,CAAC,CAAC"}
|
|
@ -1,77 +0,0 @@
|
|||
/// <reference path="../typings/browser.d.ts" />
|
||||
var AppCtrl = (function () {
|
||||
function AppCtrl($scope, $ionicModal, $timeout) {
|
||||
// With the new view caching in Ionic, Controllers are only called
|
||||
// when they are recreated or on app start, instead of every page change.
|
||||
// To listen for when this page is active (for example, to refresh data),
|
||||
// listen for the $ionicView.enter event:
|
||||
//$scope.$on('$ionicView.enter', function(e) {
|
||||
//});
|
||||
var _this = this;
|
||||
this.$scope = $scope;
|
||||
this.$ionicModal = $ionicModal;
|
||||
this.$timeout = $timeout;
|
||||
// Form data for the login modal
|
||||
this.loginData = {};
|
||||
// Create the login modal that we will use later
|
||||
$ionicModal.fromTemplateUrl("templates/login.html", {
|
||||
scope: this.$scope
|
||||
}).then(function (modal) {
|
||||
_this.modal = modal;
|
||||
});
|
||||
}
|
||||
// Triggered in the login modal to close it
|
||||
AppCtrl.prototype.closeLogin = function () {
|
||||
this.modal.hide();
|
||||
};
|
||||
// Open the login modal
|
||||
AppCtrl.prototype.login = function () {
|
||||
this.modal.show();
|
||||
};
|
||||
// Perform the login action when the user submits the login form
|
||||
AppCtrl.prototype.doLogin = function () {
|
||||
var _this = this;
|
||||
// Simulate a login delay. Remove this and replace with your login
|
||||
// code if using a login system
|
||||
this.$timeout(function () {
|
||||
_this.closeLogin();
|
||||
}, 1000);
|
||||
};
|
||||
return AppCtrl;
|
||||
}());
|
||||
var PlaylistCtrl = (function () {
|
||||
function PlaylistCtrl($stateParams) {
|
||||
this.$stateParams = $stateParams;
|
||||
this.playlistId = $stateParams["playlistId"];
|
||||
}
|
||||
return PlaylistCtrl;
|
||||
}());
|
||||
var PlaylistsCtrl = (function () {
|
||||
function PlaylistsCtrl() {
|
||||
this.playlists = [{
|
||||
title: "Reggaeasdsad",
|
||||
id: 1
|
||||
}, {
|
||||
title: "Chill",
|
||||
id: 2
|
||||
}, {
|
||||
title: "Dubstep",
|
||||
id: 3
|
||||
}, {
|
||||
title: "Indie",
|
||||
id: 4
|
||||
}, {
|
||||
title: "Rap",
|
||||
id: 5
|
||||
}, {
|
||||
title: "Cowbell",
|
||||
id: 6
|
||||
}];
|
||||
}
|
||||
return PlaylistsCtrl;
|
||||
}());
|
||||
angular.module('starter.controllers', [])
|
||||
.controller('AppCtrl', AppCtrl)
|
||||
.controller('PlaylistCtrl', PlaylistCtrl)
|
||||
.controller('PlaylistsCtrl', PlaylistsCtrl);
|
||||
//# sourceMappingURL=controllers.js.map
|
|
@ -1 +0,0 @@
|
|||
{"version":3,"file":"controllers.js","sourceRoot":"","sources":["../../app/controllers.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD;IAII,iBAAoB,MAAsB,EAC9B,WAA0C,EAC1C,QAAiC;QAEzC,kEAAkE;QAClE,yEAAyE;QACzE,yEAAyE;QACzE,yCAAyC;QACzC,8CAA8C;QAC9C,KAAK;QAbb,iBA4CC;QAxCuB,WAAM,GAAN,MAAM,CAAgB;QAC9B,gBAAW,GAAX,WAAW,CAA+B;QAC1C,aAAQ,GAAR,QAAQ,CAAyB;QASzC,gCAAgC;QAChC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QAEpB,gDAAgD;QAChD,WAAW,CAAC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