Good day. I am trying to transport typescript.
There is the following gulpfile.js
var gulp = require('gulp'); var typescript = require('gulp-typescript'); var small = require('small').gulp; var sourcemaps = require('gulp-sourcemaps'); var uglify = require('gulp-uglify'); var tsProject = typescript.createProject('lib/tsconfig.json', { typescript: require('typescript') }) gulp.task('compile', function() { return gulp.src('lib/**/*.ts') .pipe(sourcemaps.init()) .pipe(typescript(tsProject)) .pipe(small('index.js', { externalResolve: ['node_modules'], globalModules: { "crypto": { standalone: "undefined" } } })) .pipe(sourcemaps.write('.')) .pipe(gulp.dest('static/scripts')); }); gulp.task('release', ['compile'], function() { return gulp.src('static/scripts/scripts.js') .pipe(uglify()) .pipe(gulp.dest('static/scripts')); }); gulp.task('default', ['compile'], function() { }); in tsconfig.json the following lies:
{ "compilerOptions": { "target": "es5", "module": "commonjs", "experimentalDecorators": true, "emitDecoratorMetadata": true, "lib": ["es2015", "dom"] } } when I run gulp compile I get
typescript.js:11462 }); ^ Syntax error: Unexpected token } I can not understand this error, in the gulpfile itself, of course, everything is fine with the brackets