Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor websocket/ from CommonJS to ESM #324

Merged
merged 11 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node 14
uses: actions/setup-node@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18.x'
- name: Install npm packages
run: npm install -g sass postcss-cli postcss autoprefixer
run: npm ci
- name: Build style.css
run: ./make_style.sh
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ backup*.json
custom_script_*
websocket/config.js
node_modules/
package-lock.json
db.json
tmp.sh
*.sql
Expand Down
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.DS_Store
node_modules
/build
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"useTabs": false,
"tabWidth": 2,
"printWidth": 100,
"singleQuote": false,
"trailingComma": "all",
"bracketSameLine": false
}
10 changes: 5 additions & 5 deletions make_style.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash
if ! [ -x "$(command -v sass)" ]; then
if ! [ -x "$(command -v npx sass)" ]; then
echo 'Error: sass is not installed.' >&2
exit 1
fi

if ! [ -x "$(command -v postcss)" ]; then
if ! [ -x "$(command -v npx postcss)" ]; then
echo 'Error: postcss is not installed.' >&2
exit 1
fi

if ! [ -x "$(command -v autoprefixer)" ]; then
if ! [ -x "$(command -v npx autoprefixer)" ]; then
echo 'Error: autoprefixer is not installed.' >&2
exit 1
fi
Expand All @@ -19,8 +19,8 @@ cd "$(dirname "$0")" || exit
build_style() {
echo "Creating $1 style..."
cp resources/vars-$1.scss resources/vars.scss
sass resources:sass_processed
postcss sass_processed/style.css sass_processed/martor-description.css sass_processed/select2-dmoj.css --verbose --use autoprefixer -d $2
npx sass resources:sass_processed
npx postcss sass_processed/style.css sass_processed/martor-description.css sass_processed/select2-dmoj.css --verbose --use autoprefixer -d $2
}

build_style 'default' 'resources'
Expand Down
Loading
Loading