This repository has been archived by the owner on Jul 11, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
136 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,2 @@ | ||
gulp = require 'gulp' | ||
requireDir = require 'require-dir' | ||
|
||
requireDir './tasks' | ||
|
||
# | ||
# | ||
# gutil = require('gulp-util') | ||
# coffee = require 'gulp-coffee' | ||
# bower = require('bower') | ||
# path = require 'path' | ||
# less = require 'gulp-less' | ||
# jade = require 'gulp-jade' | ||
# concat = require('gulp-concat') | ||
# filter = require 'gulp-filter' | ||
# uglify = require 'gulp-uglify' | ||
# sass = require('gulp-sass') | ||
# mainBower = require 'main-bower-files' | ||
# minifyCss = require('gulp-minify-css') | ||
# templateCache = require 'gulp-angular-templatecache' | ||
# ngAnnotate = require 'gulp-ng-annotate' | ||
# rename = require('gulp-rename') | ||
# sh = require('shelljs') | ||
# del = require 'del' | ||
# lbService = require 'gulp-loopback-sdk-angular' | ||
# vinylPaths = require('vinyl-paths') | ||
# | ||
# gulp.task 'compile', [ | ||
# 'compile:jade' | ||
# 'compile:style' | ||
# 'compile:js' | ||
# 'compile:static' | ||
# 'compile:templates' | ||
# ] | ||
# | ||
# gulp.task 'compile:static', -> | ||
# gulp.src [ | ||
# paths.input + '/static/*' | ||
# paths.input + '/static/**/*' | ||
# ] | ||
# .pipe gulp.dest paths.output + '/static' | ||
# for custom in customStatic | ||
# gulp.src custom.source | ||
# .pipe gulp.dest paths.output + custom.destination | ||
# | ||
# gulp.task 'compile:jade', -> | ||
# gulp.src paths.input + '/*.jade' | ||
# .pipe jade pretty: true | ||
# .pipe gulp.dest paths.output | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'compile:style', [ | ||
# 'compile:style:fonts' | ||
# 'compile:style:less' | ||
# ] | ||
# | ||
# gulp.task 'compile:style:fonts', -> | ||
# for input_path in paths.fonts.input | ||
# gulp.src input_path + '/*' | ||
# .pipe gulp.dest paths.output + '/style/fonts' | ||
# | ||
# gulp.task 'compile:style:less', -> | ||
# gulp.src paths.input + '/style/main.less' | ||
# .pipe less paths: [ path.join(__dirname) ] | ||
# .pipe gulp.dest paths.output + '/style' | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'compile:js', [ | ||
# 'compile:js:vendors' | ||
# 'compile:js:coffee' | ||
# 'compile:js:lb-services' | ||
# ] | ||
# | ||
# gulp.task 'compile:js:vendors', -> | ||
# gulp.src mainBower() | ||
# .pipe filter '**/*.js' | ||
# .pipe concat 'vendor.js' | ||
# .pipe gulp.dest paths.output + '/js' | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'compile:js:lb-services', -> | ||
# gulp.src paths.backend | ||
# .pipe lbService apiUrl: uri.back | ||
# # .pipe uglify() | ||
# .pipe rename 'lb-services.js' | ||
# .pipe gulp.dest paths.output + '/js' | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'compile:js:coffee', -> | ||
# gulp.src [ | ||
# paths.input + '/*.coffee' | ||
# paths.input + '/**/*.coffee' | ||
# ] | ||
# .pipe coffee bare: true | ||
# .pipe ngAnnotate() | ||
# # .pipe uglify() | ||
# .pipe concat paths.js.main_file | ||
# .pipe gulp.dest paths.output + '/js' | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'compile:templates', -> | ||
# gulp.src paths.input + '/**/*.jade' | ||
# .pipe jade doctype: 'html' | ||
# .pipe templateCache | ||
# filename: templates.filename | ||
# module: templates.module | ||
# standalone: true | ||
# .pipe gulp.dest paths.output + '/js' | ||
# .on 'error', gutil.log | ||
# | ||
# gulp.task 'default', [ 'compile' ] | ||
# | ||
# gulp.task 'watch', ['compile'], -> | ||
# gulp.watch [ paths.input + '/static/*', paths.input + '/static/**/*' ], [ 'compile:static' ] | ||
# gulp.watch [ paths.input + '/*.coffee', paths.input + '/**/*.coffee' ], [ 'compile:js:coffee' ] | ||
# gulp.watch [ paths.input + '/*.js', paths.input + '/**/*.js' ], [ 'compile:js' ] | ||
# gulp.watch [ paths.input + '/**/*.less' ], [ 'compile:style:less' ] | ||
# gulp.watch [ paths.input + '/**/*.jade' ], [ 'compile:templates' ] | ||
# gulp.watch [ paths.input + '/*.jade' ], [ 'compile:jade' ] | ||
# gulp.watch [ '../common/**/*' ], [ 'compile:js:lb-services' ] | ||
# | ||
# gulp.task 'install', [ 'git-check' ], -> | ||
# bower.commands.install().on 'log', (data) -> | ||
# return gutil.log 'bower', gutil.colors.cyan(data.id), data.message | ||
# | ||
# gulp.task 'git-check', (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('http://git-scm.com/downloads') + '.', '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' | ||
# process.exit 1 | ||
# done() | ||
module.exports = (gulp, config) -> | ||
require('./tasks') gulp, config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
config = require '../../gulp.config.coffee' | ||
|
||
del = require 'del' | ||
gulp = require 'gulp' | ||
vinylPaths = require 'vinyl-paths' | ||
|
||
gulp.task 'clean', -> | ||
gulp.src config.output.path | ||
.pipe vinylPaths del | ||
module.exports = (gulp, config) -> | ||
gulp.task 'clean', -> | ||
gulp.src config.output.path | ||
.pipe vinylPaths del |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
config = require '../../../gulp.config.coffee' | ||
config = require "#{process.env.PWD}/gulp.config.coffee" | ||
|
||
coffee = require 'gulp-coffee' | ||
concat = require 'gulp-concat' | ||
gif = require 'gulp-if' | ||
gulp = require 'gulp' | ||
gutil = require 'gulp-util' | ||
ngAnnotate = require 'gulp-ng-annotate' | ||
replace = require 'gulp-replace-task' | ||
sourcemaps = require 'gulp-sourcemaps' | ||
uglify = require 'gulp-uglify' | ||
|
||
gulp.task 'compile:coffee', -> | ||
gulp.src config.input.coffee | ||
.on 'error', gutil.log | ||
.pipe coffee | ||
bare: true | ||
.pipe ngAnnotate() | ||
.pipe gif config.minify, uglify() | ||
.pipe concat config.output.application | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe gulp.dest config.output.script | ||
module.exports = (gulp, config) -> | ||
gulp.task 'compile:coffee', -> | ||
gulp.src config.input.coffee | ||
.on 'error', gutil.log | ||
.pipe gif config.input.replace.enabled, replace config.input.replace | ||
.pipe coffee | ||
bare: true | ||
.pipe ngAnnotate() | ||
.pipe gif config.minify, uglify() | ||
.pipe concat config.output.application | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe gulp.dest config.output.script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = (gulp, config) -> | ||
require('./coffee-script.coffee') gulp, config | ||
require('./jade.coffee') gulp, config | ||
require('./less.coffee') gulp, config | ||
require('./loopback-services.coffee') gulp, config | ||
require('./template.coffee') gulp, config | ||
require('./vendor.coffee') gulp, config | ||
|
||
gulp.task 'compile', [ | ||
'compile:coffee' | ||
'compile:less' | ||
'compile:jade' | ||
'compile:template' | ||
'compile:vendor' | ||
'compile:loopback' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
config = require '../../../gulp.config.coffee' | ||
|
||
gulp = require 'gulp' | ||
jade = require 'gulp-jade' | ||
gif = require 'gulp-if' | ||
gutil = require 'gulp-util' | ||
replace = require 'gulp-replace-task' | ||
|
||
gulp.task 'compile:jade', -> | ||
gulp.src config.input.jade | ||
.on 'error', gutil.log | ||
.pipe jade | ||
pretty: not config.minify | ||
.pipe gulp.dest config.output.path | ||
module.exports = (gulp, config) -> | ||
gulp.task 'compile:jade', -> | ||
gulp.src config.input.jade | ||
.on 'error', gutil.log | ||
.pipe gif config.input.replace.enabled, replace config.input.replace | ||
.pipe jade | ||
pretty: not config.minify | ||
.pipe gulp.dest config.output.path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
config = require '../../../gulp.config.coffee' | ||
|
||
autoprefixer = require 'gulp-autoprefixer' | ||
gif = require 'gulp-if' | ||
gulp = require 'gulp' | ||
gutil = require 'gulp-util' | ||
less = require 'gulp-less' | ||
minifyCss = require 'gulp-minify-css' | ||
path = require 'path' | ||
|
||
gulp.task 'compile:less', -> | ||
gulp.src config.input.less.main | ||
.on 'error', gutil.log | ||
.pipe less paths: [ path.join(__dirname) ] | ||
.pipe autoprefixer | ||
browsers: ['last 2 versions', 'Firefox >= 24', 'ie >= 11'] | ||
cascade: false | ||
.pipe gif config.minify, minifyCss() | ||
.pipe gulp.dest config.output.less | ||
module.exports = (gulp, config) -> | ||
gulp.task 'compile:less', -> | ||
gulp.src config.input.less.main | ||
.on 'error', gutil.log | ||
.pipe less paths: [ path.join(__dirname) ] | ||
.pipe autoprefixer | ||
browsers: ['last 2 versions', 'Firefox >= 24', 'ie >= 11'] | ||
cascade: false | ||
.pipe gif config.minify, minifyCss() | ||
.pipe gulp.dest config.output.less |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
config = require '../../../gulp.config.coffee' | ||
|
||
coffee = require 'gulp-coffee' | ||
concat = require 'gulp-concat' | ||
gif = require 'gulp-if' | ||
gulp = require 'gulp' | ||
gutil = require 'gulp-util' | ||
lbService = require 'gulp-loopback-sdk-angular' | ||
ngAnnotate = require 'gulp-ng-annotate' | ||
rename = require 'gulp-rename' | ||
sourcemaps = require 'gulp-sourcemaps' | ||
uglify = require 'gulp-uglify' | ||
|
||
gulp.task 'compile:loopback', -> | ||
return if not config.input.loopback.enabled | ||
gulp.src config.input.loopback.server | ||
.on 'error', gutil.log | ||
.pipe lbService | ||
apiUrl: config.input.loopback.url | ||
ngModuleName: config.output.loopback.module | ||
.pipe uglify() | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe rename config.output.loopback.filename | ||
.pipe gulp.dest config.output.loopback.path | ||
module.exports = (gulp, config) -> | ||
|
||
gulp.task 'compile:loopback', -> | ||
return if not config.input.loopback.enabled | ||
gulp.src config.input.loopback.server | ||
.on 'error', gutil.log | ||
.pipe lbService | ||
apiUrl: config.input.loopback.url | ||
ngModuleName: config.output.loopback.module | ||
.pipe uglify() | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe rename config.output.loopback.filename | ||
.pipe gulp.dest config.output.loopback.path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
config = require '../../../gulp.config.coffee' | ||
|
||
gulp = require 'gulp' | ||
gutil = require 'gulp-util' | ||
gif = require 'gulp-if' | ||
jade = require 'gulp-jade' | ||
replace = require 'gulp-replace-task' | ||
sourcemaps = require 'gulp-sourcemaps' | ||
templateCache = require 'gulp-angular-templatecache' | ||
|
||
gulp.task 'compile:template', -> | ||
gulp.src config.input.template | ||
.on 'error', gutil.log | ||
.pipe jade | ||
doctype: 'html' | ||
pretty: not config.minify | ||
.pipe templateCache | ||
filename: config.output.template.filename | ||
module: config.output.template.module | ||
standalone: true | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe gulp.dest config.output.script | ||
module.exports = (gulp, config) -> | ||
gulp.task 'compile:template', -> | ||
gulp.src config.input.template | ||
.on 'error', gutil.log | ||
.pipe gif config.input.replace.enabled, replace config.input.replace | ||
.pipe jade | ||
doctype: 'html' | ||
pretty: not config.minify | ||
.pipe templateCache | ||
filename: config.output.template.filename | ||
module: config.output.template.module | ||
standalone: true | ||
.pipe sourcemaps.init() | ||
.pipe sourcemaps.write() | ||
.pipe gulp.dest config.output.script |
Oops, something went wrong.