drpph80800 2016-01-30 17:12
浏览 35
已采纳

Go语言构建器/任务运行器

I'm creating a little SPA framework (might be a full-feature framework). Frontend is based on native javascript (including ES6 features and web-components). Backend is written in Go.

Here is a list of my needs, that I'd like to do automatically:

  1. Minify my javascript files

  2. Transpile ES6 code to ES5 (with something like babel.js)

  3. Polyfill my web-components

Is there a way to achieve this without using node.js? Are there already go packages that can make those 3 things happen, with a "simple" grunt/gulp-like way?

I would like to avoid installing node.js, npm, bower... etc. In my (not very classified) oppinion, using those node.js tools makes my application a mess adding a lot of unnecessery overhead to my application folder and makes my framework dependant on a lot of stuff (that application programmer has to learn, understand and know how to use).

Thanks for any tips/oppinions.

  • 写回答

1条回答 默认 最新

  • doubi8383 2016-02-01 06:05
    关注

    If you're doing a SPA you should just stick with gulp and others. You'll probably end up using npm stuff like browserify, autoprefix, etc, and you'll basically end up reinventing the wheel with your own asset pipeline.

    With that said I've seen a couple, but none of them looked very mature last time I looked: https://github.com/jbowens/assets

    https://github.com/shaoshing/train

    and you're going to need npm installed to use them regardless.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?