Skip to content

Commit

Permalink
Merge pull request #42 from Skumring/add-npm-module-support
Browse files Browse the repository at this point in the history
Add NPM Module support
  • Loading branch information
gigorok authored Feb 21, 2022
2 parents af7ded7 + efb5d7f commit f2f0404
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Custom ActiveAdmin templates
## Installation
As active_skin is the css theme for the [activeadmin](https://github.com/activeadmin/activeadmin) administration framework - you have to install if first.

#### As a Gem
Having active admin installed add the following line to your application's Gemfile:


Expand All @@ -21,11 +22,41 @@ Or install it yourself as:

$ gem install active_admin_theme

#### As a NPM module (Yarn package)
Execute:

$ npm i @activeadmin-plugins/active_admin_theme

Or

$ yarn add @activeadmin-plugins/active_admin_theme

Or add manually to `package.json`:

```
"dependencies": {
"@activeadmin-plugins/active_admin_theme": "1.1.4"
}
```
and execute:

$ yarn

## Usage

In your base stylesheet entry point `active_admin.scss` (as example), add line:

#### As a Gem via Sprockets
```css
@import "wigu/active_admin_theme";
@import 'wigu/active_admin_theme';
```

#### As a NPM module (Yarn package) via Webpacker or any other assets bundler

```css
@import '@activeadmin-plugins/active_admin_theme';
```

You can change basic colors of the theme by setting some variable above active_admin_theme import line in active_admin.css.scss

```css
Expand All @@ -34,7 +65,7 @@ $skinMainFirstColor: #A5A7AA!default;
$skinMainSecondColor: #0066CC!default;
$skinBorderWindowColor: #B8BABE!default;

@import "wigu/active_admin_theme";
@import 'wigu/active_admin_theme';
...
```

Expand Down
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "@activeadmin-plugins/active_admin_theme",
"version": "1.1.4",
"description": "Flat design for ActiveAdmin",
"main": "src/active_admin_theme.scss",
"author": "Igor Fedoronchuk <[email protected]>",
"license": "MIT",
"private": false,
"repository": {
"type": "git",
"url": "git+https://github.com/activeadmin-plugins/active_admin_theme.git"
},
"bugs": {
"url": "https://github.com/activeadmin-plugins/active_admin_theme/issues"
},
"homepage": "https://github.com/activeadmin-plugins/active_admin_theme#readme",
"keywords": [
"active",
"admin",
"theme"
],
"files": [
"src/**/*"
],
"scripts": {
"prepublishOnly": "rm -rf src && cp -R app/assets/stylesheets/wigu/ src"
}
}

0 comments on commit f2f0404

Please sign in to comment.