diff options
author | Martijn Cuppens <martijn.cuppens@intracto.com> | 2018-12-31 14:50:11 +0300 |
---|---|---|
committer | Martijn Cuppens <martijn.cuppens@gmail.com> | 2019-02-11 21:27:14 +0300 |
commit | 62a772a9c63b42b0df0418b9e58546673aff8e96 (patch) | |
tree | 4b1ce72e33aa3900357784db127230fd43c8d33f | |
parent | 6628f33db3b46ebf651be88b7e12fccf2d97ed53 (diff) |
Move files to root to make imports easier
-rw-r--r-- | README.md | 21 | ||||
-rw-r--r-- | examples/less/gulp/src/main.less | 2 | ||||
-rw-r--r-- | examples/less/node/src/main.less | 2 | ||||
-rw-r--r-- | examples/scss/gulp/dest/main.css (renamed from examples/sass/gulp/dest/main.css) | 0 | ||||
-rw-r--r-- | examples/scss/gulp/gulpfile.js (renamed from examples/sass/gulp/gulpfile.js) | 0 | ||||
-rw-r--r-- | examples/scss/gulp/src/main.scss (renamed from examples/sass/node/src/main.scss) | 2 | ||||
-rw-r--r-- | examples/scss/node/dest/main.css (renamed from examples/sass/node/dest/main.css) | 0 | ||||
-rw-r--r-- | examples/scss/node/index.js (renamed from examples/sass/node/index.js) | 0 | ||||
-rw-r--r-- | examples/scss/node/src/main.scss (renamed from examples/sass/gulp/src/main.scss) | 2 | ||||
-rw-r--r-- | examples/stylus/gulp/src/main.styl | 2 | ||||
-rw-r--r-- | examples/stylus/node/src/main.styl | 2 | ||||
-rw-r--r-- | less.less (renamed from less/rfs.less) | 0 | ||||
-rw-r--r-- | package.json | 13 | ||||
-rw-r--r-- | postcss.js (renamed from postcss/rfs.js) | 0 | ||||
-rw-r--r-- | sass.sass | 1 | ||||
-rw-r--r-- | scss.scss (renamed from sass/_rfs.scss) | 0 | ||||
-rw-r--r-- | stylus.styl (renamed from stylus/rfs.styl) | 0 | ||||
-rw-r--r-- | test/less/main.less | 2 | ||||
-rw-r--r-- | test/less/test-10.less | 2 | ||||
-rw-r--r-- | test/sass/main.scss | 2 | ||||
-rw-r--r-- | test/sass/test-10.scss | 2 | ||||
-rw-r--r-- | test/stylus/main.styl | 2 | ||||
-rw-r--r-- | test/stylus/test-10.styl | 2 |
23 files changed, 35 insertions, 24 deletions
@@ -71,22 +71,24 @@ project/ ### Sass +`.scss` syntax: + ```scss -// .scss syntax: // scss/main.scss -@import "../node_modules/rfs/sass/rfs"; +@import "../node_modules/rfs/scss"; .title { @include responsive-font-size(4rem); // OR @include responsive-font-size(64px); OR @include rfs(64); } ``` +`.sass` syntax: + ```sass -// .sass syntax: // scss/main.scss -@import "../node_modules/rfs/sass/rfs"; +@import "../node_modules/rfs/sass" .title +responsive-font-size(4rem) // OR +responsive-font-size(64px) OR +rfs(64) @@ -111,7 +113,7 @@ project/ ```less // less/main.less -@import "../node_modules/rfs/less/rfs"; +@import "../node_modules/rfs/less"; .title { .responsive-font-size(4rem); // OR .responsive-font-size(64px); OR .rfs(64); @@ -124,7 +126,7 @@ project/ ```stylus // stylus/main.styl -@import "../node_modules/rfs/stylus/rfs"; +@import "../node_modules/rfs/stylus"; .title responsive-font-size(4rem) // OR responsive-font-size(64px) OR rfs(64) @@ -145,6 +147,13 @@ project/ } ``` +If you're using Webpack, you can simplify the `@import` using the `~` prefix: +```text +@import "~rfs/less"; +@import "~rfs/sass"; +@import "~rfs/scss"; +@import "~rfs/stylus"; +``` ## Visualisation diff --git a/examples/less/gulp/src/main.less b/examples/less/gulp/src/main.less index e1d2a0e..ed2cc25 100644 --- a/examples/less/gulp/src/main.less +++ b/examples/less/gulp/src/main.less @@ -1,4 +1,4 @@ -@import "../../../../less/rfs"; +@import "../../../../less"; .selector-1 { background-color: #f00; diff --git a/examples/less/node/src/main.less b/examples/less/node/src/main.less index e1d2a0e..ed2cc25 100644 --- a/examples/less/node/src/main.less +++ b/examples/less/node/src/main.less @@ -1,4 +1,4 @@ -@import "../../../../less/rfs"; +@import "../../../../less"; .selector-1 { background-color: #f00; diff --git a/examples/sass/gulp/dest/main.css b/examples/scss/gulp/dest/main.css index 3bed4b0..3bed4b0 100644 --- a/examples/sass/gulp/dest/main.css +++ b/examples/scss/gulp/dest/main.css diff --git a/examples/sass/gulp/gulpfile.js b/examples/scss/gulp/gulpfile.js index 62782e9..62782e9 100644 --- a/examples/sass/gulp/gulpfile.js +++ b/examples/scss/gulp/gulpfile.js diff --git a/examples/sass/node/src/main.scss b/examples/scss/gulp/src/main.scss index 9bda6fd..2a36b78 100644 --- a/examples/sass/node/src/main.scss +++ b/examples/scss/gulp/src/main.scss @@ -1,4 +1,4 @@ -@import "../../../../sass/rfs"; +@import "../../../../scss"; .selector-1 { background-color: #f00; width: 300px; diff --git a/examples/sass/node/dest/main.css b/examples/scss/node/dest/main.css index 3bed4b0..3bed4b0 100644 --- a/examples/sass/node/dest/main.css +++ b/examples/scss/node/dest/main.css diff --git a/examples/sass/node/index.js b/examples/scss/node/index.js index dde62f0..dde62f0 100644 --- a/examples/sass/node/index.js +++ b/examples/scss/node/index.js diff --git a/examples/sass/gulp/src/main.scss b/examples/scss/node/src/main.scss index 9bda6fd..2a36b78 100644 --- a/examples/sass/gulp/src/main.scss +++ b/examples/scss/node/src/main.scss @@ -1,4 +1,4 @@ -@import "../../../../sass/rfs"; +@import "../../../../scss"; .selector-1 { background-color: #f00; width: 300px; diff --git a/examples/stylus/gulp/src/main.styl b/examples/stylus/gulp/src/main.styl index 59629c2..0a1c728 100644 --- a/examples/stylus/gulp/src/main.styl +++ b/examples/stylus/gulp/src/main.styl @@ -1,4 +1,4 @@ -@import "../../../../stylus/rfs" +@import "../../../../stylus" .selector-1 background-color: #f00 width: 300px diff --git a/examples/stylus/node/src/main.styl b/examples/stylus/node/src/main.styl index 59629c2..0a1c728 100644 --- a/examples/stylus/node/src/main.styl +++ b/examples/stylus/node/src/main.styl @@ -1,4 +1,4 @@ -@import "../../../../stylus/rfs" +@import "../../../../stylus" .selector-1 background-color: #f00 width: 300px diff --git a/less/rfs.less b/less.less index 3a65090..3a65090 100644 --- a/less/rfs.less +++ b/less.less diff --git a/package.json b/package.json index b92e7a0..ac836d7 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,14 @@ { "name": "rfs", "version": "7.1.9", - "main": "postcss/rfs.js", - "description": "Powerfull & easy-to-use responsive font sizing engine.", + "main": "postcss.js", + "description": "Powerful & easy-to-use responsive font sizing engine.", "files": [ - "less/rfs.less", - "postcss/rfs.js", - "sass/_rfs.scss", - "stylus/rfs.styl" + "less.less", + "postcss.js", + "sass.scss", + "scss.scss", + "stylus.styl" ], "scripts": { "test": "mocha", diff --git a/postcss/rfs.js b/postcss.js index 7263b93..7263b93 100644 --- a/postcss/rfs.js +++ b/postcss.js diff --git a/sass.sass b/sass.sass new file mode 100644 index 0000000..62afe8c --- /dev/null +++ b/sass.sass @@ -0,0 +1 @@ +@import "./scss" diff --git a/sass/_rfs.scss b/scss.scss index c541a85..c541a85 100644 --- a/sass/_rfs.scss +++ b/scss.scss diff --git a/stylus/rfs.styl b/stylus.styl index 7c4bea9..7c4bea9 100644 --- a/stylus/rfs.styl +++ b/stylus.styl diff --git a/test/less/main.less b/test/less/main.less index cdde369..e01bb61 100644 --- a/test/less/main.less +++ b/test/less/main.less @@ -1,4 +1,4 @@ -@import "../../less/rfs"; +@import "../../less"; // responsive-font-size property with `px` unit .selector-1 { diff --git a/test/less/test-10.less b/test/less/test-10.less index 5f93344..d05bf48 100644 --- a/test/less/test-10.less +++ b/test/less/test-10.less @@ -1,4 +1,4 @@ -@import "../../less/rfs"; +@import "../../less"; @import "main"; @rfs-base-font-size: 12px; @rfs-font-size-unit: px; diff --git a/test/sass/main.scss b/test/sass/main.scss index 55d8882..d3ddf2b 100644 --- a/test/sass/main.scss +++ b/test/sass/main.scss @@ -1,4 +1,4 @@ -@import "../../sass/rfs"; +@import "../../scss"; // responsive-font-size property with `px` unit .selector-1 { diff --git a/test/sass/test-10.scss b/test/sass/test-10.scss index a788bb7..378e100 100644 --- a/test/sass/test-10.scss +++ b/test/sass/test-10.scss @@ -6,5 +6,5 @@ $rfs-two-dimensional: true; $rfs-factor: 5; $rfs-class: true; $rfs-safari-iframe-resize-bug-fix: true; -@import "../../sass/rfs"; +@import "../../scss"; @import "main"; diff --git a/test/stylus/main.styl b/test/stylus/main.styl index f8b2fb8..8257e44 100644 --- a/test/stylus/main.styl +++ b/test/stylus/main.styl @@ -1,4 +1,4 @@ -@import "../../stylus/rfs" +@import "../../stylus" .selector-1 background-color: #f00 diff --git a/test/stylus/test-10.styl b/test/stylus/test-10.styl index 10b84d8..695140f 100644 --- a/test/stylus/test-10.styl +++ b/test/stylus/test-10.styl @@ -6,5 +6,5 @@ $rfs-two-dimensional = true $rfs-factor = 5 $rfs-class = true $rfs-safari-iframe-resize-bug-fix = true -@import "../../stylus/rfs"; +@import "../../stylus"; @import "main" |