[Finishes #52810607] separate out the build standalone tasks
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ pkg/*
|
|||||||
.sass-cache/*
|
.sass-cache/*
|
||||||
src/html/.sass-cache/*
|
src/html/.sass-cache/*
|
||||||
node_modules/
|
node_modules/
|
||||||
|
*.swp
|
||||||
|
|||||||
20
Gruntfile.js
20
Gruntfile.js
@@ -15,6 +15,8 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-compass');
|
grunt.loadNpmTasks('grunt-contrib-compass');
|
||||||
grunt.loadNpmTasks('grunt-contrib-compress');
|
grunt.loadNpmTasks('grunt-contrib-compress');
|
||||||
|
|
||||||
|
grunt.loadTasks('grunt/tasks');
|
||||||
|
|
||||||
grunt.registerTask('default', ['jshint:all']);
|
grunt.registerTask('default', ['jshint:all']);
|
||||||
|
|
||||||
var version = require('./grunt/tasks/version.js');
|
var version = require('./grunt/tasks/version.js');
|
||||||
@@ -35,24 +37,6 @@ module.exports = function(grunt) {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
grunt.registerTask("build:compileSpecRunner",
|
|
||||||
"Processes the spec runner template and writes to a tmp file",
|
|
||||||
standaloneBuilder.compileSpecRunner
|
|
||||||
);
|
|
||||||
|
|
||||||
grunt.registerTask("build:cleanSpecRunner",
|
|
||||||
"Deletes the tmp spec runner file",
|
|
||||||
standaloneBuilder.cleanSpecRunner
|
|
||||||
);
|
|
||||||
|
|
||||||
grunt.registerTask("buildStandaloneDist",
|
|
||||||
"Builds a standalone distribution",
|
|
||||||
[
|
|
||||||
"build:compileSpecRunner",
|
|
||||||
"compress:standalone",
|
|
||||||
"build:cleanSpecRunner"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
var spec = require('./grunt/tasks/spec.js');
|
var spec = require('./grunt/tasks/spec.js');
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,29 @@ var grunt = require("grunt");
|
|||||||
|
|
||||||
function standaloneTmpDir(path) { return "dist/tmp/" + path; }
|
function standaloneTmpDir(path) { return "dist/tmp/" + path; }
|
||||||
|
|
||||||
module.exports = {
|
grunt.registerTask("build:compileSpecRunner",
|
||||||
compileSpecRunner: function() {
|
"Processes the spec runner template and writes to a tmp file",
|
||||||
var runnerHtml = grunt.template.process(
|
function() {
|
||||||
grunt.file.read("grunt/templates/SpecRunner.html.jst"),
|
var runnerHtml = grunt.template.process(
|
||||||
{ data: { jasmineVersion: global.jasmineVersion }});
|
grunt.file.read("grunt/templates/SpecRunner.html.jst"),
|
||||||
|
{ data: { jasmineVersion: global.jasmineVersion }});
|
||||||
|
|
||||||
grunt.file.write(standaloneTmpDir("SpecRunner.html"), runnerHtml);
|
grunt.file.write(standaloneTmpDir("SpecRunner.html"), runnerHtml);
|
||||||
},
|
}
|
||||||
|
);
|
||||||
|
|
||||||
cleanSpecRunner: function() {
|
grunt.registerTask("build:cleanSpecRunner",
|
||||||
grunt.file.delete(standaloneTmpDir(""));
|
"Deletes the tmp spec runner file",
|
||||||
}
|
function() {
|
||||||
};
|
grunt.file.delete(standaloneTmpDir(""));
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
grunt.registerTask("buildStandaloneDist",
|
||||||
|
"Builds a standalone distribution",
|
||||||
|
[
|
||||||
|
"build:compileSpecRunner",
|
||||||
|
"compress:standalone",
|
||||||
|
"build:cleanSpecRunner"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user