Skip to content

Commit

Permalink
Merge branch 'main' into change-street-component-parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Algorush committed Jun 27, 2024
2 parents 4fc7a90 + 42f3807 commit 1148f91
Show file tree
Hide file tree
Showing 280 changed files with 50,399 additions and 26,127 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["@babel/preset-env", ["@babel/preset-react", {"runtime": "automatic"}]]
}
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/editor/lib/TransformControls.js
src/lib/
48 changes: 48 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:react/jsx-runtime", "plugin:react-hooks/recommended", "standard", "plugin:storybook/recommended"],
"rules": {
"dot-notation": "off",
"indent": "off",
"multiline-ternary": "off",
"no-console": "off",
"no-lone-blocks": "off",
"no-mixed-spaces-and-tabs": "off",
"no-tabs": "off",
"no-useless-return": "off",
"no-var": "off",
"object-curly-newline": "off",
"object-shorthand": "off",
"prefer-const": "off",
"quotes": "off",
"react/jsx-indent-props": [2, 2],
"react/prop-types": "off",
"semi": [2, "always"],
"space-before-function-paren": "off"
},
"env": {
"browser": true,
"es2021": true,
"node": true
},
"globals": {
"AFRAME": true,
"STREET": true,
"THREE": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react"
],
"settings": {
"react": {
"version": "detect"
}
}
}
25 changes: 0 additions & 25 deletions .github/workflows/ci-script.yaml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test Cases
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Test Cases
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['22.x']
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix['node-version'] }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix['node-version'] }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Install dependencies
run: npm install

- name: Check Lint
run: npm run lint

- name: Check Build
run: npm run dist

- name: Tests
run: npm run test
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.DS_Store
node_modules
coverage
.nyc_output
.nyc_output
.cache
gh-pages/
npm-debug.log*
build/
*.sw[pomn]
dist/
/public/assets
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

./node_modules/.bin/lint-staged
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**
src/editor/lib/TransformControls.js
src/lib/
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "none"
}
74 changes: 74 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-onboarding',
'@storybook/addon-interactions',
'@storybook/addon-styling-webpack',
{
name: '@storybook/addon-styling-webpack',
options: {
rules: [
{
test: /\.css$/,
sideEffects: true,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
// Want to add more CSS Modules options? Read more here: https://github.com/webpack-contrib/css-loader#modules
modules: {
auto: true
}
}
}
]
},
{
test: /\.s[ac]ss$/,
sideEffects: true,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
// Want to add more CSS Modules options? Read more here: https://github.com/webpack-contrib/css-loader#modules
modules: {
auto: true
},
importLoaders: 2
}
},
require.resolve('resolve-url-loader'),
{
loader: require.resolve('sass-loader'),
options: {
// Want to add more Sass options? Read more here: https://webpack.js.org/loaders/sass-loader/#options
implementation: require.resolve('sass'),
sourceMap: true,
sassOptions: {}
}
}
]
}
]
}
}
],
framework: {
name: '@storybook/react-webpack5',
options: {
builder: {
useSWC: true
}
}
},
docs: {
autodocs: 'tag'
}
};

export default config;
16 changes: 16 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import '../src/editor/style/index.scss';
/** @type { import('@storybook/react').Preview } */

const preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export default preview;
Loading

0 comments on commit 1148f91

Please sign in to comment.