Commit fc249510 authored by Evren Kutar's avatar Evren Kutar

grunt file create first instance

parent 15dba239
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
dist: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
//build: {
// src: 'src/<%= pkg.name %>.js',
// dest: 'build/<%= pkg.name %>.min.js'
//},
files: {
'dist/app.js': ['dist/app.js']
}
}
},
bower: {
install: {
options: {
install: true,
copy: false,
targetDir: './libs',
cleanTargetDir: true
}
}
},
jshint: {
all: ['Gruntfile.js', 'app/*.js', 'app/**/*.js']
},
karma: {
options: {
configFile: 'karma.conf.js'
},
unit: {
singleRun: true
},
continuous: {
singleRun: false,
autoWatch: true
}
},
html2js: {
dist: {
src: ['index.html', 'app/components/**/*.html'],
dest: 'tmp/templates.js'
}
},
concat: {
options: {
separator: ';'
},
dist: {
src: ['app/**/*controller.js', 'app/**/*service.js', 'app/zetalib/**/*.js', 'app.js', 'app.routes.js'],
dest: 'dist/app.js'
},
components: {
src: ['app/bower_components/**/*.min.js'],
dest: 'dist/bower_components/components.js'
}
},
watch: {
dev: {
files: ['Gruntfile.js', 'app/**/*.js', 'index.html', 'app/components/**/*.html'],
tasks: ['jshint', 'karma:unit', 'html2js:dist', 'concat:dist', 'clean:temp'],
options: {
atBegin: true
}
},
min: {
files: ['Gruntfile.js', 'app/**/*.js', 'index.html', 'app/components/**/*.html'],
tasks: ['jshint', 'karma:unit', 'html2js:dist', 'concat:dist', 'clean:temp', 'uglify:dist'],
options: {
atBegin: true
}
}
}
});
// Default task(s).
//grunt.registerTask('default', ['uglify']);
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-html2js');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-karma');
grunt.registerTask('dev', ['bower', 'connect:server', 'watch:dev']);
grunt.registerTask('test', ['bower', 'jshint', 'karma:continuous']);
grunt.registerTask('minified', ['bower', 'connect:server', 'watch:min']);
grunt.registerTask('default', ['bower', 'html2js:dist', 'concat:dist', 'concat:components', 'uglify:dist']);
};
\ No newline at end of file
This diff is collapsed.
...@@ -8,29 +8,28 @@ ...@@ -8,29 +8,28 @@
'use strict'; 'use strict';
$script([ $script([
'bower_components/angular/angular.js', "bower_components/angular/angular.js",
'bower_components/angular-sanitize/angular-sanitize.min.js', "bower_components/oclazyload/dist/ocLazyLoad.js",
'bower_components/angular-animate/angular-animate.min.js', "bower_components/angular-route/angular-route.js",
'bower_components/moment/moment.js', "bower_components/angular-cookies/angular-cookies.js",
'bower_components/tv4/tv4.js', "bower_components/angular-resource/angular-resource.js",
'bower_components/objectpath/lib/ObjectPath.js', "bower_components/angular-sanitize/angular-sanitize.js",
'bower_components/angular-schema-form/dist/schema-form.min.js', "bower_components/tv4/tv4.js",
'bower_components/angular-schema-form/dist/bootstrap-decorator.min.js', "bower_components/objectpath/lib/ObjectPath.js",
"bower_components/angular-schema-form/dist/schema-form.js",
'app.js', "bower_components/angular-schema-form/dist/bootstrap-decorator.js",
'zlib/general.js', "bower_components/angular-schema-form-datepicker/bootstrap-datepicker.js",
'forms/form_generator.js', "app.js",
'test_view_for_generator/testfile.js', "app_routes.js",
"zetalib/interceptors.js",
"zetalib/general.js",
'login/login.js', "zetalib/forms/form_service.js",
'login/login_service.js', "components/auth/auth_controller.js",
"components/auth/auth_service.js",
'dashboard/dashboard.js', "components/dashboard/dashboard.js",
'components/version/version.js', "components/staff/staff_controller.js",
'components/version/version-directive.js', "components/student/student_controller.js",
'components/version/interpolate-filter.js', "components/dashboard/dashboard.js"
'bower_components/quantumui/dist/js/quantumui-nojq.js',
], function() { ], function() {
// when all is done, execute bootstrap angular application // when all is done, execute bootstrap angular application
angular.bootstrap(document, ['zaerp']); angular.bootstrap(document, ['zaerp']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment