Use files for npm and move CONTRIBUTING.md
This commit is contained in:
parent
7621a2488c
commit
f20a8532ff
11
.npmignore
11
.npmignore
@ -1,11 +0,0 @@
|
|||||||
.DS_Store
|
|
||||||
|
|
||||||
/.eslintrc
|
|
||||||
/.gitignore
|
|
||||||
/.travis.yml
|
|
||||||
/gulpfile.js
|
|
||||||
/examples
|
|
||||||
/CONTRIBUTING.md
|
|
||||||
/.github
|
|
||||||
|
|
||||||
node_modules
|
|
@ -28,7 +28,7 @@ Basically, I try to follow [Douglas Crockford's JavaScript Code Conventions](htt
|
|||||||
You can check if your code fits in the convention with `gulp lint`.
|
You can check if your code fits in the convention with `gulp lint`.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
First, ensure that you have the latest [Node.js](http://nodejs.org/) or [io.js](https://iojs.org) and [npm](http://npmjs.org) installed.
|
First, ensure that you have stable [Node.js](https://nodejs.org/) and [npm](https://npmjs.com) installed.
|
||||||
|
|
||||||
Test if Gulp CLI is installed by running `gulp --version`. If the command isn't found, run `npm install -g gulp`. For more information about installing Gulp, see the Gulp's [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md).
|
Test if Gulp CLI is installed by running `gulp --version`. If the command isn't found, run `npm install -g gulp`. For more information about installing Gulp, see the Gulp's [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md).
|
||||||
|
|
||||||
|
18
README.md
18
README.md
@ -55,7 +55,7 @@ It's cool, isn't it?
|
|||||||
#### NPM
|
#### NPM
|
||||||
|
|
||||||
The best way to install and use perfect-scrollbar is with NPM.
|
The best way to install and use perfect-scrollbar is with NPM.
|
||||||
It's registered on [npm](https://www.npmjs.org/package/perfect-scrollbar) as `perfect-scrollbar`.
|
It's registered on [npm](https://www.npmjs.com/package/perfect-scrollbar) as `perfect-scrollbar`.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ npm install perfect-scrollbar
|
$ npm install perfect-scrollbar
|
||||||
@ -257,12 +257,12 @@ define([
|
|||||||
'perfectScrollbarJquery'
|
'perfectScrollbarJquery'
|
||||||
],
|
],
|
||||||
function (angular) {
|
function (angular) {
|
||||||
var myApp = angular.module('myApp', [])
|
var app = angular.module('myApp', []);
|
||||||
.run(function() {
|
app.run(function () {
|
||||||
window.Ps = require('perfectScrollbar');
|
window.Ps = require('perfectScrollbar');
|
||||||
require('perfectScrollbarJQuery');
|
require('perfectScrollbarJQuery');
|
||||||
})
|
});
|
||||||
return myApp;
|
return app;
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -275,7 +275,7 @@ Ps.initialize(container);
|
|||||||
Ps.update(container);
|
Ps.update(container);
|
||||||
|
|
||||||
// or by jQuery:
|
// or by jQuery:
|
||||||
var imgLoader = $("#imgLoader")
|
var imgLoader = $('#imgLoader')
|
||||||
imgLoader.perfectScrollbar();
|
imgLoader.perfectScrollbar();
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -345,15 +345,15 @@ Ps.initialize(container, {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
Create a class name prefixed with `.ps-theme-`. Include `ps-container()` mixin. It's recommended to use `map-merge()` to extend `$ps-theme-default` map with your custom styles.
|
Create a class name prefixed with `.ps-theme-`. Include `ps-container()` mixin. It's recommended to use `map-merge()` to extend `$ps-theme-default` map with your custom styles.
|
||||||
```css#
|
```scss
|
||||||
.ps-theme-my-theme-name {
|
.ps-theme-my-theme-name {
|
||||||
@include ps-container(map-merge($ps-theme-default, (
|
@include ps-container(map-merge($ps-theme-default, (
|
||||||
border-radius: 0,
|
border-radius: 0,
|
||||||
scrollbar-x-rail-height: 20px,
|
scrollbar-x-rail-height: 20px,
|
||||||
scrollbar-x-height: 20px,
|
scrollbar-x-height: 20px,
|
||||||
scrollbar-y-rail-width: 20px,
|
scrollbar-y-rail-width: 20px,
|
||||||
scrollbar-y-width: 20px,)
|
scrollbar-y-width: 20px
|
||||||
));
|
)));
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.12.0"
|
"node": ">= 0.12.0"
|
||||||
},
|
},
|
||||||
|
"files": [
|
||||||
|
"dist",
|
||||||
|
"src",
|
||||||
|
"index.js",
|
||||||
|
"jquery.js"
|
||||||
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"browserify": "^11.2.0",
|
"browserify": "^11.2.0",
|
||||||
"del": "^2.0.2",
|
"del": "^2.0.2",
|
||||||
|
2
src/js/adaptor/jquery.js
vendored
2
src/js/adaptor/jquery.js
vendored
@ -24,8 +24,6 @@ function mountJQuery(jQuery) {
|
|||||||
ps.destroy(this);
|
ps.destroy(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return jQuery(this);
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user