File tree Expand file tree Collapse file tree 4 files changed +39
-7
lines changed
Expand file tree Collapse file tree 4 files changed +39
-7
lines changed Original file line number Diff line number Diff line change 11dist /
2+ es2015 /
23
34# Created by https://www.gitignore.io/api/node,visualstudiocode,macos
45
Original file line number Diff line number Diff line change 11# Change Log
22
3+ ## 1.2.3
4+
5+ * Provide the lib as a ES2015 module and umd module to please everyone.
6+ * explain more HOWTOs in the README
7+
8+ ## 1.2.2
9+
10+ * Change the build system
11+
312## 1.2.1
413
514* Usage of a custom LRU cache implementation. The old one was way too heavy and needed polyfills.
Original file line number Diff line number Diff line change @@ -20,9 +20,8 @@ npm install --save fancy-textfill
2020``` html
2121<!-- In case you're using it as a jquery plugin -->
2222<script src =" jquery.min.js" ></script >
23- <script src =" fancy-text-fill.jQuery.js" ></script >
24- <!-- Or you can use it without jquery -->
25- <script src =" fancy-text-fill.js" ></script >
23+ <script src =" https://unpkg.com/fancy-textfill/dist/fancy-text-fill.jQuery.js" ></script >
24+ <!-- Or you can use it without jquery, by using https://unpkg.com/fancy-textfill/dist/fancy-text-fill.js -->
2625<!-- Example setup -->
2726<style >
2827 .container {
@@ -59,6 +58,28 @@ $('.myText').fancyTextFill({
5958});
6059```
6160
61+ You can also use it as a module. You can import it like so:
62+
63+ ``` js
64+ // Without jquery
65+ import { fillParentContainer } from ' fancy-textfill' ;
66+ // Or const { fillParentContainer } = require('fancy-textfill');
67+ fillParentContainer (el, {
68+ minFontSize: 6 ,
69+ maxFontSize: 26
70+ });
71+ ```
72+
73+ ``` js
74+ // as a jquery plugin
75+ import ' fancy-textfill/es2015/jquery.plugin' ;
76+ // Or require('fancy-textfill/es2015/jquery.plugin');
77+ $ (' .myText' ).fancyTextFill ({
78+ minFontSize: 6 ,
79+ maxFontSize: 26
80+ });
81+ ```
82+
6283## Options
6384
6485| Name | Description | Default value |
Original file line number Diff line number Diff line change 11{
22 "name" : " fancy-textfill" ,
3- "version" : " 1.2.2 " ,
3+ "version" : " 1.2.3 " ,
44 "description" : " Fast implementation for resizing text to fill its container." ,
5- "main" : " dist/fancy-text-fill .js" ,
5+ "main" : " es2015/index .js" ,
66 "repository" : " https://github.com/fazouane-marouane/fancy-textfill" ,
77 "author" : " Fazouane Marouane" ,
88 "license" : " MIT" ,
1919 }
2020 },
2121 "scripts" : {
22- "build" : " neutrino build" ,
22+ "build" : " neutrino build && tsc --outDir es2015 " ,
2323 "test" : " NODE_ENV=development intern-runner config=test/intern"
2424 },
2525 "devDependencies" : {
3434 },
3535 "files" : [
3636 " dist/fancy-text-fill.js" ,
37- " dist/fancy-text-fill.jQuery.js"
37+ " dist/fancy-text-fill.jQuery.js" ,
38+ " es2015/*"
3839 ]
3940}
You can’t perform that action at this time.
0 commit comments