-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single output file not working. #257
Comments
What version of grunt-ts do you have? |
4.1.2 |
I just created a brand new folder, did This is the entirety of the Gruntfile.js I just used to test: module.exports = function(grunt) {
grunt.initConfig({
ts: {
options: {
module: 'commonjs',
fast: 'never',
target: 'es5',
declaration: false,
sourcemap: false,
removeComments: true,
noImplicitAny: false
},
main: {
src: ['src/**/*.ts', 'lib/**/*.ts'],
out: 'build/main.js'
}
}
});
grunt.loadNpmTasks("grunt-ts");
grunt.registerTask("default", ["ts"]);
}; Here is the relevant part of the output when I run
Would you please run |
I've modified my folder layout slightly since then, but I'm still getting essentially the same thing. Now all of my source files are in one folder, but I still get a blank output file, and individual compiled files in the source directory.
|
Ah ok I know what this is. TypeScript doesn't allow external modules to be concatenated with We should probably provide a warning if a module system is used with |
Ah okay, thanks! |
Check out Browserify or WebPack to do the concatenation. Thank you for the report. |
Shouldn't be this working now with module |
They are adding concatenation of AMD and SystemJS modules to TypeScript 1.8 I think. Tsc 1.7 and lower can't do it yet. We plan to remove the warning in a future version. |
ah ok thx for the information :) |
I'm having an issue with the --out parameter option that's supposed to output everything into one file.
In my
Gruntfile.js
, ingrunt.initConfig
I have this configuration:So it should output to
build/main.js
right? But instead all I get is a blank file calledmain.js
and each individual file gets compiled in its source folder. For example, I have these files:and I end up with this after compiling (and some cleaning):
Something I'm doing wrong?
The text was updated successfully, but these errors were encountered: