Skip to content

Commit

Permalink
First attempt for composer + asset
Browse files Browse the repository at this point in the history
  • Loading branch information
romdim committed Apr 3, 2015
1 parent b55bace commit 6c84f5c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# phpstorm project files
.idea

# composer itself is not needed
composer.phar

# vendor folder
vendor

# composer lock file
composer.lock
30 changes: 30 additions & 0 deletions SnackbarJsAsset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/

namespace romdim\snackbarjs;

use yii\web\AssetBundle;

/**
* Asset bundle for the SnackbarJs css and js files.
*
* @author Romanos Tsouroplis <rom-dim@hotmail.com>
*/
class SnackbarJsAsset extends AssetBundle
{
public $sourcePath = '@bower/snackbarjs/dist';
public $css = [
'snackbar.min.css'
];
public $js = [
'snackbar.min.js',
];
public $depends = [
'yii\web\JqueryAsset',
'romdim\bootstrap\material\BootMaterialCssAsset'
];
}
31 changes: 31 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "romdim/yii2-snackbarjs",
"description": "Composer package for implementing FezVrasta's Snackbar Js in Yii2.",
"keywords": [
"yii", "yii2", "snackbarjs"
],
"type": "yii2-extension",
"license": "MIT",
"support": {
"issues": "https://github.com/romdim/yii2-snackbarjs/issues",
"source": "https://github.com/romdim/yii2-snackbarjs"
},
"authors": [
{
"name": "Romanos Tsouroplis",
"email": "rom-dim@hotmail.com",
"role": "Developer"
}
],
"minimum-stability": "stable",
"require": {
"yiisoft/yii2": "*",
"romdim/bootstrap/material": "dev-master",
"bower-asset/snackbarjs": "*"
},
"autoload": {
"psr-4": {
"romdim\\snackbarjs\\": ""
}
}
}

0 comments on commit 6c84f5c

Please sign in to comment.