-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from brianjmiller/master
Grunt for build
- Loading branch information
Showing
33 changed files
with
615 additions
and
724 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ src | |
test | ||
doc | ||
vendor | ||
build.js | ||
build/.empty | ||
build/tincan-min.map | ||
.travis.yml | ||
yuidoc.json | ||
bower.json |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
language: node_js | ||
node_js: | ||
- "0.10" | ||
before_install: npm install -g grunt-cli | ||
install: npm install | ||
before_script: grunt build |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
/*global module:false*/ | ||
module.exports = function(grunt) { | ||
"use strict"; | ||
var coreFileList = [ | ||
"vendor/cryptojs-v3.0.2/rollups/sha1.js", | ||
"vendor/cryptojs-v3.0.2/components/enc-base64.js", | ||
"src/TinCan.js", | ||
"src/Utils.js", | ||
"src/LRS.js", | ||
"src/AgentAccount.js", | ||
"src/Agent.js", | ||
"src/Group.js", | ||
"src/Verb.js", | ||
"src/Result.js", | ||
"src/Score.js", | ||
"src/InteractionComponent.js", | ||
"src/ActivityDefinition.js", | ||
"src/Activity.js", | ||
"src/ContextActivities.js", | ||
"src/Context.js", | ||
"src/StatementRef.js", | ||
"src/SubStatement.js", | ||
"src/Statement.js", | ||
"src/StatementsResult.js", | ||
"src/State.js", | ||
"src/ActivityProfile.js", | ||
"src/AgentProfile.js" | ||
], | ||
browserFileList = coreFileList.slice(), | ||
nodeFileList = coreFileList.slice(); | ||
|
||
browserFileList.push( | ||
"src/Environment/Browser.js" | ||
); | ||
nodeFileList.push( | ||
"src/Environment/Node.js" | ||
); | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON("package.json"), | ||
|
||
watch: { | ||
files: ["src/**/*.js"], | ||
tasks: ["build"], | ||
options: { | ||
interrupt: true | ||
} | ||
}, | ||
|
||
jshint: { | ||
all: ["Gruntfile.js", "src/**/*.js"], | ||
options: { | ||
bitwise: true, | ||
es3: true, // must use ES3 syntax (support for IE6/7/8/9) | ||
curly: true, // Always use curlys {} | ||
eqeqeq: true, // No more == for you, === only | ||
forin: true, | ||
freeze: true, | ||
immed: true, // prohibits the use of immediate function invocations without wrapping them in parentheses | ||
indent: 4, // force tab width of 4 spaces | ||
latedef: true, // no setting variables before they are defined | ||
newcap: true, // Always call constructors with a Cap | ||
noarg: true, // prohibits arguments.caller and arguments.callee | ||
noempty: true, // prevent empty blocks | ||
nonbsp: true, | ||
nonew: true, // don't allow non-captured constructor use | ||
plusplus: true, // prevent use of ++ and -- | ||
quotmark: "double", // require strings to be double quoted | ||
undef: true, // prohibits the use of explicitly undeclared variables | ||
unused: true, // Warns on unused variables | ||
trailing: true, // Prohibits trailing whitespace | ||
maxdepth: 6, // Max nesting of methods 6 layers deep | ||
onevar: true, | ||
strict: true, | ||
globals: { | ||
TinCan: true | ||
} | ||
} | ||
}, | ||
|
||
concat: { | ||
dist: { | ||
files: { | ||
"build/tincan.js": browserFileList, | ||
"build/tincan-node.js": nodeFileList | ||
}, | ||
nonull: true | ||
} | ||
}, | ||
|
||
uglify: { | ||
dist: { | ||
files: { | ||
"build/tincan-min.js": ["build/tincan.js"] | ||
}, | ||
options: { | ||
sourceMap: true | ||
} | ||
} | ||
} | ||
}); | ||
|
||
// Load Tasks | ||
grunt.loadNpmTasks("grunt-contrib-watch"); | ||
grunt.loadNpmTasks("grunt-contrib-concat"); | ||
grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
grunt.loadNpmTasks("grunt-contrib-uglify"); | ||
|
||
// Define tasks | ||
grunt.registerTask("build", ["jshint", "concat", "uglify"]); | ||
grunt.registerTask("default", "build"); | ||
}; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "tincan", | ||
"version": "0.22.2", | ||
"version": "0.30.0", | ||
"homepage": "http://rusticisoftware.github.com/TinCanJS/", | ||
"authors": [ | ||
"Brian J. Miller <[email protected]>" | ||
|
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.