Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
* create non-minifed dist file
* move "codebird" from bower deps to npm dev deps
* create npm reference
* update readme

(close #11)
  • Loading branch information
JohnnyTheTank committed Jan 9, 2016
1 parent 55e7d37 commit 5bb74f6
Show file tree
Hide file tree
Showing 9 changed files with 1,906 additions and 42 deletions.
36 changes: 24 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
module.exports = function(grunt) {

var banner = '/**\n @name: <%= pkg.name %> \n @version: <%= pkg.version %> (<%= grunt.template.today("dd-mm-yyyy") %>) \n @author: <%= pkg.author %> \n @url: <%= pkg.homepage %> \n @license: <%= pkg.license %>\n*/\n';

var files = [
'src/aping-codebird-directive.js',
'src/aping-codebird-helper.js',
'node_modules/codebird/codebird.js'
];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
js: {
files : {
'dist/aping-plugin-codebird.min.js' : [
'src/aping-codebird-directive.js',
'src/aping-codebird-helper.js',
'bower_components/codebird-js/codebird.js'
]
'dist/aping-plugin-codebird.min.js' : files
}
},
options: {
banner: '\n/*! <%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today("dd-mm-yyyy") %>) by <%= pkg.author %> */\n',
banner: banner,
}
},
concat: {
options: {
separator: ';',
banner: banner,
},
dist: {
files : {
'dist/aping-plugin-codebird.js' : files
}
},
},
watch: {
minifiyJs: {
files: [
'src/aping-codebird-directive.js',
'src/aping-codebird-helper.js',
'bower_components/codebird-js/codebird.js'
],
tasks: ['uglify'],
files: files,
tasks: ['uglify', 'concat'],
options: {
spawn: true,
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');

Expand Down
24 changes: 17 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,39 @@

# Information
* **Supported apiNG models: `social`, `image`**
* Used JavaScript library: [codebird-js](https://github.com/jublonet/codebird-js) _(included in minified distribution file)_
* Used JavaScript library: [codebird-js](https://github.com/jublonet/codebird-js) _(included in distribution files)_

# Documentation
I. INSTALLATION
II. BEARER TOKEN
III. USAGE

## I. INSTALLATION
a) Get files
b) Include files
a) Get file
b) Include file
c) Add dependencies
d) Add the plugin

### a) Get files
### a) Get file
You can choose your preferred method of installation:

* Via bower: `bower install apiNG-plugin-codebird --save`
* Download from github: [apiNG-plugin-codebird.zip](https://github.com/JohnnyTheTank/apiNG-plugin-codebird/zipball/master)
1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
1. `bower install apiNG-plugin-codebird --save`
2. `npm install aping-plugin-codebird --save`
3. download [apiNG-plugin-codebird.zip](https://github.com/JohnnyTheTank/apiNG-plugin-codebird/zipball/master)

### b) Include files
### b) Include file
Include `aping-plugin-codebird.min.js` in your apiNG application

```html
<!-- when using bower -->
<script src="bower_components/apiNG-plugin-codebird/dist/aping-plugin-codebird.min.js"></script>

<!-- when using npm -->
<script src="node_modules/aping-plugin-codebird/dist/aping-plugin-codebird.min.js"></script>

<!-- when using downloaded files -->
<script src="aping-plugin-codebird.min.js"></script>
```

### c) Add dependencies
Expand Down
7 changes: 3 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"authors": [
"Jonathan Hornung <[email protected]>"
],
"version": "0.6.0",
"version": "0.7.0",
"description": "twitter plugin for apiNG",
"main": "dist/apiNG-plugin-codebird.min.js",
"main": "dist/aping-plugin-codebird.min.js",
"moduleType": [],
"keywords": [
"aping",
Expand All @@ -26,7 +26,6 @@
"tests"
],
"dependencies": {
"apiNG": "*",
"codebird-js": "*"
"apiNG": "*"
}
}
4 changes: 1 addition & 3 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
<script src="../bower_components/apiNG/dist/aping.min.js"></script>
<script src="aping-config.js"></script>
<script src="app.js"></script>
<script src="../bower_components/codebird-js/codebird.js"></script>
<script src="../src/aping-codebird-directive.js"></script>
<script src="../src/aping-codebird-helper.js"></script>
<script src="../dist/aping-plugin-codebird.js"></script>
</head>
<body ng-app="app">
<h1>{'search':'münchen', 'result_type':'recent', 'language':'de'}</h1>
Expand Down
Loading

0 comments on commit 5bb74f6

Please sign in to comment.