爱意满满的作品展示区。
sensui7

又双叒叕一个 JS 项目生成器

  •  
  •   sensui7 · Dec 3, 2017 · 4481 views
    This topic created in 3274 days ago, the information mentioned may be changed or developed.

    准确的说这是一个自动脚本, 它不光生成 package.json, 而实际上运行 npm install 或者 yarn add.

    比如 sga -j, 一条命令, 接下来就可以直接运行yarn test了, jest 已经装好, 一个默认的 testcase 已经写好.

    现在可以支持

    • eslint (standard 规则)
    • babel (不支持 cli, 因为觉得意义不大, 可以自己自行安装 babel-cil 或 babel-register)
    • mocha with chai
    • jest
    • postcss (不支持单独安装, 安装 webpack 任务)
    • webpack (含所有, 使用了 stylus, 无 sass)
    • webpack with vue (最全的, 使用了 stylus, 无 sass)

    下次想写 js, 不用配置那些劳什子, 想要 eslint 直接 sga -e, 搞定, 想要写 vue 全家桶, 直接 sga -v.

    安装

    npm install -g sga
    // or
    yarn global add sga
    

    需要 node 8.0 以上, 最好安装 yarn

    主页: https://github.com/jacobsun/sga

    6 replies  •  2017-12-08 15:56:53 +08:00
    lxsunbin
    lxsunbin
    Dec 4, 2017
    1
    总感觉你的头像哪里不对
    Jackliu
    Jackliu
    Dec 4, 2017
    2
    支持
    Omooo
    Omooo
    Dec 5, 2017
    3
    porn_hub?
    cycloid
    cycloid
    Dec 5, 2017
    4
    总感觉你的头像哪里不对+1
    chenhonzhou
    chenhonzhou
    Dec 6, 2017
    5
    楼上+2
    wfd0807
    wfd0807
    Dec 8, 2017
    6
    楼上+ 3
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1914 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 14:36 · PVG 22:36 · LAX 06:36 · JFK 09:36
    ♥ Do have faith in what you're doing.