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

Implementing ESBuild for all NodeJS/JS/TS Samples #815

Merged
merged 16 commits into from
Jun 30, 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
56 changes: 54 additions & 2 deletions .github/workflows/build-complete-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,10 @@ jobs:
name: 'app-sso'
version: '14.x'

- project_path: 'samples/app-sso/nodejs/client'
name: 'app-sso-client'
version: '14.x'

- project_path: 'samples/app-task-module/nodejs'
name: 'app-task-module'
version: '14.x'
Expand Down Expand Up @@ -607,9 +611,17 @@ jobs:
name: 'meetings-sidepanel'
version: '14.x'

- project_path: 'samples/meetings-sidepanel/nodejs/ClientApp'
name: 'meetings-sidepanel-clientapp'
version: '14.x'

- project_path: 'samples/meetings-stage-view/nodejs'
name: 'meetings-stage-view'
version: '14.x'

- project_path: 'samples/meetings-stage-view/nodejs/ClientApp'
name: 'meetings-stage-view-clientapp'
version: '14.x'

- project_path: 'samples/meetings-token-app/nodejs'
name: 'meetings-token-app'
Expand All @@ -619,6 +631,10 @@ jobs:
name: 'meeting-recruitment-app'
version: '14.x'

- project_path: 'samples/meeting-recruitment-app/nodejs/ClientApp'
name: 'meeting-recruitment-app-clientapp'
version: '14.x'

- project_path: 'samples/msgext-message-reminder/nodejs'
name: 'msgext-message-reminder'
version: '14.x'
Expand Down Expand Up @@ -695,10 +711,18 @@ jobs:
name: 'tab-channel-group-sso-quickstart'
version: '14.x'

- project_path: 'samples/tab-channel-group-sso-quickstart/js/api-server'
name: 'tab-channel-group-sso-quickstart-api-server'
version: '14.x'

- project_path: 'samples/tab-channel-group-sso-quickstart/ts'
name: 'tab-channel-group-sso-quickstart'
version: '14.x'

- project_path: 'samples/tab-channel-group-sso-quickstart/ts/api-server'
name: 'tab-channel-group-sso-quickstart'
version: '14.x'

- project_path: 'samples/tab-personal-quickstart/js'
name: 'tab-personal-quickstart'
version: '14.x'
Expand All @@ -711,10 +735,18 @@ jobs:
name: 'tab-personal-sso-quickstart'
version: '18.x'

- project_path: 'samples/tab-personal-sso-quickstart/js/api-server'
name: 'tab-personal-sso-quickstart-api-server'
version: '18.x'

- project_path: 'samples/tab-personal-sso-quickstart/ts'
name: 'tab-personal-sso-quickstart'
version: '18.x'

- project_path: 'samples/tab-personal-sso-quickstart/ts/api-server'
name: 'tab-personal-sso-quickstart-api-server'
version: '18.x'

- project_path: 'samples/tab-graph-toolkit/nodejs'
name: 'tab-graph-toolkit'
version: '14.x'
Expand Down Expand Up @@ -775,18 +807,34 @@ jobs:
name: 'graph-bulk-meetings'
version: '16.x'

- project_path: 'samples/graph-bulk-meetings/nodejs/client'
name: 'graph-bulk-meetings-client'
version: '16.x'

- project_path: 'samples/graph-change-notification-team-channel/nodejs'
name: 'graph-change-notification-team-channel'
version: '16.x'

- project_path: 'samples/graph-change-notification-team-channel/nodejs/client'
name: 'graph-change-notification-team-channel-client'
version: '16.x'

- project_path: 'samples/graph-pinned-messages/nodejs'
name: 'graph-pinned-messages'
version: '16.x'

- project_path: 'samples/graph-pinned-messages/nodejs/ClientApp'
name: 'graph-pinned-messages-clientapp'
version: '16.x'

- project_path: 'samples/graph-teams-tag/nodejs'
name: 'graph-teams-tag'
version: '16.x'

- project_path: 'samples/graph-teams-tag/nodejs/client'
name: 'graph-teams-tag-client'
version: '16.x'

