Croak example project structure and configuration scenario
$HOME
├── .croakrc
└── workspace
├── builder
│ ├── tasks
│ ├── node_modules
│ ├── .jshintrc
│ ├── Gruntfile.js
│ └── package.json
│
├── repo1
│ ├── scripts
│ ├── images
│ ├── styles
│ ├── html
│ ├── .croakrc
│ └── bower.json
│
└── repo2
├── scripts
├── images
├── styles
├── html
├── Croakfile.js
└── bower.json
[my-project]
gruntfile = ${HOME}/workspace/builder/Gruntfile.js
extend = true
module.exports = function (grunt) {
grunt.initConfig({
clean: ['<%= croak.cwd %>/.tmp', '.tmp'],
copy: {
html: {
expand: true,
cwd: '<%= croak.cwd %>',
src: [
'html/**/*.html',
'scripts/**/*.js',
'styles/**/*.js',
'images/**'
],
dest: '<%= croak.cwd %>/.tmp',
filter: 'isFile'
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
files: {
cwd: '<%= croak.cwd %>',
src: ['scripts/**/*.js']
}
},
connect: {
demo: {
options: {
port: 9000,
base: '<%= croak.cwd %>/.tmp'
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('server', ['clean', 'jshint', 'copy', 'connect']);
};
$default = my-project
module.exports = function (croak) {
croak.initConfig({
connect: {
images: {
options: {
port: 9001,
base: '<%= croak.cwd %>/images'
}
}
}
});
};