diff --git a/src/bundles/torch/manifest.json b/src/bundles/torch/manifest.json new file mode 100644 index 0000000000..8e78b11177 --- /dev/null +++ b/src/bundles/torch/manifest.json @@ -0,0 +1,3 @@ +{ + "tabs": [] +} diff --git a/src/bundles/torch/package.json b/src/bundles/torch/package.json new file mode 100644 index 0000000000..ec790c2e3c --- /dev/null +++ b/src/bundles/torch/package.json @@ -0,0 +1,32 @@ +{ + "name": "@sourceacademy/bundle-torch", + "version": "1.0.0", + "private": true, + "dependencies": { + "@veehz/torch": "^0.1.2" + }, + "devDependencies": { + "@sourceacademy/modules-buildtools": "workspace:^", + "typescript": "^5.8.2" + }, + "type": "module", + "exports": { + ".": "./dist/index.js", + "./*": "./dist/*.js" + }, + "scripts": { + "build": "buildtools build bundle .", + "lint": "buildtools lint .", + "tsc": "buildtools tsc .", + "test": "buildtools test --project .", + "postinstall": "buildtools compile", + "serve": "yarn buildtools serve" + }, + "scripts-info": { + "build": "Compiles the given bundle to the output directory", + "lint": "Runs ESlint on the code in the bundle", + "serve": "Starts the modules server", + "test": "Runs unit tests defined for the bundle", + "tsc": "Runs the Typescript compiler and produces the library version of the bundle" + } +} diff --git a/src/bundles/torch/src/index.ts b/src/bundles/torch/src/index.ts new file mode 100644 index 0000000000..b946851558 --- /dev/null +++ b/src/bundles/torch/src/index.ts @@ -0,0 +1,8 @@ +/** + * Machine learning library based on PyTorch. + * + * @module torch + * @author Vee Hua Zhi + */ + +export * from '@veehz/torch'; diff --git a/src/bundles/torch/tsconfig.json b/src/bundles/torch/tsconfig.json new file mode 100644 index 0000000000..08714f0d68 --- /dev/null +++ b/src/bundles/torch/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../tsconfig.json", + "include": [ + "./src" + ], + "compilerOptions": { + "outDir": "./dist" + }, + "typedocOptions": { + "name": "torch" + } +} diff --git a/yarn.lock b/yarn.lock index 7cb1d56cf0..951478333c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4166,6 +4166,16 @@ __metadata: languageName: unknown linkType: soft +"@sourceacademy/bundle-torch@workspace:src/bundles/torch": + version: 0.0.0-use.local + resolution: "@sourceacademy/bundle-torch@workspace:src/bundles/torch" + dependencies: + "@sourceacademy/modules-buildtools": "workspace:^" + "@veehz/torch": "npm:^0.1.2" + typescript: "npm:^5.8.2" + languageName: unknown + linkType: soft + "@sourceacademy/bundle-unittest@workspace:^, @sourceacademy/bundle-unittest@workspace:src/bundles/unittest": version: 0.0.0-use.local resolution: "@sourceacademy/bundle-unittest@workspace:src/bundles/unittest" @@ -5846,6 +5856,13 @@ __metadata: languageName: node linkType: hard +"@veehz/torch@npm:^0.1.2": + version: 0.1.2 + resolution: "@veehz/torch@npm:0.1.2" + checksum: 10c0/09e531a2ca7db3b3bd6e38a0ffde9667b90975f506093a817f05b4c92145c32a944cb8c3052fdbbcdc0a18bc4f48410693be6a0f569fceb54fa7ba348ca1fbe7 + languageName: node + linkType: hard + "@vitejs/plugin-react@npm:^6.0.1": version: 6.0.1 resolution: "@vitejs/plugin-react@npm:6.0.1"