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

chore: integrate Prettier and apply consistent code formatting #45

Merged
merged 5 commits into from
Jun 27, 2024
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "next/core-web-vitals"
"extends": ["next/core-web-vitals", "prettier"]
}
48 changes: 41 additions & 7 deletions .github/workflows/deploy.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,52 @@
name: Deploy CI
name: Test and Deploy

on:
push:
branches: [main, dev, beta]
branches: [main]
pull_request:
branches: [main, dev, beta]
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]

steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- name: Run Prettier check
run: npm run format:check

deploy:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
node-version: [18]

steps:
- uses: actions/checkout@v3
- name: Install vercel cli in global
run: npm install -g [email protected]
- uses: amondnet/vercel-action@v20

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm install

- uses: amondnet/vercel-action@v25
id: now-deployment-staging
if: github.ref != 'refs/heads/main'
with:
Expand All @@ -23,7 +56,8 @@ jobs:
scope: ${{ secrets.VERCEL_SCOPE }}
alias-domains: |
nujan-ide-{{BRANCH}}.vercel.app
- uses: amondnet/vercel-action@v20

- uses: amondnet/vercel-action@v25
id: now-deployment-production
if: github.ref == 'refs/heads/main'
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"dbaeumer.vscode-eslint",
"kamikillerto.vscode-colorize"
]
}
}
54 changes: 27 additions & 27 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Debug server-side",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev"
},
{
"name": "Debug client-side",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Debug full stack",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev",
"serverReadyAction": {
"pattern": "- Local:.+(https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
13 changes: 8 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
// "prettier.singleQuote": true,
"prettier.tabWidth": 2,
"prettier.useTabs": true,
"editor.rulers": [
80,
120
],
"editor.rulers": [80, 120],
"workbench.colorCustomizations": {
"editorRuler.foreground": "#c5124e75"
},
Expand All @@ -36,4 +39,4 @@
"source.organizeImports": "explicit"
},
"editor.wordWrap": "on"
}
}
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
![](https://res.cloudinary.com/don6qaqms/image/upload/v1696056044/k8w16co4k2nsjsrn7sup.jpg)


# What is Nujan?

Web IDE, powered by Nujan, is your ultimate browser-based IDE designed to simplify the journey of writing, testing, compiling, deploying, and interacting with smart contracts on TON. Write smart contracts from anywhere, No setups, no downloads, just pure convenience and versatility.

# What we offer 🤝
# What we offer 🤝

- User-friendly Code Editor & Syntax Highlighter
- Efficient File Manager & Compiler
Expand All @@ -16,20 +15,20 @@ Web IDE, powered by Nujan, is your ultimate browser-based IDE designed to simpli

We are pleased to announce that our project is now live, and you can access it at [ide.nujan.io](https://ide.nujan.io/)


## IDE Preview

![IDE Preview](/images/screenshot.jpg)

## 📖 Documentation

The documentation for Nujan can be found at [docs.nujan.io](https://docs.nujan.io/)


## Feedback

If you have any feedback, [please reach out to us](https://docs.google.com/forms/d/e/1FAIpQLScrneLuw7qST4FhgEEdUK3c2wXBTn0WmiTBZyMOMi_xnXvRDA/viewform )
If you have any feedback, [please reach out to us](https://docs.google.com/forms/d/e/1FAIpQLScrneLuw7qST4FhgEEdUK3c2wXBTn0WmiTBZyMOMi_xnXvRDA/viewform)

We have put significant effort into developing and refining our codebase, and we invite developers, collaborators, and enthusiasts to explore our repository. Your feedback, contributions, and engagement with our project are highly valued as we continue to evolve and improve our platform. Thank you for your interest, and we look forward to building a vibrant and productive community around our GitHub repository.

## License

[Business Source License 1.1](https://github.com/rahulyadav-57/ton-ide/blob/main/LICENSE)
11 changes: 7 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
/** @type {import('next').NextConfig} */

const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const withTM = require("next-transpile-modules")(["monaco-editor", "@tact-lang/opcode"]);
const withTM = require("next-transpile-modules")([
"monaco-editor",
"@tact-lang/opcode",
]);
const webpack = require("webpack");

const nextConfig = withTM({
Expand All @@ -11,7 +14,7 @@ const nextConfig = withTM({
config.resolve.alias = {
...config.resolve.alias,
vscode: require.resolve(
"@codingame/monaco-languageclient/lib/vscode-compatibility"
"@codingame/monaco-languageclient/lib/vscode-compatibility",
),
};

Expand All @@ -20,15 +23,15 @@ const nextConfig = withTM({
config.plugins.push(
new webpack.NormalModuleReplacementPlugin(/^node:/, (resource) => {
resource.request = resource.request.replace(/^node:/, "");
})
}),
);

if (!options.isServer) {
config.plugins.push(
new MonacoWebpackPlugin({
languages: ["typescript"],
filename: "static/[name].worker.js",
})
}),
);
}
return config;
Expand Down
44 changes: 43 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"format:check": "prettier --check --ignore-path .gitignore .",
"format:fix": "prettier --write --ignore-path .gitignore ."
},
"dependencies": {
"@codingame/monaco-jsonrpc": "^0.3.1",
Expand Down Expand Up @@ -70,7 +72,9 @@
"@types/mixpanel-browser": "^2.47.1",
"@types/react-syntax-highlighter": "^15.5.10",
"@types/uuid": "^9.0.1",
"eslint-config-prettier": "^9.1.0",
"monaco-editor-webpack-plugin": "^7.0.1",
"next-transpile-modules": "^10.0.0"
"next-transpile-modules": "^10.0.0",
"prettier": "^3.3.2"
}
}
8 changes: 4 additions & 4 deletions public/assets/ton/tonconnect-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"url": "https://ide.nujan.io/",
"name": "Nujan",
"iconUrl": "https://ide.nujan.io/images/logo.png"
}
"url": "https://ide.nujan.io/",
"name": "Nujan",
"iconUrl": "https://ide.nujan.io/images/logo.png"
}
Loading
Loading