Skip to content

Commit

Permalink
Remove Traceur, modify to run in node directly
Browse files Browse the repository at this point in the history
This makes debugging a lot easier

Clean up tests, remove jscs and jshint
  • Loading branch information
dcposch committed Jan 23, 2016
1 parent 0464668 commit be7b0d3
Show file tree
Hide file tree
Showing 30 changed files with 219 additions and 2,633 deletions.
74 changes: 4 additions & 70 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,17 @@
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-mocha-test"); // For server-side testing
grunt.loadNpmTasks("grunt-karma"); // For client-side testing
grunt.loadNpmTasks("grunt-pure-cjs");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-blanket");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-traceur");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-jscs");

grunt.initConfig({
clean: {
all: {
src: ["coverage/", "dist/", "build/"]
}
},
jshint: {
all: {
src: ["Gruntfile.js", "index.js", "src/**/*.js", "test/**/*.js"],
options: {
jshintrc: true
}
}
},
jscs: {
all: {
src: ["index.js", "src/**/*.js", "test/**/*.js"]
}
},
copy: {
coverage: {
src: ["build/test/**"],
Expand All @@ -46,9 +29,6 @@ module.exports = function(grunt) {
mochaTest: {
unitTests: {
src: ["test/unit/**/*.js"],
options: {
require: ["mocha-traceur"]
}
},
integrationTests: {
src: ["test/integration/node/**/*.js"],
Expand All @@ -73,51 +53,6 @@ module.exports = function(grunt) {
}
}
},
pure_cjs: {
dist: {
files: {
"build/axolotl.js": ["build/index.js"]
},
options: {
exports: "axolotl",
external: {
protobufjs: {
global: "dcodeIO.ProtoBuf",
id: "__external_1"
},
"traceur/bin/traceur-runtime": {
amd: "traceur-runtime",
global: "1",
id: "__external_2"
},
"axolotl-crypto": {
global: "axolotlCrypto"
}
}
}
}
},
traceur: {
dist: {
options: {
modules: "commonjs"
},
files: [{
expand: true,
cwd: "src/",
src: ["**/*.js"],
dest: "build/src"
}, {
src: ["index.js"],
dest: "build/index.js"
}, {
expand: true,
cwd: "test/",
src: ["**/*.js"],
dest: "build/test"
}]
}
},
concat: {
dist: {
src: ["banner.js", "build/axolotl.js"],
Expand All @@ -126,11 +61,10 @@ module.exports = function(grunt) {
}
});

grunt.registerTask("coverage", ["traceur", "copy:coverage", "blanket", "mochaTest:coverage"]);
grunt.registerTask("coverage", ["copy:coverage", "blanket", "mochaTest:coverage"]);

grunt.registerTask("check", ["jshint", "jscs"]);
grunt.registerTask("test", ["clean", "check", "mochaTest:unitTests"]);
grunt.registerTask("test", ["clean", "mochaTest:unitTests"]);
grunt.registerTask("default", ["test"]);
grunt.registerTask("dist", ["default", "traceur", "pure_cjs", "concat"]);
grunt.registerTask("dist", ["default", "concat"]);
grunt.registerTask("integration-test", ["dist", "mochaTest:integrationTests", "karma:integrationTests"]);
};
};
Loading

0 comments on commit be7b0d3

Please sign in to comment.