Skip to content

Commit

Permalink
Widget gets the name pickr
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed Jun 3, 2018
1 parent 81e52c9 commit ecbba77
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
1 change: 0 additions & 1 deletion dist/color-picker.min.js

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/pickr.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions index.html
Expand Up @@ -8,8 +8,8 @@
<title>Color Picker</title>

<!-- CSS STYLESHEETS -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:200,400" rel="stylesheet">
<link href="dist/color-picker.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Montserrat:200,400,500" rel="stylesheet">
<link href="dist/pickr.min.css" rel="stylesheet">
<link href="gh-page/styles.css" rel="stylesheet">
</head>

Expand All @@ -25,7 +25,7 @@ <h1>Flat color picker</h1>
</main>


<script src="dist/color-picker.min.js"></script>
<script src="dist/pickr.min.js"></script>
<script src="gh-page/script.js"></script>
</body>

Expand Down
Binary file added logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions package.json
@@ -1,8 +1,8 @@
{
"name": "color-picker",
"version": "0.0.1",
"description": "UX Color picker",
"main": "color-picker.js",
"description": "Flat, Simple, Hackable Color-Picker.",
"main": "dist/pickr.js",
"scripts": {
"build": "webpack --mode production",
"dev": "webpack-dev-server --mode development"
Expand Down
10 changes: 5 additions & 5 deletions src/js/color-picker.js → src/js/pickr.js
Expand Up @@ -5,15 +5,15 @@
*/

// Import styles
import './../scss/color-picker.scss';
import '../scss/pickr.scss';

// Imports
import * as _ from './lib/utils';
import {HSLaColor} from './lib/hslacolor';
import Moveable from './helper/moveable';
import Selectable from './helper/selectable';

class ColorPicker {
class Pickr {

constructor(opt) {

Expand Down Expand Up @@ -350,14 +350,14 @@ function create(o) {
}

// Static methods
ColorPicker.utils = {
Pickr.utils = {
on: _.on,
off: _.off,
createElementFromString: _.createElementFromString
};

// Create instance via method
ColorPicker.create = (options) => new ColorPicker(options);
Pickr.create = (options) => new Pickr(options);

// Export
module.exports = ColorPicker;
module.exports = Pickr;
File renamed without changes.
8 changes: 4 additions & 4 deletions webpack.config.js
Expand Up @@ -5,17 +5,17 @@ module.exports = {

plugins: [
new MiniCssExtractPlugin({
filename: 'color-picker.min.css'
filename: 'pickr.min.css'
})
],

entry: './src/js/color-picker.js',
entry: './src/js/pickr.js',

output: {
path: __dirname + '/dist',
publicPath: 'dist/',
filename: 'color-picker.min.js',
library: 'ColorPicker',
filename: 'pickr.min.js',
library: 'Pickr',
libraryTarget: 'umd'
},

Expand Down

0 comments on commit ecbba77

Please sign in to comment.