mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
more experiments for mixing javascript and typescript
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user