Skip to content

Commit

Permalink
feat(base): setup base for design system
Browse files Browse the repository at this point in the history
  • Loading branch information
kamleshchandnani committed Jan 29, 2020
1 parent 83f9495 commit c26f675
Show file tree
Hide file tree
Showing 30 changed files with 8,385 additions and 3,993 deletions.
3 changes: 3 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@babel/preset-env'],
};
24 changes: 24 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dependencies
node_modules

# testing
coverage

# build direcotries
public
build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

#error logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Do not ignore
!.storybook
28 changes: 28 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
extends: ['kentcdodds', 'kentcdodds/react', 'plugin:prettier/recommended'],
rules: {
'no-negated-condition': 'off',
'import/order': 'off',
'max-lines-per-function': 'off',
'no-console': ['warn'],
},
env: {
browser: true,
jest: true,
},
settings: {
'import/resolver': {
node: {
extensions: [
'.js',
'.web.js',
'.desktop.js',
'.mobile.js',
'.native.js',
'.ios.js',
'.android.js',
],
},
},
},
};
17 changes: 9 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
node_modules

# testing
/coverage
coverage

# production
/build
# build direcotries
public
build

# misc
.DS_Store
Expand All @@ -18,6 +15,10 @@
.env.test.local
.env.production.local

# error logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Do not ignore
!.storybook
24 changes: 24 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# dependencies
node_modules

# testing
coverage

# build direcotries
public
build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

#error logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Do not ignore
!.storybook
12 changes: 12 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
jsxBracketSameLine: false,
arrowParens: 'always',
};
10 changes: 10 additions & 0 deletions .storybook/web/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
// import all files ending in *.stories.js
stories: ['../../src/**/*.stories.js'],
addons: [
'@storybook/addon-docs',
'@storybook/addon-actions',
'@storybook/addon-knobs',
'@storybook/addon-links',
],
};
12 changes: 12 additions & 0 deletions .storybook/web/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { addons } from '@storybook/addons';
import { create } from '@storybook/theming/create';

const theme = create({
base: 'light',
brandTitle: 'Blade Design System',
});

addons.setConfig({
panelPosition: 'bottom',
theme,
});
11 changes: 11 additions & 0 deletions .storybook/web/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { ThemeProvider } from 'styled-components';
import { addDecorator } from '@storybook/react';

const theme = {};

addDecorator((Story) => (
<ThemeProvider theme={theme}>
<Story />
</ThemeProvider>
));
5 changes: 5 additions & 0 deletions .storybook/web/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* eslint-disable no-param-reassign */
module.exports = ({ config }) => {
config.resolve.extensions = ['.web.js', '.mjs', '.js', '.jsx', '.json'];
return config;
};
4 changes: 4 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
processors: ['stylelint-processor-styled-components'],
extends: ['stylelint-config-recommended', 'stylelint-config-styled-components'],
};
83 changes: 70 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,80 @@
{
"name": "blade",
"version": "0.1.0",
"private": true,
"name": "@razorpay/blade",
"author": "kamleshchandnani",
"version": "0.0.1",
"license": "MIT",
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"@storybook/addon-knobs": "5.3.9",
"@testing-library/jest-dom": "4.2.4",
"@testing-library/react": "9.3.2",
"@testing-library/user-event": "7.1.2",
"prop-types": "15.7.2",
"react": "16.12.0",
"react-dom": "16.12.0",
"styled-components": "5.0.0"
},
"devDependencies": {
"@babel/core": "7.8.3",
"@babel/preset-env": "7.8.3",
"@babel/preset-react": "7.8.3",
"@storybook/addon-actions": "5.3.9",
"@storybook/addon-docs": "5.3.9",
"@storybook/addon-links": "5.3.8",
"@storybook/addon-storyshots": "5.3.8",
"@storybook/addons": "5.3.8",
"@storybook/react": "5.3.8",
"@storybook/theming": "5.3.9",
"babel-eslint": "10.0.3",
"babel-loader": "8.0.6",
"babel-plugin-styled-components": "1.10.7",
"cz-conventional-changelog": "3.1.0",
"eslint": "6.8.0",
"eslint-config-kentcdodds": "14.7.0",
"eslint-config-prettier": "6.10.0",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.18.0",
"husky": "4.2.1",
"lint-staged": "10.0.4",
"prettier": "1.19.1",
"react-test-renderer": "16.12.0",
"semantic-release": "17.0.1",
"stylelint": "13.0.0",
"stylelint-config-recommended": "3.0.0",
"stylelint-config-styled-components": "0.1.1",
"stylelint-processor-styled-components": "1.9.0"
},
"peerDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0"
"styled-components": "^4.3.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"web": "npm run web:storybook",
"web:storybook": "start-storybook -c ./.storybook/web -p 9009 -s public",
"web:storybook:build": "build-storybook -c ./.storybook/web -o public",
"native": "",
"native:storybook": "",
"chromatic": "CHROMATIC_APP_CODE=gx0k8mh119 chromatic"
},
"husky": {
"hooks": {
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.(js|jsx)": [
"eslint",
"stylelint"
],
"*.(js|json|jsx)": [
"prettier --write"
]
},
"eslintConfig": {
"extends": "react-app"
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"browserslist": {
"production": [
Expand Down
Binary file removed public/favicon.ico
Binary file not shown.
43 changes: 0 additions & 43 deletions public/index.html

This file was deleted.

Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions public/manifest.json

This file was deleted.

2 changes: 0 additions & 2 deletions public/robots.txt

This file was deleted.

38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

Loading

0 comments on commit c26f675

Please sign in to comment.