Skip to content

Commit

Permalink
grunt build
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Sep 15, 2013
1 parent 16c241b commit 457ca84
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 53 deletions.
24 changes: 15 additions & 9 deletions Gruntfile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 48 additions & 40 deletions Gruntfile_org.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,22 @@ module.exports = (grunt) ->
# Project metadata, used by the <banner> directive.
meta:
banner: "/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - " +
"<%= grunt.template.today('yyyy-mm-dd') %>\n" +
"<%= pkg.homepage ? '* ' + pkg.homepage + '\\n' : '' %>" +
"* Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */"
"<%= grunt.template.today('yyyy-mm-dd HH:mm') %>\n" +
"<%= pkg.homepage ? ' * ' + pkg.homepage + '\\n' : '' %>" +
" * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>;" +
" Licensed <%= _.pluck(pkg.licenses, 'type').join(', ') %> */\n"
bumpup:
options:
dateformat: "YYYY-MM-DD HH:mm"
normalize: true
files: ["package.json", "bower.json", "fancytree.jquery.json"]

checkrepo:
beforeBump:
tag:
eq: "<%= pkg.version %>" # Check if highest repo tag == pkg.version
# tagged: false # Require last commit (HEAD) to be tagged
clean: true # // Require repo to be clean (no unstaged changes)
beforeRelease:
tag:
lt: "<%= pkg.version %>" # Check if highest repo tag is lower than pkg.version
Expand All @@ -63,23 +68,24 @@ module.exports = (grunt) ->
core:
options:
stripBanners: true
src: ["<banner:meta.banner>",
src: ["<banner:meta.banner>"
"src/<%= pkg.name %>.js"
]
dest: "build/<%= pkg.name %>.js"
all:
options:
stripBanners: true
src: ["<%= meta.banner %>",
"src/jquery.fancytree.js",
"src/jquery.fancytree.columnview.js",
"src/jquery.fancytree.dnd.js",
"src/jquery.fancytree.filter.js",
"src/jquery.fancytree.menu.js",
"src/jquery.fancytree.persist.js",
"src/jquery.fancytree.table.js",
"src/jquery.fancytree.themeroller.js"
]
src: [
"<%= meta.banner %>"
"src/jquery.fancytree.js"
"src/jquery.fancytree.columnview.js"
"src/jquery.fancytree.dnd.js"
"src/jquery.fancytree.filter.js"
"src/jquery.fancytree.menu.js"
"src/jquery.fancytree.persist.js"
"src/jquery.fancytree.table.js"
"src/jquery.fancytree.themeroller.js"
]
dest: "build/<%= pkg.name %>-all.js"

connect:
Expand All @@ -94,7 +100,7 @@ module.exports = (grunt) ->
files: [{
expand: true # required for cwd
cwd: "src/"
src: ["skin-**/*", "*.txt"]
src: ["skin-**/*.{css,gif,png}", "*.txt"]
dest: "build/"
}, {
src: ["*.txt", "*.md"]
Expand Down Expand Up @@ -139,27 +145,28 @@ module.exports = (grunt) ->
all: ["demo/**/*.html", "doc/**/*.html", "test/**/*.html"]

jsdoc:
build:
src: ["src/*.js", "doc/README.md"]
# http://usejsdoc.org/about-configuring-jsdoc.html#example
options:
destination: "doc/jsdoc_grunt"
build:
src: ["src/*.js", "doc/README.md"]
# http://usejsdoc.org/about-configuring-jsdoc.html#example
options:
destination: "doc/jsdoc_grunt"
# template: "bin/jsdoc3-moogle",
verbose: true
verbose: true

jshint:
options:
# Linting according to http://contribute.jquery.org/style-guide/js/
jshintrc: ".jshintrc"
beforeconcat: [
"Gruntfile.js",
"src/*.js",
"3rd-party/**/jquery.fancytree.*.js",
"test/unit/*.js"
]
afterconcat: ["<%= concat.core.dest %>",
"<%= concat.all.dest %>"
]
options:
# Linting according to http://contribute.jquery.org/style-guide/js/
jshintrc: ".jshintrc"
beforeConcat: [
"Gruntfile.js"
"src/*.js"
"3rd-party/**/jquery.fancytree.*.js"
"test/unit/*.js"
]
afterConcat: [
"<%= concat.core.dest %>"
"<%= concat.all.dest %>"
]

less:
development:
Expand Down Expand Up @@ -279,15 +286,15 @@ module.exports = (grunt) ->

grunt.registerTask "server", ["connect:demo"]
grunt.registerTask "test", [
"jshint:beforeconcat",
"jshint:beforeConcat",
# "csslint",
"qunit:develop"
]
# grunt.registerTask("makejsdoc", ["jsdoc"]
grunt.registerTask "travis", ["test"]
grunt.registerTask "default", ["test"]
grunt.registerTask "bump", [
"checkrepo:beforeRelease"
"checkrepo:beforeBump"
"bumpup:build"
"updatePkg"
# "replace:bump"
Expand All @@ -300,15 +307,16 @@ module.exports = (grunt) ->
"concat"
# "cssmin:build"
"replace:build"
"jshint:afterconcat"
"jshint:afterConcat"
"uglify"
"qunit:build"
"compress:build"
# "clean:build"
"tagrelease"
]
grunt.registerTask "release", [
"bumpup:build",
"bump"
"build"
"tagrelease"
# "clean:build"
]
grunt.registerTask "upload", [
"build"
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.fancytree",
"version": "2.0.0-1",
"version": "2.0.0-2",
"dependencies": {
"jquery": ">=1.5",
"jquery-ui": ">=1.8.6"
Expand Down
2 changes: 1 addition & 1 deletion fancytree.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fancytree",
"version": "2.0.0-1",
"version": "2.0.0-2",
"title": "Fancytree",
"description": "Fancytree is a JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop, and lazy loading.",
"homepage": "https://github.com/mar10/fancytree",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@
"scripts": {
"test": "grunt ci --verbose"
}
}
}
2 changes: 1 addition & 1 deletion src/skin-win8-less/ui-fancytree.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
height: 100%;
}
/*------------------------------------------------------------------------------
* UL/LI
* UL/LI
*----------------------------------------------------------------------------*/
ul.fancytree-container ul {
padding: 0 0 0 16px;
Expand Down

0 comments on commit 457ca84

Please sign in to comment.