Skip to content

Commit

Permalink
Make styles available in npm package under /styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Norman Rusch committed Sep 21, 2021
1 parent a9d60e8 commit f0d2abb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
.cache/
.parcel-cache/
coverage/
node_modules/
public/
/.cache/
/.parcel-cache/
/coverage/
/node_modules/
/public/
/styles/
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,26 @@ build: build_clean build_styles build_scripts

build_clean:
rm -rf dist/ && mkdir dist/
rm -rf styles/ && mkdir styles/


build_styles:
NODE_ENV=production ./node_modules/.bin/sass \
./src/styles/caroucssel.css.scss \
./dist/caroucssel.css \
./dist/styles/caroucssel.css \
--style expanded \
--no-source-map \
--trace

NODE_ENV=production ./node_modules/.bin/sass \
./src/styles/caroucssel.css.scss \
./dist/caroucssel.min.css \
./dist/styles/caroucssel.min.css \
--style compressed \
--no-source-map \
--trace

cp ./src/styles/caroucssel.scss ./dist/caroucssel.scss
cp ./src/styles/caroucssel.scss ./dist/styles/caroucssel.scss
cp -r ./dist/styles/ ./styles


build_scripts:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ yarn add caroucssel
or in the browser

```html
<link rel="stylesheet" href="https://unpkg.com/caroucssel@latest/dist/caroucssel.min.css" />
<link rel="stylesheet" href="https://unpkg.com/caroucssel@latest/dist/styles/caroucssel.min.css" />
<script src="https://unpkg.com/caroucssel@latest"></script>
```

Expand All @@ -57,7 +57,7 @@ The prebuild CSS-file only contains selectors for basic usage. It's recommended
The SCSS gives the freedom to choose your own selectors, which should have a carousel feature. It also allows you to easily customize the behavior depending on media queries.

```scss
@import '~caroucssel/dist/caroucssel';
@import '~caroucssel/styles/caroucssel';

.my-carousel {
@include caroucssel();
Expand Down

0 comments on commit f0d2abb

Please sign in to comment.