-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from melloware/script
Build: Add instructions and update README.MD
- Loading branch information
Showing
6 changed files
with
412 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
theme.css | ||
.DS_STORE | ||
.DS_STORE | ||
node_modules/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,44 @@ | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
|
||
# PrimeReact Theming with SASS | ||
|
||
Visit the [official documentation](https://primereact.org/theming/#customtheme) for more information. | ||
|
||
<img src="https://upload.wikimedia.org/wikipedia/commons/9/96/Sass_Logo_Color.svg" height="100" alt="SASS Logo" /> | ||
|
||
## Usage | ||
|
||
To compile the CSS once: | ||
|
||
```shell | ||
npm install | ||
npm run sass | ||
``` | ||
|
||
To watch the SASS files for changes and re-compile: | ||
|
||
```shell | ||
npm install | ||
npm run sass-watch | ||
``` | ||
|
||
## Compile and copy CSS files to the PrimeReact repository | ||
|
||
Usually you want to update the CSS files in the PrimeReact repository, located in the | ||
`/primereact/public/themes` folder. To do so you can use the following scripts. | ||
|
||
These scripts asume that the PrimeReact repository is located next to this repository, so at `../primereact`. | ||
They will compile the CSS files and copy the resulting CSS files to the correct resources folders. | ||
|
||
### Unix | ||
|
||
```shell | ||
./build.sh | ||
``` | ||
|
||
### Windows | ||
|
||
```shell | ||
build.bat | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
@echo on | ||
set "RESOURCES=..\primereact\public\themes" | ||
|
||
rmdir /s /q build | ||
|
||
call npm run sass | ||
|
||
copy build\themes\arya\arya-blue\theme.css %RESOURCES%\arya-blue | ||
copy build\themes\arya\arya-green\theme.css %RESOURCES%\arya-green | ||
copy build\themes\arya\arya-orange\theme.css %RESOURCES%\arya-orange | ||
copy build\themes\arya\arya-purple\theme.css %RESOURCES%\arya-purple | ||
copy build\themes\bootstrap4\bootstrap4-dark\blue\theme.css %RESOURCES%\bootstrap4-dark-blue | ||
copy build\themes\bootstrap4\bootstrap4-dark\purple\theme.css %RESOURCES%\bootstrap4-dark-purple | ||
copy build\themes\bootstrap4\bootstrap4-light\blue\theme.css %RESOURCES%\bootstrap4-light-blue | ||
copy build\themes\bootstrap4\bootstrap4-light\purple\theme.css %RESOURCES%\bootstrap4-light-purple | ||
copy build\themes\fluent\fluent-light\theme.css %RESOURCES%\fluent-light | ||
copy build\themes\lara\lara-dark\amber\theme.css %RESOURCES%\lara-dark-amber | ||
copy build\themes\lara\lara-dark\blue\theme.css %RESOURCES%\lara-dark-blue | ||
copy build\themes\lara\lara-dark\cyan\theme.css %RESOURCES%\lara-dark-cyan | ||
copy build\themes\lara\lara-dark\green\theme.css %RESOURCES%\lara-dark-green | ||
copy build\themes\lara\lara-dark\indigo\theme.css %RESOURCES%\lara-dark-indigo | ||
copy build\themes\lara\lara-dark\pink\theme.css %RESOURCES%\lara-dark-pink | ||
copy build\themes\lara\lara-dark\purple\theme.css %RESOURCES%\lara-dark-purple | ||
copy build\themes\lara\lara-dark\teal\theme.css %RESOURCES%\lara-dark-teal | ||
copy build\themes\lara\lara-light\amber\theme.css %RESOURCES%\lara-light-amber | ||
copy build\themes\lara\lara-light\blue\theme.css %RESOURCES%\lara-light-blue | ||
copy build\themes\lara\lara-light\cyan\theme.css %RESOURCES%\lara-light-cyan | ||
copy build\themes\lara\lara-light\green\theme.css %RESOURCES%\lara-light-green | ||
copy build\themes\lara\lara-light\indigo\theme.css %RESOURCES%\lara-light-indigo | ||
copy build\themes\lara\lara-light\pink\theme.css %RESOURCES%\lara-light-pink | ||
copy build\themes\lara\lara-light\purple\theme.css %RESOURCES%\lara-light-purple | ||
copy build\themes\lara\lara-light\teal\theme.css %RESOURCES%\lara-light-teal | ||
copy build\themes\luna\luna-amber\theme.css %RESOURCES%\luna-amber | ||
copy build\themes\luna\luna-blue\theme.css %RESOURCES%\luna-blue | ||
copy build\themes\luna\luna-green\theme.css %RESOURCES%\luna-green | ||
copy build\themes\luna\luna-pink\theme.css %RESOURCES%\luna-pink | ||
copy build\themes\material\material-dark\standard\deeppurple\theme.css %RESOURCES%\md-dark-deeppurple | ||
copy build\themes\material\material-dark\standard\indigo\theme.css %RESOURCES%\md-dark-indigo | ||
copy build\themes\material\material-light\standard\deeppurple\theme.css %RESOURCES%\md-light-deeppurple | ||
copy build\themes\material\material-light\standard\deeppurple\theme.css %RESOURCES%\md-light-indigo | ||
copy build\themes\material\material-dark\compact\deeppurple\theme.css %RESOURCES%\mdc-dark-deeppurple | ||
copy build\themes\material\material-dark\compact\indigo\theme.css %RESOURCES%\mdc-dark-indigo | ||
copy build\themes\material\material-light\compact\deeppurple\theme.css %RESOURCES%\mdc-light-deeppurple | ||
copy build\themes\material\material-light\compact\deeppurple\theme.css %RESOURCES%\mdc-light-indigo | ||
copy build\themes\mira\theme.css %RESOURCES%\mira | ||
copy build\themes\nano\theme.css %RESOURCES%\nano | ||
copy build\themes\nova\nova\theme.css %RESOURCES%\nova | ||
copy build\themes\nova\nova-accent\theme.css %RESOURCES%\nova-accent | ||
copy build\themes\nova\nova-alt\theme.css %RESOURCES%\nova-alt | ||
copy build\themes\rhea\theme.css %RESOURCES%\rhea | ||
copy build\themes\saga\saga-blue\theme.css %RESOURCES%\saga-blue | ||
copy build\themes\saga\saga-green\theme.css %RESOURCES%\saga-green | ||
copy build\themes\saga\saga-orange\theme.css %RESOURCES%\saga-orange | ||
copy build\themes\saga\saga-purple\theme.css %RESOURCES%\saga-purple | ||
copy build\themes\soho\soho-dark\theme.css %RESOURCES%\soho-dark | ||
copy build\themes\soho\soho-light\theme.css %RESOURCES%\soho-light | ||
copy build\themes\tailwind\tailwind-light\theme.css %RESOURCES%\tailwind-light | ||
copy build\themes\vela\vela-blue\theme.css %RESOURCES%\vela-blue | ||
copy build\themes\vela\vela-green\theme.css %RESOURCES%\vela-green | ||
copy build\themes\vela\vela-orange\theme.css %RESOURCES%\vela-orange | ||
copy build\themes\vela\vela-purple\theme.css %RESOURCES%\vela-purple | ||
copy build\themes\viva\viva-dark\theme.css %RESOURCES%\viva-dark | ||
copy build\themes\viva\viva-light\theme.css %RESOURCES%\viva-light |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/sh | ||
RESOURCES="../primereact/public/themes" | ||
|
||
rm -rf build | ||
|
||
npm run sass | ||
|
||
cp build\themes\arya\arya-blue\theme.css $RESOURCES\arya-blue | ||
cp build\themes\arya\arya-green\theme.css $RESOURCES\arya-green | ||
cp build\themes\arya\arya-orange\theme.css $RESOURCES\arya-orange | ||
cp build\themes\arya\arya-purple\theme.css $RESOURCES\arya-purple | ||
cp build\themes\bootstrap4\bootstrap4-dark\blue\theme.css $RESOURCES\bootstrap4-dark-blue | ||
cp build\themes\bootstrap4\bootstrap4-dark\purple\theme.css $RESOURCES\bootstrap4-dark-purple | ||
cp build\themes\bootstrap4\bootstrap4-light\blue\theme.css $RESOURCES\bootstrap4-light-blue | ||
cp build\themes\bootstrap4\bootstrap4-light\purple\theme.css $RESOURCES\bootstrap4-light-purple | ||
cp build\themes\fluent\fluent-light\theme.css $RESOURCES\fluent-light | ||
cp build\themes\lara\lara-dark\amber\theme.css $RESOURCES\lara-dark-amber | ||
cp build\themes\lara\lara-dark\blue\theme.css $RESOURCES\lara-dark-blue | ||
cp build\themes\lara\lara-dark\cyan\theme.css $RESOURCES\lara-dark-cyan | ||
cp build\themes\lara\lara-dark\green\theme.css $RESOURCES\lara-dark-green | ||
cp build\themes\lara\lara-dark\indigo\theme.css $RESOURCES\lara-dark-indigo | ||
cp build\themes\lara\lara-dark\pink\theme.css $RESOURCES\lara-dark-pink | ||
cp build\themes\lara\lara-dark\purple\theme.css $RESOURCES\lara-dark-purple | ||
cp build\themes\lara\lara-dark\teal\theme.css $RESOURCES\lara-dark-teal | ||
cp build\themes\lara\lara-light\amber\theme.css $RESOURCES\lara-light-amber | ||
cp build\themes\lara\lara-light\blue\theme.css $RESOURCES\lara-light-blue | ||
cp build\themes\lara\lara-light\cyan\theme.css $RESOURCES\lara-light-cyan | ||
cp build\themes\lara\lara-light\green\theme.css $RESOURCES\lara-light-green | ||
cp build\themes\lara\lara-light\indigo\theme.css $RESOURCES\lara-light-indigo | ||
cp build\themes\lara\lara-light\pink\theme.css $RESOURCES\lara-light-pink | ||
cp build\themes\lara\lara-light\purple\theme.css $RESOURCES\lara-light-purple | ||
cp build\themes\lara\lara-light\teal\theme.css $RESOURCES\lara-light-teal | ||
cp build\themes\luna\luna-amber\theme.css $RESOURCES\luna-amber | ||
cp build\themes\luna\luna-blue\theme.css $RESOURCES\luna-blue | ||
cp build\themes\luna\luna-green\theme.css $RESOURCES\luna-green | ||
cp build\themes\luna\luna-pink\theme.css $RESOURCES\luna-pink | ||
cp build\themes\material\material-dark\standard\deeppurple\theme.css $RESOURCES\md-dark-deeppurple | ||
cp build\themes\material\material-dark\standard\indigo\theme.css $RESOURCES\md-dark-indigo | ||
cp build\themes\material\material-light\standard\deeppurple\theme.css $RESOURCES\md-light-deeppurple | ||
cp build\themes\material\material-light\standard\deeppurple\theme.css $RESOURCES\md-light-indigo | ||
cp build\themes\material\material-dark\compact\deeppurple\theme.css $RESOURCES\mdc-dark-deeppurple | ||
cp build\themes\material\material-dark\compact\indigo\theme.css $RESOURCES\mdc-dark-indigo | ||
cp build\themes\material\material-light\compact\deeppurple\theme.css $RESOURCES\mdc-light-deeppurple | ||
cp build\themes\material\material-light\compact\deeppurple\theme.css $RESOURCES\mdc-light-indigo | ||
cp build\themes\mira\theme.css $RESOURCES\mira | ||
cp build\themes\nano\theme.css $RESOURCES\nano | ||
cp build\themes\nova\nova\theme.css $RESOURCES\nova | ||
cp build\themes\nova\nova-accent\theme.css $RESOURCES\nova-accent | ||
cp build\themes\nova\nova-alt\theme.css $RESOURCES\nova-alt | ||
cp build\themes\rhea\theme.css $RESOURCES\rhea | ||
cp build\themes\saga\saga-blue\theme.css $RESOURCES\saga-blue | ||
cp build\themes\saga\saga-green\theme.css $RESOURCES\saga-green | ||
cp build\themes\saga\saga-orange\theme.css $RESOURCES\saga-orange | ||
cp build\themes\saga\saga-purple\theme.css $RESOURCES\saga-purple | ||
cp build\themes\soho\soho-dark\theme.css $RESOURCES\soho-dark | ||
cp build\themes\soho\soho-light\theme.css $RESOURCES\soho-light | ||
cp build\themes\tailwind\tailwind-light\theme.css $RESOURCES\tailwind-light | ||
cp build\themes\vela\vela-blue\theme.css $RESOURCES\vela-blue | ||
cp build\themes\vela\vela-green\theme.css $RESOURCES\vela-green | ||
cp build\themes\vela\vela-orange\theme.css $RESOURCES\vela-orange | ||
cp build\themes\vela\vela-purple\theme.css $RESOURCES\vela-purple | ||
cp build\themes\viva\viva-dark\theme.css $RESOURCES\viva-dark | ||
cp build\themes\viva\viva-light\theme.css $RESOURCES\viva-light |
Oops, something went wrong.