From f35a51e384e5a90cd9e105c33eca7b47b009d026 Mon Sep 17 00:00:00 2001 From: mochen Date: Mon, 4 Jul 2016 10:47:48 +0800 Subject: [PATCH] add styl & fix npm --- .npmignore | 1 - package.json | 4 ++-- src/px2rem.less | 2 +- src/px2rem.scss | 2 +- src/px2rem.styl | 2 ++ 5 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 src/px2rem.styl diff --git a/.npmignore b/.npmignore index f803738..b28ed2a 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,3 @@ -src/ example/ .gitignore bower.json diff --git a/package.json b/package.json index 0bfb1ea..b8a0200 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "hotcss", - "version": "2.1.0", + "version": "2.2.1", "description": "Make Mobile Development Layout More Easy.", - "main": "hotcss.js", + "main": "src/hotcss.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, diff --git a/src/px2rem.less b/src/px2rem.less index dfc78ee..25c11a5 100644 --- a/src/px2rem.less +++ b/src/px2rem.less @@ -1,5 +1,5 @@ .function{ - .px2rem( @px ){ + .px2rem(@px){ return : unit(@px*320/@designWidth/20 , rem); } } \ No newline at end of file diff --git a/src/px2rem.scss b/src/px2rem.scss index a363469..0d95532 100644 --- a/src/px2rem.scss +++ b/src/px2rem.scss @@ -1,3 +1,3 @@ -@function px2rem( $px ){ +@function px2rem($px){ @return $px*320/$designWidth/20 + rem; } \ No newline at end of file diff --git a/src/px2rem.styl b/src/px2rem.styl new file mode 100644 index 0000000..7bc243a --- /dev/null +++ b/src/px2rem.styl @@ -0,0 +1,2 @@ +px2rem(px) + return unit(px * 320 / designWidth / 20, 'rem') \ No newline at end of file