-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
21,115 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/.git/ | ||
/.github/ | ||
Dockerfile* | ||
node_modules | ||
/dist/ | ||
/examples/ | ||
/storybook-static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.github/ | ||
/dist/ | ||
/examples/ | ||
/storybook-static/ | ||
!/.storybook/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
parser: '@typescript-eslint/parser' | ||
env: | ||
browser: true | ||
es6: true | ||
node: true | ||
extends: | ||
- airbnb | ||
- airbnb/hooks | ||
- plugin:import/typescript | ||
- plugin:@typescript-eslint/eslint-recommended | ||
- plugin:@typescript-eslint/recommended | ||
- plugin:prettier/recommended | ||
- prettier | ||
- prettier/@typescript-eslint | ||
- prettier/react | ||
rules: | ||
react/jsx-filename-extension: | ||
- error | ||
- extensions: | ||
- '.jsx' | ||
- '.tsx' | ||
import/extensions: | ||
- error | ||
- '.ts': never | ||
'.tsx': never | ||
'.d.ts': never | ||
'.js': never | ||
'.jsx': never | ||
jsx-a11y/label-has-associated-control: | ||
- error | ||
- assert: either | ||
import/no-default-export: error | ||
import/prefer-default-export: off | ||
overrides: | ||
- files: | ||
- '**/*.tsx' | ||
rules: | ||
react/prop-types: off | ||
- files: | ||
- '**/*.stories.tsx' | ||
rules: | ||
import/no-default-export: off | ||
- files: | ||
- '**/*.js' | ||
- '**/*.jsx' | ||
- '**/*.stories.tsx' | ||
rules: | ||
'@typescript-eslint/explicit-function-return-type': off | ||
- files: | ||
- '.storybook/*.js' | ||
- '**/*.test.js' | ||
- '**/*.test.jsx' | ||
- '**/*.test.ts' | ||
- '**/*.test.tsx' | ||
- '**/*.stories.tsx' | ||
rules: | ||
import/no-extraneous-dependencies: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Jobs | ||
|
||
on: | ||
schedule: | ||
- cron: "43 21 * * *" | ||
push: | ||
branches: | ||
- "**" | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+**" | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- windows-latest | ||
- macos-latest | ||
- ubuntu-latest | ||
node-version: | ||
- 12.16.0 | ||
|
||
name: Test (${{ matrix.os }} ${{ matrix.node-version }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
|
||
- run: npm run lint | ||
- run: npm run test:ci | ||
- run: npm run deploy-storybook:ci -- --dry-run | ||
if: matrix.os == 'ubuntu-latest' | ||
- run: npm publish --dry-run | ||
if: matrix.os == 'ubuntu-latest' | ||
|
||
deploy-storybook: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.16.0 | ||
- run: npm ci | ||
|
||
- run: npm run deploy-storybook:ci | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
publish-npm: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.16.0 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm ci | ||
|
||
- run: npm run build | ||
- run: npm publish --dry-run | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | ||
|
||
publish-gpr: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.16.0 | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: npm ci | ||
|
||
- run: npm run build | ||
- run: npm publish --dry-run | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/dist/ | ||
/storybook-static/ | ||
|
||
|
||
# | ||
# Node | ||
# | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/__mocks__/ | ||
/.github/ | ||
/.storybook/ | ||
/examples/ | ||
/storybook-static/ | ||
*.test.* | ||
*.stories.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"arrowParens": "always", | ||
"endOfLine": "auto", | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
|
||
const path = require('path'); | ||
|
||
module.exports = { | ||
stories: ['../src/**/*.stories.tsx'], | ||
addons: [ | ||
'@storybook/preset-typescript', | ||
'@storybook/preset-scss', | ||
'@storybook/addon-docs', | ||
{ | ||
name: '@storybook/addon-storysource', | ||
options: { | ||
rule: { | ||
test: [/\.stories\.tsx?$/], | ||
}, | ||
loaderOptions: { | ||
parser: 'typescript', | ||
// eslint-disable-next-line global-require | ||
prettierConfig: require('../.prettierrc.json'), | ||
}, | ||
}, | ||
}, | ||
'@storybook/addon-actions', | ||
'@storybook/addon-links', | ||
'@storybook/addon-events', | ||
'@storybook/addon-knobs', | ||
'@storybook/addon-viewport', | ||
], | ||
webpackFinal: async (config) => { | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
use: [ | ||
{ | ||
loader: require.resolve('react-docgen-typescript-loader'), | ||
options: { | ||
// Provide the path to your tsconfig.json so that your stories can | ||
// display types from outside each individual story. | ||
tsconfigPath: path.resolve(__dirname, '../tsconfig.json'), | ||
}, | ||
}, | ||
], | ||
}); | ||
config.resolve.extensions.push('.ts', '.tsx'); | ||
return config; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { addDecorator } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
|
||
addDecorator(withKnobs); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:12.16.0 | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json . | ||
COPY package-lock.json . | ||
|
||
RUN npm ci | ||
|
||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# react-ngl | ||
|
||
[![Jobs](https://github.com/gky360/react-ngl/workflows/Jobs/badge.svg)](https://github.com/gky360/react-ngl/actions) | ||
|
||
React wrapper for ngl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
setupFilesAfterEnv: ['jest-enzyme'], | ||
testEnvironment: 'enzyme', | ||
moduleNameMapper: { | ||
'\\.(s?css|less)$': '<rootDir>/__mocks__/styleMock.js', | ||
}, | ||
testPathIgnorePatterns: [ | ||
'<rootDir>/node_modules/', | ||
'<rootDir>/examples/', | ||
'<rootDir>/storybook-static/', | ||
], | ||
}; |
Oops, something went wrong.