[Pkg-mozext-commits] [all-in-one-sidebar] 12/49: Minor: add grunt
David Prévot
taffit at moszumanska.debian.org
Fri Sep 19 16:46:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository all-in-one-sidebar.
commit 5bfa4222394e490210f32fcb852591f7572f87df
Author: Ingo Wennemaring <github at addonlab.com>
Date: Sat Apr 19 15:01:34 2014 +0200
Minor: add grunt
---
.gitignore | 1 +
Gruntfile.coffee | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
package.json | 16 ++++++++++
3 files changed, 113 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..2ccbe46
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/node_modules/
diff --git a/Gruntfile.coffee b/Gruntfile.coffee
new file mode 100644
index 0000000..87fb668
--- /dev/null
+++ b/Gruntfile.coffee
@@ -0,0 +1,96 @@
+module.exports = (grunt) ->
+
+ # loads all npm tasks so we don't have to run "grunt.loadNpmTasks()" for every single task
+ require('load-grunt-tasks')(grunt);
+
+ grunt.initConfig
+ dir_css: 'skin/css/'
+ dir_scss: 'skin/scss'
+ dir_js: 'content'
+
+
+ # set up sass-compilation
+ # https://github.com/sindresorhus/grunt-sass
+ sass:
+ build:
+ options:
+ outputStyle: 'nested'
+ sourceComments: 'none'
+ trace: true
+ files: [
+ expand: true
+ cwd: '<%= dir_scss %>/'
+ src: ['**/*.scss']
+ ext: '.css'
+ dest: '<%= dir_css %>/'
+ ]
+ deploy:
+ options:
+ outputStyle: 'compressed'
+ sourceComments: 'none'
+ trace: true
+ files: [
+ expand: true
+ cwd: '<%= dir_scss %>/'
+ src: ['**/*.scss']
+ ext: '.css'
+ dest: '<%= dir_css %>/'
+ ]
+
+
+ # Run JSHint on self-authored JavaScript-Files
+ # …but don't run on external libraries because the
+ # performance impact would be too high to let jshint run through jQuery…
+ # https://github.com/gruntjs/grunt-contrib-jshint
+ jshint:
+ files: ['<%= dir_js %>/*.js']
+ options:
+ globals:
+ console: true
+ module: true
+
+
+ # Watch JS and SCSS Files to perform compilation and livereloading on change
+ # https://github.com/gruntjs/grunt-contrib-watch
+ watch:
+ sass:
+ files: ['<%= dir_scss %>/**']
+ tasks: ['css-build']
+
+ #js:
+ # files: ['<%= jshint.files %>']
+ # tasks: ['js-build']
+
+ options:
+ dateFormat: (time) ->
+ grunt.log.writeln 'The watch finished in ' + time + 's at ' + (new Date().toString())
+ grunt.log.writeln 'Waiting for more changes...'
+
+
+ # Automatic Notifications when Grunt tasks fail or finish
+ # https://github.com/dylang/grunt-notify
+ notify:
+ js:
+ options:
+ message: 'JS - Mission accomplished!'
+ css:
+ options:
+ message: 'CSS - Mission accomplished!'
+ deploy:
+ options:
+ message: 'DEPLOY - Mission accomplished!'
+
+
+ # register tasks
+ grunt.registerTask 'default', ['watch']
+
+ #grunt.registerTask 'js-build', ['newer:jshint', 'notify:js']
+ #grunt.registerTask 'js-deploy', ['jshint']
+
+ grunt.registerTask 'css-build', ['newer:sass:build', 'notify:css']
+ grunt.registerTask 'css-deploy', ['sass:deploy']
+
+ #grunt.registerTask 'build', ['css-build', 'js-build']
+ #grunt.registerTask 'deploy', ['css-deploy', 'js-deploy', 'notify:deploy']
+ grunt.registerTask 'build', ['css-build']
+ grunt.registerTask 'deploy', ['css-deploy', 'notify:deploy']
\ No newline at end of file
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f4b2ba1
--- /dev/null
+++ b/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "AiOS",
+ "version": "1.0.0",
+ "dependencies": {
+ "grunt": "~0.4.4",
+ "load-grunt-tasks": "~0.4.0"
+ },
+ "devDependencies": {
+ "grunt-sass": "~0.12.1",
+ "grunt-newer": "~0.7.0",
+ "grunt-notify": "~0.2.20",
+ "grunt-contrib-watch": "~0.6.1",
+ "grunt-contrib-jshint": "~0.9.2"
+ }
+
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/all-in-one-sidebar.git
More information about the Pkg-mozext-commits
mailing list