0.1.4 • Published 4 years ago

usopp v0.1.4

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

usopp

image npm.io npm.io

Introduction

Tools that can improve the development efficiency of front-end engineers. The current functions are still very simple. For personal use, more people are welcome to join in the development and use.

Install

npm install -g usopp

Page

Create a html page template

usopp page index.html .

Insert

Insert code snippets into the file, alias is ins

usopp insert cookie ./index.js -r 12

A code snippet called cookie is inserted in line 12 of the current file

function setCookie(name, value) {
    var Days = 30;
    var exp = new Date();
    exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
    document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
}

function getCookie(name) {
    var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
    if (arr = document.cookie.match(reg))
        return unescape(arr[2]);
    else
        return null;
}

function delCookie(name) {
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval = getCookie(name);
    if (cval != null)
        document.cookie = name + "=" + cval + ";expires=" + exp.toGMTString();
}
typedesc
cookieBasic cookie operations, including reading, writing and deleting
vueThe basic structure of creating a multi-page vue
componentComponent template for Vue multi-page application

project

Create different projects based on templates

usopp project simple dianfei ./demo/
typedesc
simplea simple project includes index js and css
vuepressYou can create a vuepress project with configuration
0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago