gulp-traceur

Using ES6 modules with traceur in single build file

人走茶凉 提交于 2020-01-23 10:11:18
问题 I just have a simple question cant get in any place, heve been googling for it all morning. There is no much info about traceur and when there is is not so clear, at least to me. How should be implemented the ES6 modules when im transpiling with traceur a single output file and using it in the browser with traceur-runtime? import and export keeps getting Unexpected token. I am using gulp-traceur and tried already all the modules options //'commonjs' //'amd', 'commonjs', 'instantiate', 'inline

angularjs http interceptor class (ES6) loses binding to 'this'

孤街浪徒 提交于 2019-12-20 11:51:53
问题 I am building and AngularJS app using ES6 classes with traceur transpiling to ES5 in AMD format. in my module I import the interceptor class and register it as a service, and then register this service with the $httpProvider.interceptors in module.config: var commonModule = angular.module(moduleName, [constants.name]); import authenticationInterceptor from './authentication/authentication.interceptor'; commonModule.service('authenticationInterceptor', authenticationInterceptor); commonModule

angularjs http interceptor class (ES6) loses binding to 'this'

你离开我真会死。 提交于 2019-12-20 11:51:09
问题 I am building and AngularJS app using ES6 classes with traceur transpiling to ES5 in AMD format. in my module I import the interceptor class and register it as a service, and then register this service with the $httpProvider.interceptors in module.config: var commonModule = angular.module(moduleName, [constants.name]); import authenticationInterceptor from './authentication/authentication.interceptor'; commonModule.service('authenticationInterceptor', authenticationInterceptor); commonModule

Using ES6 modules with traceur in single build file

我与影子孤独终老i 提交于 2019-12-05 22:42:27
I just have a simple question cant get in any place, heve been googling for it all morning. There is no much info about traceur and when there is is not so clear, at least to me. How should be implemented the ES6 modules when im transpiling with traceur a single output file and using it in the browser with traceur-runtime? import and export keeps getting Unexpected token. I am using gulp-traceur and tried already all the modules options //'commonjs' //'amd', 'commonjs', 'instantiate', 'inline', 'register'. One doubt I have is that I keep finding answers about commonjs, but my idea of using ES6

angularjs http interceptor class (ES6) loses binding to 'this'

自闭症网瘾萝莉.ら 提交于 2019-12-03 01:55:59
I am building and AngularJS app using ES6 classes with traceur transpiling to ES5 in AMD format. in my module I import the interceptor class and register it as a service, and then register this service with the $httpProvider.interceptors in module.config: var commonModule = angular.module(moduleName, [constants.name]); import authenticationInterceptor from './authentication/authentication.interceptor'; commonModule.service('authenticationInterceptor', authenticationInterceptor); commonModule.config( $httpProvider => { $httpProvider.interceptors.push('authenticationInterceptor'); }); My