more experiments for mixing javascript and typescript

This commit is contained in:
Torkel Ödegaard
2015-09-09 19:34:24 +02:00
parent 005e1e002b
commit a8197df1c1
16 changed files with 80 additions and 75 deletions

View File

@@ -4,8 +4,16 @@ module.exports = function(config) {
everything_but_less_to_temp: {
cwd: '<%= srcDir %>',
expand: true,
src: ['**/*', '!**/*.less', '!config.js'],
src: ['**/*', '!**/*.less'],
dest: '<%= tempDir %>'
},
app_gen_build: {
cwd: '<%= srcDir %>/app',
expand: true,
src: ['**/*.js', '**/*.html'],
dest: '<%= srcDir %>/app_gen'
}
};
};

View File

@@ -2,16 +2,29 @@ module.exports = function() {
'use strict';
return {
base: {
build: {
src: ['public/app/**/*.ts'],
dest: '',
dest: 'public/app_gen',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
keepDirectoryHierarchy: true,
rootDir: 'public/app',
declaration: true,
watch: true,
sourceMap: true,
generateTsConfig: true,
}
},
watch: {
src: ['public/app/**/*.ts'],
dest: 'public/app_gen',
options: {
module: 'amd', //or commonjs
target: 'es5', //or es3
rootDir: 'public/app',
declaration: true,
sourceMap: true,
watch: true,
generateTsConfig: true,
}
}
};

View File

@@ -6,6 +6,23 @@ module.exports = function(config) {
options: {
spawn: false
}
},
app_gen: {
files: ['<%= srcDir %>/app/**/*.js', '<%= srcDir %>/app/**/*.html'],
tasks: ['copy:app_gen_build'],
options: {
spawn: false
}
},
typescript: {
files: ['<%= srcDir %>/app/**/*.ts'],
tasks: ['typescript:build'],
options: {
spawn: false
}
}
};
};