|
diff --git a/Rakefile b/Rakefile |
|
index cdb1d78..2b64fba 100644 |
|
--- a/Rakefile |
|
+++ b/Rakefile |
|
@@ -40,6 +40,10 @@ end |
|
|
|
desc 'Clean Generated Files' |
|
task :clean do |
|
+ # Win32 rmdir removes Windows symlinks safely. |
|
+ 'css font img js'.split.each do |dir| |
|
+ File.directory?("#{BUILD_DIR}/docs/#{dir}") && %x(rmdir "#{BUILD_DIR}\\docs\\#{dir}") |
|
+ end |
|
FileUtils.rm_r(BUILD_DIR, :force => true) |
|
FileUtils.mkdir(BUILD_DIR) |
|
FileUtils.rm_r('test_out', :force => true) |
|
@@ -107,10 +111,11 @@ task :minify => [:init, :concat, :concat_scenario] do |
|
'angular-bootstrap.js', |
|
'angular-bootstrap-prettify.js' |
|
].each do |file| |
|
- fork { closure_compile(file) } |
|
+ # Win32 incompatible: fork { closure_compile(file) } |
|
+ closure_compile(file) |
|
end |
|
|
|
- Process.waitall |
|
+ # Win32 incompatible: Process.waitall # forks |
|
end |
|
|
|
|
|
@@ -152,9 +157,13 @@ task :package => [:clean, :minify, :version, :docs] do |
|
zip_dir = "angular-#{NG_VERSION.full}" |
|
zip_file = "#{zip_dir}.zip" |
|
|
|
- FileUtils.ln_s BUILD_DIR, zip_dir |
|
+ # Win32 incompatible: FileUtils.ln_s BUILD_DIR, zip_dir |
|
+ # Win32 mklink needs to run as Administrator! |
|
+ %x(cmd /cmklink /d #{zip_dir} #{BUILD_DIR}) |
|
%x(zip -r #{zip_file} #{zip_dir}) |
|
- FileUtils.rm zip_dir |
|
+ # Win32 incompatible: FileUtils.rm zip_dir |
|
+ # Win32 rmdir removes Windows symlinks safely. |
|
+ %x(rmdir #{zip_dir}) |
|
|
|
FileUtils.mv zip_file, path_to(zip_file) |
|
|
|
diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js |
|
index 62d22b1..f8d593a 100755 |
|
--- a/docs/src/gen-docs.js |
|
+++ b/docs/src/gen-docs.js |
|
@@ -42,10 +42,10 @@ writer.makeDir('build/docs/', true).then(function() { |
|
function writeTheRest(writesFuture) { |
|
var metadata = ngdoc.metadata(docs); |
|
|
|
- writesFuture.push(writer.symlinkTemplate('css')); |
|
- writesFuture.push(writer.symlinkTemplate('font')); |
|
- writesFuture.push(writer.symlink('../../docs/img', 'build/docs/img')); |
|
- writesFuture.push(writer.symlinkTemplate('js')); |
|
+ writesFuture.push(writer.symlinkTemplate('css', 'dir')); |
|
+ writesFuture.push(writer.symlinkTemplate('font', 'dir')); |
|
+ writesFuture.push(writer.symlink('../../docs/img', 'build/docs/img', 'dir')); |
|
+ writesFuture.push(writer.symlinkTemplate('js', 'dir')); |
|
|
|
var manifest = 'manifest="/build/docs/appcache.manifest"'; |
|
|
|
@@ -89,4 +89,3 @@ function writeTheRest(writesFuture) { |
|
function now() { return new Date().getTime(); } |
|
|
|
function noop() {}; |
|
- |
|
diff --git a/docs/src/writer.js b/docs/src/writer.js |
|
index 450f7cb..b6403e3 100644 |
|
--- a/docs/src/writer.js |
|
+++ b/docs/src/writer.js |
|
@@ -61,22 +61,21 @@ exports.copy = function(from, to, transform) { |
|
|
|
|
|
exports.symlink = symlink; |
|
-function symlink(from, to) { |
|
+function symlink(from, to, type) { |
|
return qfs.exists(to).then(function(exists) { |
|
if (!exists) { |
|
- return qfs.symbolicLink(to, from); |
|
+ return qfs.symbolicLink(to, from, type); |
|
} |
|
}); |
|
} |
|
|
|
|
|
exports.symlinkTemplate = symlinkTemplate; |
|
-function symlinkTemplate(filename) { |
|
+function symlinkTemplate(filename, type) { |
|
var dest = OUTPUT_DIR + filename, |
|
dirDepth = dest.split('/').length, |
|
src = Array(dirDepth).join('../') + 'docs/src/templates/' + filename; |
|
- |
|
- return symlink(src, dest); |
|
+ return symlink(src, dest, type); |
|
} |