wubaiqing

[前端] 每日时报 - 2019.05.31

  •  
  •   wubaiqing · May 31, 2019 · 1431 views
    This topic created in 2540 days ago, the information mentioned may be changed or developed.

    [前端] 每日时报 - 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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5536 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 08:38 · PVG 16:38 · LAX 01:38 · JFK 04:38
    ♥ Do have faith in what you're doing.