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.

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

报告相同问题?

悬赏问题

  • ¥30 关于<main>标签页面跳转的问题
  • ¥80 部署运行web自动化项目
  • ¥15 腾讯云如何建立同一个项目中物模型之间的联系
  • ¥30 VMware 云桌面水印如何添加
  • ¥15 用ns3仿真出5G核心网网元
  • ¥15 matlab答疑 关于海上风电的爬坡事件检测
  • ¥88 python部署量化回测异常问题
  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化