mirror of
https://github.com/seigler/fhqwhgads
synced 2025-07-26 22:46:08 +00:00
added node and grunt stuff, improved cursor and selection handling
This commit is contained in:
parent
e226475f42
commit
edae59d5e7
23 changed files with 487 additions and 114 deletions
129
Gruntfile.js
Normal file
129
Gruntfile.js
Normal file
|
@ -0,0 +1,129 @@
|
|||
module.exports = function (grunt) {
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
copy: {
|
||||
build: {
|
||||
cwd: 'src',
|
||||
src: [
|
||||
'**',
|
||||
'!**/*.less',
|
||||
'!**/*.css',
|
||||
'!**/*.js',
|
||||
'!**/*.xcf'
|
||||
],
|
||||
dest: 'build',
|
||||
expand: true
|
||||
}
|
||||
},
|
||||
|
||||
clean: {
|
||||
build: {
|
||||
src: [ 'build' ]
|
||||
}
|
||||
},
|
||||
|
||||
cleanempty: {
|
||||
build: {
|
||||
options: {
|
||||
files: false,
|
||||
folders: true
|
||||
},
|
||||
src: [ 'build/**/*' ]
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
build: {
|
||||
options: {
|
||||
compress: false,
|
||||
beautify: true,
|
||||
mangle: false
|
||||
},
|
||||
files: {
|
||||
'build/application.js': [ 'src/**/*.js', '!src/assets/javascript/index.js', 'src/assets/javascript/index.js' ]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
less: {
|
||||
build: {
|
||||
options: {
|
||||
relativeUrls: true
|
||||
},
|
||||
files: {
|
||||
'build/compiled-styles.css': 'src/site.less'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
build: {
|
||||
expand: true,
|
||||
src: [ 'build/**/*.css' ]
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
options: {
|
||||
livereload: true
|
||||
},
|
||||
stylesheets: {
|
||||
files: ['src/**/*.less', 'src/**/*.css'],
|
||||
tasks: [ 'stylesheets' ]
|
||||
},
|
||||
scripts: {
|
||||
files: 'src/**/*.js',
|
||||
tasks: [ 'scripts' ]
|
||||
},
|
||||
copy: {
|
||||
files: [ 'src/**', '!src/**/*.less', '!src/**/*.css', '!src/**/*.js' ],
|
||||
tasks: [ 'copy', 'cleanempty' ]
|
||||
}
|
||||
},
|
||||
|
||||
php: {
|
||||
watch: {
|
||||
options: {
|
||||
hostname: '0.0.0.0',
|
||||
port: 1337,
|
||||
base: 'build'
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Load plugins
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-cleanempty');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-autoprefixer');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-php');
|
||||
|
||||
// Default task(s).
|
||||
grunt.registerTask(
|
||||
'default',
|
||||
'Default is to build everything, then watch for changes',
|
||||
['build', 'php:watch', 'watch']
|
||||
);
|
||||
grunt.registerTask(
|
||||
'stylesheets',
|
||||
'Compiles the stylesheets.',
|
||||
[ 'less', 'autoprefixer' ]
|
||||
);
|
||||
grunt.registerTask(
|
||||
'scripts',
|
||||
'Compiles the scripts.',
|
||||
[ 'uglify' ]
|
||||
);
|
||||
grunt.registerTask(
|
||||
'build',
|
||||
'Compiles all of the assets and copies the files to the build directory.',
|
||||
[ 'clean', 'copy', 'stylesheets', 'scripts', 'cleanempty' ]
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue