Hi @mhartington yes right i coming from ionic 1. The Problem is since the Update.
Here is my gulpfile.js
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 templateCache = require(âgulp-angular-templatecacheâ);
var ngAnnotate = require(âgulp-ng-annotateâ);
var useref = require(âgulp-userefâ);
var paths = {
sass: [â./scss//*.scssâ],
templatecache: ['./www/templates//.htmlâ],
ng_annotate: ['./www/js/**/.jsâ],
useref: [â./www/*.htmlâ]
};
gulp.task(âdefaultâ, [âsassâ, âtemplatecacheâ, âng_annotateâ],function () {
return gulp.src(âapp/*.htmlâ)
.pipe(useref())
.pipe(gulp.dest(âdistâ));
});
gulp.task(âsassâ, function(done) {
gulp.src(â./scss/ionic.app.scssâ)
.pipe(sass())
.pipe(gulp.dest(â./www/css/â))
.pipe(minifyCss({
keepSpecialComments: 0
}))
.pipe(rename({ extname: â.min.cssâ }))
.pipe(gulp.dest(â./www/css/â))
.on(âendâ, done);
});
gulp.task(âtemplatecacheâ, function (done) {
gulp.src(paths.templatecache)
.pipe(templateCache({standalone:true}))
.pipe(gulp.dest(â./www/jsâ))
.on(âendâ, done);
});
gulp.task(âng_annotateâ, function (done) {
gulp.src(paths.ng_annotate)
.pipe(ngAnnotate({single_quotes: true}))
.pipe(gulp.dest(â./www/dist/dist_js/appâ))
.on(âendâ, done);
});
gulp.task(âuserefâ, function (done) {
var assets = useref.assets();
gulp.src(paths.useref)
.pipe(assets)
.pipe(assets.restore())
.pipe(useref())
.pipe(gulp.dest(â./www/distâ))
.on(âendâ, done);
});
gulp.task(âwatchâ, function() {
gulp.watch(paths.sass, [âsassâ]);
gulp.watch(paths.templatecache, [âtemplatecacheâ]);
gulp.watch(paths.ng_annotate, [âng_annotateâ]);
gulp.watch(paths.useref, [âuserefâ]);
});
gulp.task(âinstallâ, [âgit-checkâ], function() {
return bower.commands.install()
.on(âlogâ, function(data) {
gutil.log(âbowerâ, gutil.colors.cyan(data.id), data.message);
});
});
gulp.task(âgit-checkâ, function(done) {
if (!sh.which(âgitâ)) {
console.log(
â â + gutil.colors.red(âGit is not installed.â),
â\n Git, the version control system, is required to download Ionic.â,
â\n Download git here:â, gutil.colors.cyan(âGit - Downloadsâ) + â.â,
â\n Once git is installed, run 'â + gutil.colors.cyan(âgulp installâ) + â' again.â
);
process.exit(1);
}
done();
});