I am using the gulp.js task manager in my AngularJS and Django project.
Due to the configuration of my git repository, the static directory, called assets
is not controlled, so I have a directory, sources
, where the source files are.
I am doing a task to copy I am files (initially unprocessed, compress, etc.) to the assets
folder doing this:
// Configuración
var config = {
sourcesDir: './sources',
bowerDir: './bower_components'
}
// tarea fuentes
gulp.task('fuentes', function(){
gulp.src([config.sourcesDir + '/css/styles.css'])
.pipe(gulp.dest('./assets/css'));
});
That is, a single file moves from the origin src
to destination dest
without problems.
My problem is that I'm doing the services of angular with the same Django structure and I have several directories with one or more files inside a javascript folder, like this:
js
├── auth
├── cmi.js
├── indicadores
│ ├── encuestas
│ └── productividad
├── inecap
└── metas
Question: How do I set my fuentes
task to copy the js
files and the source structure [config.sourcesDir + '/js']
to destination ./assets/js
?