Skip to content
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

Compiling into a single file not possible with the files Array/Object #251

Closed
sascha-sphw opened this issue May 27, 2015 · 6 comments
Closed
Labels

Comments

@sascha-sphw
Copy link
Contributor

Rather this

grunt.initConfig({
  ts: {
    compileTwoSetsOfFilesUsingArrayStyle: {
      // This will run tsc twice.  The first time, the result of the 'files1/**/*.ts' glob will be
      // passed to tsc with the --out switch as 'out/ArrayStyle/1.js'.
      // see https://github.com/gruntjs/grunt-docs/blob/master/Configuring-tasks.md#files-array-format
      files: [{ src: ['files1/**/*.ts'], dest: 'out/ArrayStyle/1.js' },
              { src: ['files2/**/*.ts'], dest: 'out/ArrayStyle/2.js' }],
      options: {
        fast: 'never'
      }
    },

nor this

compileTwoSetsOfFilesUsingObjectStyle: {
      // This will run tsc twice.  The first time, the result of the 'files1/**/*.ts' glob will be
      // passed to tsc with the --out switch as 'out/ObjectStyle/1.js'.
      // see https://github.com/gruntjs/grunt-docs/blob/master/Configuring-tasks.md#files-object-format
      files: {
        'out/ObjectStyle/1.js': ['files1/**/*.ts'],
        'out/ObjectStyle/2.js': ['files2/**/*.ts']
      },
      options: {
        fast: 'never'
      }

is setting the -out switch for the compiler as in the description explained.
Only if I'm using the options out it is working, but then I would have to setup one subtask per file...

Bests,
Sascha

@nycdotnet
Copy link
Contributor

You're absolutely correct. This is broken and our tests didn't pick it up. Very sorry - will resolve ASAP.

@nycdotnet nycdotnet added the bug label May 27, 2015
@nycdotnet
Copy link
Contributor

I just pushed version 4.1.1 - will you check it out and let me know if you agree that this is resolved. Thanks for the report and sorry for the regression.

@seanmailander
Copy link

The changes in 97ad399 broke the tsc command when paths include spaces.
For our configuration:

  • Previously utilised target.out, which is a relative path
  • Now uses outFile, which is absolute

Assume something like this is needed:

outFile = '"' + path.resolve(outFile) + '"';

nycdotnet added a commit that referenced this issue Jun 4, 2015
@nycdotnet
Copy link
Contributor

@seanmailander - thanks for the report. I just pushed 4.1.2 to npm - would you please take a look?

@seanmailander
Copy link

@nycdotnet looks-great-runs-great, thanks!

@nycdotnet
Copy link
Contributor

Glad to hear it.

@Linowitch - thank you for the original report. I think things are fixed so I am going to close this issue. Please let me know if it is not fixed for you. Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants