简体   繁体   English

一段时间前如何在装有gulp-angular的项目中添加Babel预处理器?

[英]How to add the Babel preprocessor on a project scaffolded with gulp-angular some time ago?

Basically I'm working on a project that was created using Yeoman with generator-gulp-angular. 基本上,我正在使用使用Yeoman和generator-gulp-angular创建的项目。 At that time we didn't add Babel or any other preprocessor yet now I'm trying to do just this. 那时我们还没有添加Babel或任何其他预处理器,但是现在我正在尝试这样做。 Should this be done somehow manually or there's a more sane way? 应该以手动方式完成此操作,还是采用更合理的方法?

I am trying to do the same thing. 我正在尝试做同样的事情。

The best option would be to start a new scaffolding with the options that you now realize are the ones you want, and rebuild the app into this project, but nobody ever has enough time to do that. 最好的选择是使用您现在意识到要使用的选项来启动新的脚手架,然后将应用程序重新构建到该项目中,但是没有人有足够的时间来执行此操作。 So that's probably not really a possibility for you. 因此,对于您来说,这可能不是真的。

Another option is to set up a new gulp-angular project, using the new options (babel etc.), and compare it side-by-side with your "legacy" project. 另一种选择是使用新选项(babel等)来建立一个新的gulp-angular项目,并将其与您的“ legacy”项目并排比较。 Copy in any build-related files, and then see what's changed using version control. 复制任何与构建相关的文件,然后使用版本控制查看更改的内容。 You'll notice everything in the main gulp folder has changed, the index.html, the .babelrc, .eslintrc, gulpfile.js, as well as the bower/npm dependencies, the syntax of core files (index.route.js etc.), and a few other things. 您会注意到主gulp文件夹中的所有内容都已更改,index.html,.babelrc,.eslintrc,gulpfile.js以及bower / npm依赖项,核心文件的语法(index.route.js等)和其他一些东西。

But even after updating these and understanding what is new in them, I am still a bit stuck and not seeing any useful error messages in my build or on my browser console. 但是即使更新了这些内容并了解了它们中的新增功能后,我仍然有些卡住,并且在构建或浏览器控制台上看不到任何有用的错误消息。 I'm commenting here, to let you know other people hear you and to receive any notification about any responses to this question. 我在这里评论,是为了让您知道其他人听到您的信息,并收到有关对此问题的任何回复的任何通知。 I don't know if any of this is being resolved in the replacement for yeoman, fountainJS. 我不知道在替换yeoman FountainJS时是否能解决所有这些问题。

Good luck! 祝好运! Don't give up! 不要放弃! :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用回送REST API时如何更改gulp-angular项目的端口号 - How to change the port number of the gulp-angular project when using loopback REST API 如何在gulp-Angular yeoman生成器中包含不是角度模块的依赖项? - How to include a dependency that is not an angular module in gulp-Angular yeoman generator? 无法安装gulp-angular - Cannot install gulp-angular 将oc lazyload与gulp-angle合并 - Incorporating oc lazyload with gulp-angular 我如何运行单元测试子集与Karma Gulp-Angular? - How Do I Run a Subset of Unit Tests Gulp-Angular with Karma? Yeoman gulp-angle给出错误Eacces权限被拒绝 - Yeoman gulp-angular give error Eacces Permission denied 在yeoman gulp-angular projekt设置之后的单元测试中出错 - Error in unit tests after yeoman gulp-angular projekt setup Bootstrap Nav Dropdown无法与Yeoman Gulp-Angular一起使用 - Bootstrap Nav Dropdown not working with Yeoman Gulp-Angular 用generator-ngdoc生成gulp-angular文档 - generating gulp-angular documentation with generator-ngdoc 如何添加“大约几分钟前、大约几小时前等;” 在 angular/ionic v1 项目的 a.filter 中 - How to add "about minutes ago, about hours ago, etc;" in a .filter for angular/ionic v1 project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM