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

Add GS Extension support #325

Open
mizunashi-mana opened this issue Apr 15, 2016 · 1 comment
Open

Add GS Extension support #325

mizunashi-mana opened this issue Apr 15, 2016 · 1 comment
Labels

Comments

@mizunashi-mana
Copy link

I'm using this plugin to write Google Apps Script. Google Apps Script is perfect compatible with JavaScript. So, we can use typescript for Google Apps Script without any helping. However, this plugin seems to have no supports for gs extension.

{
  "compilerOptions": {
    "module": "amd",
    "target": "es5",
    "noImplicitAny": false,
    "outFile": "out/index.gs",
    "sourceMap": false
  },
  "exclude": [
    "node_modules",
    "out"
  ],
  "compileOnSave": false
}

This is my tsconfig.json, and tsc -p . is running without problems. However, gulp-typescript is not running because this plugin is just supported .js for output script extension, isn't it?

My gulpfile.coffee is:

gulp = require 'gulp'
$    = do require 'gulp-load-plugins'

tsProject = $.typescript.createProject 'tsconfig.json',
  typescript: require 'typescript'

gulp.task 'build', ->
  gulp.src [
    'src/**/*.ts'
    'typings/**/*.ts'
  ], {base: 'src'}
    .pipe $.typescript tsProject
    .js # <- deleted `*.gs`
    .pipe gulp.dest '.'

Are there any solutions? Or, add .gs supports, please.

@ivogabe ivogabe added the Bug label Apr 16, 2016
@ivogabe
Copy link
Owner

ivogabe commented Apr 16, 2016

Thanks for reporting. I've taken a look and tsc does support this, so this is a bug as gulp-typescript should support that too. In the mean time I would advise you to change the file extension to js in your configuration and rename it afterwards to out/index.gs with gulp-rename.

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

2 participants