Created
May 13, 2015 14:42
-
-
Save tyteen4a03/4b029481825162728986 to your computer and use it in GitHub Desktop.
XenForo development helper scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// # Globbing | |
// for performance reasons we're only matching one level down: | |
// 'test/spec/{,*/}*.js' | |
// use this if you want to match all subfolders: | |
// 'test/spec/**/*.js' | |
module.exports = function (grunt) { | |
// Load grunt tasks automatically | |
require('load-grunt-tasks')(grunt); | |
// configurable paths | |
var config = { | |
app: 'upload/', | |
dist: '../' | |
}; | |
grunt.initConfig({ | |
config: config, | |
watch: { | |
upload: { | |
files: ['<%= config.app %>/**'], | |
tasks: ['sync:main'] | |
} | |
}, | |
sync: { | |
main: { | |
files: [{ | |
expand: true, | |
cwd: '<%= config.app %>', | |
src: [ | |
'**' | |
], | |
dest: '<%= config.dist %>' | |
}] | |
} | |
}, | |
copy: { | |
dist: { | |
files: [{ | |
expand: true, | |
dot: true, | |
cwd: '<%= config.app %>', | |
dest: '<%= config.dist %>', | |
src: [ | |
'**' | |
] | |
}] | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-newer'); | |
grunt.registerTask('live', [ | |
'build', | |
'watch' | |
]); | |
grunt.registerTask('build', [ | |
'copy:dist' | |
]); | |
grunt.registerTask('default', [ | |
'build' | |
]); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "some-package", | |
"version": "some-version", | |
"repository": { | |
"type": "git", | |
"url": "https://github.com/yourusername/yourrepo" | |
}, | |
"dependencies": {}, | |
"devDependencies": { | |
"grunt": "~0.4.0", | |
"grunt-contrib-copy": "~0.4.0", | |
"grunt-contrib-watch": "^0.6.1", | |
"grunt-newer": "~1.1.0", | |
"grunt-sync": "~0.0.6", | |
"load-grunt-tasks": "^1.0.0" | |
}, | |
"engines": { | |
"node": ">=0.8.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment