Install all dependencies
-npm install
npm install -g @microsoft/rush
+npm install
Navigate to the root folder and update rush dependencies
-rush update
+Build and create docs
+npm run build
Build, lint, create docs and run tests
-rush build
npm run test
+Run tests
+npm run test
If you are changing package versions or adding/removing any package dependencies, runrush update --purge --recheck --full
before building. Please check-in any files that change under common\ folder.
The minified version of this adds a negligible amount of code and loadtime to your source code and by using this library, your generated code can be better minified as it removes most references of Classname.prototype.XXX methods from the generated code.
Summary:
diff --git a/docs/typedoc/media/CONTRIBUTING.md b/docs/typedoc/media/CONTRIBUTING.md index d510f62..7d1b9fe 100644 --- a/docs/typedoc/media/CONTRIBUTING.md +++ b/docs/typedoc/media/CONTRIBUTING.md @@ -26,20 +26,16 @@ We strongly welcome and encourage contributions to this project. If making a lar ```sh npm install - npm install -g @microsoft/rush ``` -3. Navigate to the root folder and update rush dependencies +3. Build and create docs ```sh - rush update --recheck --full + npm run build ``` -4. Build, lint, create docs and run tests +4. Run tests ```sh - rush build npm run test ``` - -If you are changing package versions or adding/removing any package dependencies, run
**```rush update --purge --recheck --full```**
before building. Please check-in any files that change under common\ folder. diff --git a/lib/rollup.config.js b/lib/rollup.config.js index 0c5778e..4066254 100644 --- a/lib/rollup.config.js +++ b/lib/rollup.config.js @@ -3,7 +3,7 @@ import copy from "rollup-plugin-copy"; import replace from "@rollup/plugin-replace"; import minify from 'rollup-plugin-minify-es'; import cleanup from "rollup-plugin-cleanup"; -import dynamicRemove from "./tools/rollup/dist-es5/removeDynamic"; +import dynamicRemove from "../rollup/dist-es5/removeDynamic"; import { es3Check, es3Poly } from "@microsoft/applicationinsights-rollup-es3"; const UglifyJs = require('uglify-js'); diff --git a/lib/test/Selenium/Tests.html b/lib/test/Selenium/Tests.html index 54a9cfc..ca373e1 100644 --- a/lib/test/Selenium/Tests.html +++ b/lib/test/Selenium/Tests.html @@ -15,7 +15,7 @@ baseUrl: '../', paths: { qunit: "../../../common/Tests/External/qunit-1.23.1", - "@nevware21/ts-utils": "../node_modules/@nevware21/ts-utils/dist/es5/main/ts-utils" + "@nevware21/ts-utils": "../../../node_modules/@nevware21/ts-utils/dist/es5/main/ts-utils" } }); diff --git a/package.json b/package.json index b0dc729..5a9fa58 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,14 @@ "doc": "lib/docs" }, "scripts": { - "ci-install": "node common/scripts/install-run-rush.js check && node common/scripts/install-run-rush.js update", - "build": "node common/scripts/install-run-rush.js rebuild && npm run docs", + "build": "npm run build:rollup-plugin && grunt dynamicproto && npm run build:bundle && npm run docs", + "build:rollup-plugin": "cd rollup && npx tsc -p tsconfig.json", + "build:bundle": "cd lib && rollup -c rollup.config.js --bundleConfigAsCjs", "test": "grunt dynamicprototest", "rollup": "grunt rollup", - "rupdate": "node common/scripts/install-run-rush.js update --recheck --purge --full", + "lint": "grunt lint", "docs": "typedoc", - "fullClean": "git clean -xdf && npm install && rush update --recheck --purge --full", + "fullClean": "git clean -xdf && npm install", "fullCleanBuild": "npm run fullClean && npm run build", "npm_pack": "copyfiles README.md LICENSE lib && cd lib && npm pack", "npm_publish": "cd lib && node ../tools/release-tools/npm_publish.js .", @@ -43,14 +44,12 @@ }, "homepage": "https://github.com/microsoft/DynamicProto-JS#readme", "overrides": { - "glob": "7.2.3", - "form-data": "^2.5.5" + "minimatch": ">=3.1.2" }, "dependencies": { "@nevware21/ts-utils": ">= 0.13.0 < 2.x" }, "devDependencies": { - "@microsoft/rush": "5.172.1", "@nevware21/grunt-eslint-ts": "^0.5.2", "@nevware21/grunt-ts-plugin": "^0.5.2", "@rollup/plugin-node-resolve": "^15.0.1", @@ -73,6 +72,13 @@ "rollup": "^3.20.0", "rollup-plugin-cleanup": "^3.2.1", "typedoc": "^0.26.6", - "typescript": "^4.9.5" + "typescript": "^4.9.5", + "@microsoft/applicationinsights-rollup-es3": "^1.0.1", + "@rollup/plugin-commonjs": "^24.0.0", + "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-minify-es": "^1.1.1", + "uglify-js": "^3.13.7", + "magic-string": "^0.25.5", + "@types/glob": "^7.1.3" } } diff --git a/policheck-exclusions.xml b/policheck-exclusions.xml index 5c9ac9a..ff49bbc 100644 --- a/policheck-exclusions.xml +++ b/policheck-exclusions.xml @@ -1,7 +1,7 @@- COMMON\CONFIG\RUSH|DOCS\TYPEDOC\ASSETS|DOCS\TYPEDOC\INDEX.HTML|DOCS\TYPEDOC\MODULES.HTML +DOCS\TYPEDOC\ASSETS|DOCS\TYPEDOC\INDEX.HTML|DOCS\TYPEDOC\MODULES.HTML .GIT diff --git a/rollup/package.json b/rollup/package.json index 395a1b9..0688fd9 100644 --- a/rollup/package.json +++ b/rollup/package.json @@ -14,8 +14,7 @@ "main": "dist/node/removedynamic.js", "module": "dist-es5/removeDynamic.js", "types": "types/removeDynamic.d.ts", - "directories": { - }, + "directories": {}, "scripts": { "clean": "grunt clean", "build": "npm run build:esm && npm run build:bundle", @@ -34,8 +33,7 @@ }, "homepage": "https://github.com/microsoft/DynamicProto-JS#readme", "overrides": { - "glob": "7.2.3", - "form-data": "^2.5.5" + "minimatch": ">=3.1.2" }, "dependencies": { "@nevware21/ts-utils": ">= 0.13.0 < 2.x" diff --git a/rollup/tsconfig.json b/rollup/tsconfig.json index df78f20..7021006 100644 --- a/rollup/tsconfig.json +++ b/rollup/tsconfig.json @@ -11,9 +11,9 @@ "noEmitHelpers": false, "alwaysStrict": true, "declaration": true, - "declarationDir": "../lib/tools/rollup/types", + "declarationDir": "./types", "rootDir": "./src", - "outDir": "../lib/tools/rollup/dist-es5", + "outDir": "./dist-es5", "suppressImplicitAnyIndexErrors": true, "allowSyntheticDefaultImports": true, "removeComments": false, diff --git a/rush.json b/rush.json deleted file mode 100644 index 2983673..0000000 --- a/rush.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", - "npmVersion": "9.9.4", - "rushVersion": "5.172.1", - "projectFolderMaxDepth": 4, - "projects": [ - { - "packageName": "@microsoft/dynamicproto-rollup", - "projectFolder": "rollup", - "shouldPublish": false, - "reviewCategory": "tools" - }, - { - "packageName": "@microsoft/dynamicproto-js", - "projectFolder": "lib", - "shouldPublish": true - } - ] -}