V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wubaiqing
V2EX  ›  分享发现

[前端] 每日时报 - 2019.05.31

  •  
  •   wubaiqing · 2019-05-31 16:01:19 +08:00 · 941 次点击
    这是一个创建于 1799 天前的主题,其中的信息可能已经有所发展或是发生改变。

    [前端] 每日时报 - 2019.05.31

    https://github.com/wubaiqing/zaobao

    [工具] 一个在线表格转换工具,可以把表格转换成 Markdown、CSV、JSON、XML 等格式:https://tableconvert.com/?output=text&import=example

    [类库] less-plugin-npm-import 是允许从 NPM 包中,导入 Less 文件:https://github.com/less/less-plugin-npm-import

    [类库] temp-dir 是用于取系统临时目录的工具,用于解决 os.temdir() 符号链接的问题:https://github.com/sindresorhus/temp-dir

    [类库] Gulp-file 是可以在 Gulp 中,用 if 条件来进行后续处理;比如当前环境是生产时,才进行 uglify 等:https://github.com/robrich/gulp-if

    配图 - 表格转换工具

    配图 - Gulp-file

    示例 - Gulp-file

    var gulpif = require('gulp-if');
    var uglify = require('gulp-uglify');
    
    var condition = true; // TODO: add business logic
    
    gulp.task('task', function() {
      gulp.src('./src/*.js')
        .pipe(gulpif(condition, uglify()))
        .pipe(gulp.dest('./dist/'));
    });
    

    示例 - less-plugin-npm-import

    @import "npm://packagename/path/to/file.less";
    

    示例 - temp-dir

    const tempDirectory = require('temp-dir');
    
    console.log(tempDirectory);
    //=> '/private/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T'
    
    console.log(require('os').tmpdir());
    //=> '/var/folders/3x/jf5977fn79jbglr7rk0tq4d00000gn/T' // <= Symlink
    

    今日图 - 新手 VS 工作 3 年老司机的工作态度

    查看更多: http://localhost:8080/zaobao/2019/05/31.html

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2232 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 04:38 · PVG 12:38 · LAX 21:38 · JFK 00:38
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.