diff --git a/CHANGELOG.md b/CHANGELOG.md index b5121e2..55a9a46 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ + +# [1.0.1](https://github.com/Awilum/asmcss-mixin-w/compare/v1.0.0...v1.0.1) (2020-09-12) +* Added `gulp-uglify` to minify build + # [1.0.0](https://github.com/Awilum/asmcss-mixin-w) (2020-09-12) * Initial Release diff --git a/dist/js/asmcss-mixin-w.js b/dist/js/asmcss-mixin-w.js new file mode 100644 index 0000000..bebb9fc --- /dev/null +++ b/dist/js/asmcss-mixin-w.js @@ -0,0 +1,100 @@ +AssemblerCSS.registerMixin("w", function (settings, ...args) { + switch (args[0]) { + case '1/12': + return 'w: 8.333333%;'; + break; + case '2/12': + return 'w: 16.666667%;'; + break; + case '3/12': + return 'w: 25%;'; + break; + case '4/12': + return 'w: 33.333333%;'; + break; + case '5/12': + return 'w: 41.666667%;'; + break; + case '6/12': + return 'w: 50%;'; + break; + case '7/12': + return 'w: 58.333333%;'; + break; + case '8/12': + return 'w: 66.666667%;'; + break; + case '9/12': + return 'w: 75%;'; + break; + case '10/12': + return 'w: 83.333333%;'; + break; + case '10/12': + return 'w: 91.666667%'; + break; + case '1/2': + return 'w: 50%'; + break; + case '1/3': + return 'w: 33.333333%;'; + break; + case '2/3': + return 'w: 66.666667%;'; + break; + case '1/4': + return 'w: 25%;'; + break; + case '2/4': + return 'w: 50%;'; + break; + case '3/4': + return 'w: 75%;'; + break; + case '1/5': + return 'w: 20%;'; + break; + case '2/5': + return 'w: 40%;'; + break; + case '3/5': + return 'w: 60%;'; + break; + case '4/5': + return 'w: 80%;'; + break; + case '1/6': + return 'w: 16.666667%;'; + break; + case '2/6': + return 'w: 33.333333%;'; + break; + case '3/6': + return 'w: 50%;'; + break; + case '4/6': + return 'w: 66.666667%;'; + break; + case '5/6': + return 'w: 83.333333%;'; + break; + case 'screen': + return 'w: 100vw'; + break; + case 'min': + return 'w: min-content'; + break; + case 'max': + return 'w: max-content'; + break; + case 'auto': + return 'w: auto'; + break; + case 'full': + return 'w: 100%'; + break; + default: + return args[0]; + break; + } +}); \ No newline at end of file diff --git a/dist/js/asmcss-mixin-w.min.js b/dist/js/asmcss-mixin-w.min.js index 3e9ba21..67b1c1d 100644 --- a/dist/js/asmcss-mixin-w.min.js +++ b/dist/js/asmcss-mixin-w.min.js @@ -1,2 +1 @@ - -AssemblerCSS.registerMixin("w",function(settings,...args){switch(args[0]){case'1/12':return'w: 8.333333%;';break;case'2/12':return'w: 16.666667%;';break;case'3/12':return'w: 25%;';break;case'4/12':return'w: 33.333333%;';break;case'full':return'w: 100%';break;default:return args[0];break;}}); \ No newline at end of file +AssemblerCSS.registerMixin("w",function(e,...r){switch(r[0]){case"1/12":return"w: 8.333333%;";case"2/12":return"w: 16.666667%;";case"3/12":return"w: 25%;";case"4/12":return"w: 33.333333%;";case"5/12":return"w: 41.666667%;";case"6/12":return"w: 50%;";case"7/12":return"w: 58.333333%;";case"8/12":return"w: 66.666667%;";case"9/12":return"w: 75%;";case"10/12":return"w: 83.333333%;";case"10/12":return"w: 91.666667%";case"1/2":return"w: 50%";case"1/3":return"w: 33.333333%;";case"2/3":return"w: 66.666667%;";case"1/4":return"w: 25%;";case"2/4":return"w: 50%;";case"3/4":return"w: 75%;";case"1/5":return"w: 20%;";case"2/5":return"w: 40%;";case"3/5":return"w: 60%;";case"4/5":return"w: 80%;";case"1/6":return"w: 16.666667%;";case"2/6":return"w: 33.333333%;";case"3/6":return"w: 50%;";case"4/6":return"w: 66.666667%;";case"5/6":return"w: 83.333333%;";case"screen":return"w: 100vw";case"min":return"w: min-content";case"max":return"w: max-content";case"auto":return"w: auto";case"full":return"w: 100%";default:return r[0]}}); \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index a492a8c..1fb2353 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,7 +1,7 @@ const gulp = require("gulp") const jsValidate = require("gulp-jsvalidate") const rename = require("gulp-rename") -const jsmin = require('gulp-jsmin'); +const uglify = require('gulp-uglify') const size = require("gulp-size") const files = ["src/asmcss-mixin-w.js"] @@ -9,7 +9,10 @@ const files = ["src/asmcss-mixin-w.js"] const buildTask = () => gulp .src(files) - .pipe(jsmin()) + .pipe(rename("asmcss-mixin-w.js")) + .pipe(gulp.dest("dist/js")) + .pipe(size({ showFiles: true })) + .pipe(uglify()) .pipe(rename("asmcss-mixin-w.min.js")) .pipe(gulp.dest("dist/js")) .pipe(size({ showFiles: true })) diff --git a/package.json b/package.json index 69fe599..1b22dde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "asmcss-mixin-w", - "version": "1.0.0", + "version": "1.0.1", "description": "A mixin for Assembler CSS that provides extended functionality to set the width of an element.", "repository": "https://github.com/Awilum/asmcss-mixin-w", "bugs": "https://github.com/Awilum/asmcss-mixin-w/issues", @@ -24,7 +24,7 @@ "devDependencies": { "gulp": "^4.0.2", "gulp-concat": "^2.6.1", - "gulp-jsmin": "^0.1.5", + "gulp-uglify": "^3.0.2", "gulp-jsvalidate": "^5.0.0", "gulp-rename": "^1.4.0", "gulp-size": "^3.0.0"