Skip to content

Commit f2f0404

Browse files
authored
Merge pull request #42 from Skumring/add-npm-module-support
Add NPM Module support
2 parents af7ded7 + efb5d7f commit f2f0404

2 files changed

Lines changed: 61 additions & 2 deletions

File tree

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Custom ActiveAdmin templates
66
## Installation
77
As active_skin is the css theme for the [activeadmin](https://github.com/activeadmin/activeadmin) administration framework - you have to install if first.
88

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

1112

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

2223
$ gem install active_admin_theme
2324

25+
#### As a NPM module (Yarn package)
26+
Execute:
27+
28+
$ npm i @activeadmin-plugins/active_admin_theme
29+
30+
Or
31+
32+
$ yarn add @activeadmin-plugins/active_admin_theme
33+
34+
Or add manually to `package.json`:
35+
36+
```
37+
"dependencies": {
38+
"@activeadmin-plugins/active_admin_theme": "1.1.4"
39+
}
40+
```
41+
and execute:
42+
43+
$ yarn
44+
2445
## Usage
2546

47+
In your base stylesheet entry point `active_admin.scss` (as example), add line:
48+
49+
#### As a Gem via Sprockets
2650
```css
27-
@import "wigu/active_admin_theme";
51+
@import 'wigu/active_admin_theme';
2852
```
53+
54+
#### As a NPM module (Yarn package) via Webpacker or any other assets bundler
55+
56+
```css
57+
@import '@activeadmin-plugins/active_admin_theme';
58+
```
59+
2960
You can change basic colors of the theme by setting some variable above active_admin_theme import line in active_admin.css.scss
3061

3162
```css
@@ -34,7 +65,7 @@ $skinMainFirstColor: #A5A7AA!default;
3465
$skinMainSecondColor: #0066CC!default;
3566
$skinBorderWindowColor: #B8BABE!default;
3667

37-
@import "wigu/active_admin_theme";
68+
@import 'wigu/active_admin_theme';
3869
...
3970
```
4071

package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "@activeadmin-plugins/active_admin_theme",
3+
"version": "1.1.4",
4+
"description": "Flat design for ActiveAdmin",
5+
"main": "src/active_admin_theme.scss",
6+
"author": "Igor Fedoronchuk <igor.f@didww.com>",
7+
"license": "MIT",
8+
"private": false,
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/activeadmin-plugins/active_admin_theme.git"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/activeadmin-plugins/active_admin_theme/issues"
15+
},
16+
"homepage": "https://github.com/activeadmin-plugins/active_admin_theme#readme",
17+
"keywords": [
18+
"active",
19+
"admin",
20+
"theme"
21+
],
22+
"files": [
23+
"src/**/*"
24+
],
25+
"scripts": {
26+
"prepublishOnly": "rm -rf src && cp -R app/assets/stylesheets/wigu/ src"
27+
}
28+
}

0 commit comments

Comments
 (0)