[Pkg-javascript-devel] packaging and debuging of the javascript part of ipywidgets

picca picca at debian.org
Tue Dec 24 12:39:52 GMT 2024


The package.json files contain a bunch of scripts

but the nodejs sequence only knows about these files.

---

# Order is important here, example: tsc must be launched before other
my @knwonBuildFiles = (
     [ 'Gruntfile.js'     => ['grunt'] ],
     [ 'Gruntfile.coffee' => ['grunt'] ],

     #[ 'tsconfig.json'     => ['tsc'] ],
     [ 'gulpfile.js'       => ['gulp'] ],
     [ 'rollup.config.js'  => [ 'rollup',  '-c' ] ],
     [ 'rollup.config.mjs' => [ 'rollup',  '-c' ] ],
     [ 'webpack.config.js' => [ 'webpack', '--mode', 'production' ] ],
     [ 'webpackfile.js'    => [ 'webpack', '--mode', 'production' ] ],
);

---

--- package.json
{
   "private": true,
   "workspaces": [
     "packages/*",
     "python/widgetsnbextension",
     "examples/*",
     "python/jupyterlab_widgets"
   ],
   "scripts": {
     "build": "lerna run build --stream --ignore 
\"@jupyter-widgets/example-*\"",
     "build:examples": "lerna run build --stream --scope 
\"@jupyter-widgets/example-*\" --include-filtered-dependencies",
     "build:labextension": "lerna run --stream build:labextension",
     "build:lib": "lerna run build --stream --scope 
\"@jupyter-widgets/meta\"",
     "build:nbextension": "lerna run --stream build:nbextension",
     "build:test": "lerna run build:test --stream --ignore 
\"@jupyter-widgets/example-*\"",
     "clean": "lerna run --stream clean",
     "docs": "typedoc",
     "eslint": "eslint . --fix --ignore-path .gitignore --ext .ts,.tsx",
     "eslint:check": "eslint . --ignore-path .gitignore --ext .ts,.tsx",
     "integrity": "node scripts/package-integrity.js",
     "integrity2": "node buildutils/lib/integrity.js",
     "lint": "yarn && yarn prettier && yarn eslint",
     "lint:check": "yarn prettier:check && yarn eslint:check",
     "prettier": "yarn prettier:base --list-different --write",
     "prettier:base": "prettier --ignore-path .gitignore 
\"**/*{.ts,.tsx,.js,.jsx,.css,.json,.yml,.yaml,.md}\"",
     "prettier:check": "yarn prettier:base --check",
     "publish": "yarn clean && yarn build && lerna publish --pre-dist-tag 
next from-git",
     "sort-package-json": "lerna exec --stream --parallel 
sort-package-json && sort-package-json",
     "update-dependency": "update-dependency --lerna",
     "updated": "lerna updated",
     "bump": "yarn clean && yarn build && lerna version --no-push -m 
\"Bump version\" ",
     "watch": "lerna run --stream watch"
   },
   "husky": {
     "hooks": {
       "pre-commit": "lint-staged",
       "pre-push": "yarn integrity"
     }
   },
   "resolutions": {
     "typescript": "~4.9.4"
   },
   "devDependencies": {
     "@jupyterlab/buildutils": "^3.5.2 || ^4.0.0",
     "@typescript-eslint/eslint-plugin": "^5.48.2",
     "@typescript-eslint/parser": "^5.48.2",
     "eslint": "^8.32.0",
     "eslint-config-prettier": "^8.6.0",
     "eslint-plugin-prettier": "^4.2.1",
     "glob": "^10.2.4",
     "husky": "^7.0.4",
     "lerna": "^5.4.3",
     "lint-staged": "^12.1.3",
     "prettier": "^2.8.3",
     "rimraf": "^5.0.1",
     "sort-package-json": "^2.1.0",
     "typedoc": "~0.23.24",
     "typescript": "~4.9.4"
   },
   "engines": {
     "node": ">=14",
     "npm": "please-use-yarn",
     "yarn": ">=3"
   }
}



More information about the Pkg-javascript-devel mailing list