- project_path: 'samples/incoming-webhook/nodejs/ClientApp'
name: 'incoming-webhook-client-app'
version: '16.x'
Expand Down Expand Up @@ -884,7 +932,11 @@ jobs:
version: '18.x'

- project_path: 'samples/app-anonymous-users/nodejs/ClientApp'
name: 'app-anonymous-users'
name: 'app-anonymous-users-clientapp'
version: '18.x'

- project_path: 'samples/app-anonymous-users/nodejs/api'
name: 'app-anonymous-users-api'
version: '18.x'

- project_path: 'samples/bot-sso-adaptivecard/nodejs'
Expand All @@ -911,7 +963,7 @@ jobs:
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm run build

build-java-samples:
runs-on: windows-latest
Expand Down
14 changes: 14 additions & 0 deletions samples/app-anonymous-users/nodejs/api/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['server/index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
4 changes: 3 additions & 1 deletion samples/app-anonymous-users/nodejs/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server/index.js",
"watch": "nodemon server/index.js",
"build": "node build.js",
"lint": "eslint .",
"server": "npm install && node server/index.js",
"manifest": "del \"appPackage\\appPackage.zip\" 2> nul && powershell Compress-Archive appPackage/* appPackage/appPackage.zip"
Expand All @@ -32,6 +33,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "^2.0.13"
"nodemon": "^2.0.13",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-checkin-location/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
20 changes: 11 additions & 9 deletions samples/app-checkin-location/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"start": "node ./index.js",
"watch": "nodemon ./index.js",
"build": "node build.js",
"lint": "eslint .",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -28,13 +29,14 @@
"isomorphic-fetch": "^3.0.0",
"memorystorage": "^0.12.0"
},
"devDependencies": {
"eslint": "^7.0.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "~2.0.4"
}
"devDependencies": {
"eslint": "^7.0.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "~2.0.4",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-complete-auth/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
20 changes: 11 additions & 9 deletions samples/app-complete-auth/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"start": "node ./index.js",
"watch": "nodemon ./index.js",
"build": "node build.js",
"lint": "eslint .",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -31,13 +32,14 @@
"multer": "^1.4.4",
"restify": "~8.5.1"
},
"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "^2.0.15"
}
"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "^2.0.15",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-complete-sample/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['server/index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
4 changes: 3 additions & 1 deletion samples/app-complete-sample/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node server/index.js",
"watch": "nodemon server/index.js",
"build": "node build.js",
"lint": "eslint .",
"server": "npm install && node server/index.js",
"manifest": "del \"appPackage\\appPackage.zip\" 2> nul && powershell Compress-Archive appPackage/* appPackage/appPackage.zip"
Expand Down Expand Up @@ -39,6 +40,7 @@
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1"
"eslint-plugin-standard": "^4.0.1",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-hello-world/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['src/app.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
6 changes: 4 additions & 2 deletions samples/app-hello-world/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Microsoft Teams Hello World sample app written in ES6 with Bot Framework v4 SDK",
"scripts": {
"start": "nodemon --exec babel-node src/app.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "node build.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,6 +38,7 @@
"del": "^5.1.0",
"gulp": "^3.9.1",
"gulp-zip": "^5.0.1",
"nodemon": "^2.0.3"
"nodemon": "^2.0.3",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-installation-using-qr-code/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
20 changes: 11 additions & 9 deletions samples/app-installation-using-qr-code/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"scripts": {
"start": "node ./index.js",
"watch": "nodemon ./index.js",
"build": "node build.js",
"lint": "eslint .",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -28,13 +29,14 @@
"isomorphic-fetch": "^3.0.0",
"memorystorage": "^0.12.0"
},
"devDependencies": {
"eslint": "^7.0.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "~2.0.4"
}
"devDependencies": {
"eslint": "^7.0.0",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "~2.0.4",
"esbuild": "^0.18.1"
}
}
14 changes: 14 additions & 0 deletions samples/app-link-unfurling-in-share-to-teams/nodejs/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const esbuild = require('esbuild');
esbuild.build({
entryPoints: ['index.js'],
bundle: true,
platform: 'node',
outfile: 'dist/index.js'
})
.then((r) => {
console.log(`Build succeeded.`);
})
.catch((e) => {
console.log("Error building:", e.message);
process.exit(1);
});
Loading
Loading