Skip to content

Commit

Permalink
Merge 7fba125 into 3068d54
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Jan 12, 2024
2 parents 3068d54 + 7fba125 commit ec25466
Show file tree
Hide file tree
Showing 294 changed files with 30,701 additions and 81,488 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/beta.js.yml
Expand Up @@ -16,9 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Build
run: npm install && npm run build
working-directory: .
Expand All @@ -35,9 +35,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Build
run: npm install && npm run build
working-directory: .
Expand All @@ -56,7 +56,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 16
node-version: 20.10.0
- name: Bootstrap
run: npm install && npm run build
working-directory: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/node.js.yml
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
uses: actions/setup-node@v1
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- run: npm install
- run: npm run build
- run: npm run test -- --coverage
Expand All @@ -30,8 +30,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- run: npm install
- run: npm run test-18
12 changes: 6 additions & 6 deletions .github/workflows/release.js.yml
Expand Up @@ -17,9 +17,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Bootstrap
run: npm install && npm run build
working-directory: .
Expand All @@ -35,9 +35,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Bootstrap
run: npm install && npm run build
working-directory: .
Expand All @@ -53,9 +53,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Bootstrap
run: npm install && npm run build
working-directory: .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook.js.yml
Expand Up @@ -11,9 +11,9 @@ jobs:
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.10.0
- name: Install and Build 🔧
run: |
npm install
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -7,4 +7,5 @@ node_modules*
pubsub-debug.log
storybook-build/
coverage/
*.tsbuildinfo
*.tsbuildinfo
gen-docs/
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
v16.16.0
v20.10.0
2 changes: 1 addition & 1 deletion .storybook/.babelrc.json
Expand Up @@ -18,7 +18,7 @@
],
"@babel/preset-react",
"@babel/preset-typescript",
"@linaria/babel-preset"
"@linaria"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}
24 changes: 20 additions & 4 deletions .storybook/main.js
@@ -1,14 +1,15 @@
const { dirname, join } = require("path");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const ResolveTypeScriptPlugin = require("resolve-typescript-plugin");

module.exports = {
stories: ["../**/src/**/*.stories.tsx"],
addons: ["@storybook/addon-storysource", "@storybook/addon-controls"],
core: {
builder: "webpack5",
},
addons: ["@storybook/addon-storysource", getAbsolutePath("@storybook/addon-controls")],

typescript: {
reactDocgen: false,
},

webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
Expand All @@ -32,7 +33,22 @@ module.exports = {
});

config.optimization.minimize = false;
config.devtool = "source-map";
config.resolve.plugins = [new ResolveTypeScriptPlugin()];

return config;
},

framework: {
name: getAbsolutePath("@storybook/react-webpack5"),
options: {},
},

docs: {
autodocs: false,
},
};

function getAbsolutePath(value) {
return dirname(require.resolve(join(value, "package.json")));
}
2 changes: 1 addition & 1 deletion .storybook/manager.js
@@ -1,5 +1,5 @@
import { addons } from "@storybook/addons";
import { themes, create } from "@storybook/theming";
import { create } from "@storybook/theming";

const glideTheme = create({
base: "dark",
Expand Down
22 changes: 11 additions & 11 deletions .storybook/preview.js
@@ -1,14 +1,14 @@
import { addParameters } from "@storybook/react";

addParameters({
options: {
showRoots: true,
storySort: (a, b) => {
return a[1].name.localeCompare(b[1].name, undefined, { numeric: true });
const preview = {
parameters: {
layout: "fullscreen",
options: {
storySort: {
method: "alphabetical",
order: ["Glide-Data-Grid", "Extra Packages", "Subcomponents"],
locales: "en-US",
},
},
},
});

export const parameters = {
layout: "fullscreen",
};

export default preview;
24 changes: 0 additions & 24 deletions babel.cjs.json

This file was deleted.

48 changes: 48 additions & 0 deletions config/build-util.sh
@@ -0,0 +1,48 @@
run_in_parallel() {
local funcs=("$@")
local pids=()

# Start the functions in the background and store their PIDs
for func in "${funcs[@]}"; do
($func) &
pids+=($!)
done

# Wait for all functions and exit if any of them fail
for pid in "${pids[@]}"; do
wait $pid || exit $?
done
}

generate_index_css() {
echo "/* Auto-generated file */" > dist/index.css
find dist/esm -name '*.css' -print | sed 's/^dist\/esm\//\@import ".\/esm\//' | sed 's/$/";/' >> dist/index.css
}

ensure_bash_4() {
if [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
if [ -x "/opt/homebrew/bin/bash" ]; then
exec /opt/homebrew/bin/bash "$0" "$@"
elif [ -x "/usr/local/bin/bash" ]; then
exec /usr/local/bin/bash "$0" "$@"
else
echo "Bash 4 or higher is required."
exit 1
fi
fi
}

remove_all_css_imports() {
local directory=$1
local sed_cmd="sed -i"

# Check if sed is GNU sed or BSD sed
if sed --version 2>/dev/null | grep -q GNU; then
sed_cmd="sed -i" # GNU sed
else
sed_cmd="sed -i ''" # BSD sed
fi

find "$directory" -type f -name "*.js" -exec bash -c "$sed_cmd \"/require('.\/.*\.css');/d\" {}" \;
find "$directory" -type f -name "*.js" -exec bash -c "$sed_cmd \"/import \\\".*\.css\\\";/d\" {}" \;
}
3 changes: 3 additions & 0 deletions config/linaria.json
@@ -0,0 +1,3 @@
{
"classNameSlug": "gdg-[hash]"
}

0 comments on commit ec25466

Please sign in to comment.