@lazy-node/semver
    TypeScript icon, indicating that this package has built-in type declarations

    190.0.329002 • Public • Published

    @lazy-node/semver

    create a idea style semver 自動生成類似 IDEA 的版本編號風格
    

    this module will fail when year > 2099 or year < 2010

    API

    see here

    demo

    1. prepublishOnly.ts
    2. demo.ts

    code

    import fs = require("fs");
    import path = require("path");
    import date from '../index';
     
    let file = path.join(__dirname, '../package.json');
     
    let pkg = JSON.parse(fs.readFileSync(file).toString());
     
    console.log(`old: ${pkg.version}`);
    pkg.version = date(pkg.version);
    console.log(`new: ${pkg.version}`);
     
    fs.writeFileSync(file, JSON.stringify(pkg, null, 2));

    import { date } from '../index';
     
    console.log(date('190.1.329001', {
     timestamp: '190.1.329001'
    }));
    // => 190.1.329002
     
    console.log(date('190.1.329001'));
    // => >= 190.1.329002
     
    console.log(date());
    // => version by today ex: 190.1.329002

    Install

    npm i @lazy-node/semver

    DownloadsWeekly Downloads

    7

    Version

    190.0.329002

    License

    ISC

    Unpacked Size

    17 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar