Newer
Older
var typo3_css = 'extension/Resources/Public/Css/';
var typo3_js = 'extension/Resources/Public/JavaScript/';
var typo3_fonts = 'extension/Resources/Public/fonts/';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
copy: {
bootstrap: {
files: [
{
bootstrap_dev: {
files: [
{
cwd: 'bower_components/bootstrap/dist/css/',
src: [
'bootstrap.min.css',
'bootstrap-theme.min.css'
],
dest: 'css/',
filter: 'isFile',
expand: true,
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/js/',
src: [
'bootstrap.min.js'
],
dest: 'js/',
expand: true,
flatten: true
},
{
cwd: 'bower_components/bootstrap/dist/fonts/',
expand: true,
src: [
'*'
],
dest: 'fonts/',
flatten: true
}
]
},
jquery_devel: {
files: [
{
cwd: 'bower_components/jquery/dist/',
src: [
'jquery.min.js'
],
expand: true,
dest: "js/",
flatten: true
}
]
},
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
src: [
'images/**'
],
expand: true,
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
},
jqwidgets_devel: {
files: [
{
cwd: 'bower_components/jqwidgets/jqwidgets/',
src: [
'jqx-all.js'
],
expand: true,
dest: 'js/',
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
src: [
'jqx.base.css',
'jqx.darkblue.css'
],
expand: true,
dest: 'css/',
flatten: true
},
{
cwd: 'bower_components/jqwidgets/jqwidgets/styles/',
src: [
'images/**'
],
expand: true,
dest: 'css/'
}
]
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
},
build: {
src: ['js/<%= pkg.name %>.debug.js'],
dest: typo3_js + '<%= pkg.name %>.min.js'
}
},
jshint: {
all: [
'javascript/src/*.js'
]
},
concat: {
debug: {
src: [
'javascript/src/Helper/*.js',
'javascript/src/*.js'
],
dest: 'js/<%= pkg.name %>.debug.js'
}
},
watch: {
scripts: {
files: [
'javascript/src/*.js',
'javascript/src/Helper/*.js'
],
tasks: [ 'default' ],
options: {
spawn: true
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'copy']);