Skip to content

Commit ccf1f53

Browse files
committed
Initial commit with contributors
v0.1.3 lintfix tests ready test-watch
1 parent bac0298 commit ccf1f53

21 files changed

+1029
-84
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
colors.js

.eslintrc

-17
This file was deleted.

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
.scripts
2+
.storybook
13
src
24
.babelrc
5+
*.log

.scripts/lint.cmd

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
call .\node_modules\.bin\eslint %1 --ext .jsx --ext .js %2
3+
rem Please no errors

.scripts/prepublish.cmd

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
echo Transpiling 'src' into ES5 ...
3+
echo ...
4+
if exist dist (
5+
rem rmdir /S /Q dist
6+
)
7+
call .\node_modules\.bin\babel --ignore tests,stories --plugins "transform-runtime" ./src --out-dir ./dist
8+
echo ...
9+
echo Transpiling completed.

.scripts/publish_storybook.cmd

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@echo off
2+
3+
setlocal enabledelayedexpansion
4+
5+
set GIT_URL_CMD=git config --get remote.origin.url
6+
for /F "usebackq delims=" %%v in (`%GIT_URL_CMD%`) do set GIT_URL=%%v
7+
8+
if %GIT_URL%=="" (
9+
echo This project is not configured with a remote git repo
10+
exit 1
11+
)
12+
13+
if exist .out (
14+
rmdir /S /Q .out
15+
)
16+
17+
md .out
18+
19+
call build-storybook -o .out
20+
21+
cd .out
22+
23+
git init
24+
git config user.name "GH Pages Bot"
25+
git config user.email "windows@ghbot.com"
26+
git add .
27+
git commit -m "Deploy Storybook to GitHub Pages"
28+
git push --force --quiet !GIT_URL! master:gh-pages
29+
30+
cd ..
31+
rmdir /S /Q .out
32+
33+
set GHP_URL_CMD=node .scripts/get_gh_pages_url.js !GIT_URL!
34+
for /F "usebackq delims=" %%w in (`%GHP_URL_CMD%`) do set GHP_URL=%%w
35+
36+
echo ## Deploy >storybook.md
37+
echo Storybook deployed to: [!GHP_URL!](!GHP_URL!)>>storybook.md
38+
39+
echo .
40+
echo Storybook deployed to: !GHP_URL!
41+
echo See the %cd%\storybook.md
42+
43+
endlocal

.scripts/test-watch.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e:\Develop\NodeJS\cmder\vendor\git-for-windows\usr\bin\mintty.exe /bin/bash -l

.scripts/test-watch.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
./node_modules/.bin/mocha --require .scripts/mocha_runner src/**/tests/**/*.js --watch --watch-extensions jsx
4+

.scripts/test.cmd

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
call .\node_modules\.bin\mocha --require .scripts/mocha_runner src/**/tests/**/*.js
3+
rem Please no errors
4+

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
# React Material Color Picker Component
22

33
React Material Color Picker Component
4+
5+
## Install
6+
7+
$ npm i react-material-color-picker --save
8+
9+
## Usage
10+
11+
~~~
12+
import React from 'react';
13+
import MaterialColorPicker from 'react-material-color-picker';
14+
15+
<div>
16+
<MaterialColorPicker />
17+
</div>
18+
~~~
19+

mochacfg.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require.extensions['.png'] = function(){ return null; }

package.json

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
11
{
22
"name": "react-material-color-picker",
3-
"version": "0.0.0",
3+
"version": "0.9.2",
44
"description": "React Material Color Picker Component",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/you/repo.git"
7+
"url": "https://UsulPro@bitbucket.org/sm-artlight/react-material-color-picker.git"
88
},
9+
"keywords": [
10+
"React",
11+
"Material",
12+
"Color",
13+
"Picker",
14+
"Component"
15+
],
16+
"author": "UsulPro",
917
"license": "MIT",
18+
"homepage": "https://bitbucket.org/sm-artlight/react-material-color-picker#readme",
1019
"scripts": {
11-
"prepublish": ". ./.scripts/prepublish.sh",
12-
"lint": "eslint src",
13-
"lintfix": "eslint src --fix",
14-
"testonly": "mocha --require .scripts/mocha_runner src/**/tests/**/*.js",
20+
"publish-storybook": ".scripts\\publish_storybook.cmd",
21+
"prepublish": ".scripts\\prepublish.cmd",
22+
"lint": ".scripts\\lint.cmd src",
23+
"lintfix": ".scripts\\lint.cmd src --fix",
24+
"testonly": ".scripts\\test.cmd",
1525
"test": "npm run lint && npm run testonly",
16-
"test-watch": "npm run testonly -- --watch --watch-extensions js",
26+
"test-watch": "bash .scripts\\test-watch.sh",
1727
"storybook": "start-storybook -p 9010",
18-
"publish-storybook": "bash .scripts/publish_storybook.sh"
28+
"start": "start-storybook -p 9001"
1929
},
2030
"devDependencies": {
2131
"react": "^15.0.0",
@@ -53,7 +63,7 @@
5363
"dependencies": {
5464
"babel-runtime": "^6.5.0"
5565
},
56-
"main": "dist/index.js",
66+
"main": "dist/MaterialColorPicker.js",
5767
"engines": {
5868
"npm": "^3.0.0"
5969
}

0 commit comments

Comments
 (0)