Files
edx-platform/package.json
Kyle McCormick 303bf5ef3c build: npm run watch (experimental) (#32866)
Implements the `npm run watch` section of the assets ADR [1], plus some
modifications since I decided to switch from pywatchman to watchdog (see
ADR changes for justification). This will replace `paver watch_assets`
(edx-platform) and `openedx-assets watch-themes` (Tutor).

Specifically, this PR adds three experimental commands:

* `npm run watch-sass` : Watch for Sass changes with watchdog.
* `npm run watch-webpack` : Invoke Webpack-watch for JS changes.
* `npm run watch` : Invoke both `watch-sass` and `watch-webpack` simultaneously.

These commands are only intended to work in development mode. They have
been tested both on bare-metal edx-platform and through `tutor dev run`
on on Linux.

Before removing the "experimental" label, we need to:

* Test through Devstack on Linux.
* Test through Devstack and `tutor dev run` on macOS.
* Test on bare-metal macOS. Might not work, which is OK, but we should
  document that.
* Document the commands in edx-platform's README.
* Confirm that this not only works through `tutor dev run`, but also as
  a suitable replacement in the `watchthemes` service that Tutor runs
  automatically as part of `tutor dev start`. Tweak if necessary.

References:

1. https://github.com/openedx/edx-platform/blob/master/docs/decisions/0017-reimplement-asset-processing.rst

Part of: https://github.com/openedx/edx-platform/issues/31612
2023-07-27 16:33:32 +00:00

120 lines
4.5 KiB
JSON

{
"name": "edx",
"version": "0.1.0",
"repository": "https://github.com/openedx/edx-platform",
"scripts": {
"postinstall": "scripts/copy-node-modules.sh",
"build": "echo 'WARNING: `npm run build` in edx-platform is experimental. Use at your own risk.' && npm run webpack && npm run compile-sass",
"build-dev": "echo 'WARNING: `npm run build-dev` in edx-platform is experimental. Use at your own risk.' && npm run webpack-dev && npm run compile-sass-dev",
"webpack": "NODE_ENV=${NODE_ENV:-production} \"$(npm bin)/webpack\" --config=${WEBPACK_CONFIG_PATH:-webpack.prod.config.js}",
"webpack-dev": "NODE_ENV=development \"$(npm bin)/webpack\" --config=webpack.dev.config.js",
"compile-sass": "scripts/compile_sass.py --env=${NODE_ENV:-production}",
"compile-sass-dev": "scripts/compile_sass.py --env=development",
"watch": "echo 'WARNING: `npm run watch` in edx-platform is experimental. Use at your own risk.' && { npm run watch-webpack& npm run watch-sass& } && sleep infinity",
"watch-webpack": "npm run webpack-dev -- --watch",
"watch-sass": "scripts/watch_sass.sh"
},
"dependencies": {
"@babel/core": "7.19.0",
"@babel/plugin-proposal-object-rest-spread": "^7.18.9",
"@babel/plugin-transform-object-assign": "^7.18.6",
"@babel/preset-env": "^7.19.0",
"@babel/preset-react": "7.18.6",
"@edx/brand-edx.org": "^2.0.7",
"@edx/edx-bootstrap": "1.0.4",
"@edx/edx-proctoring": "^4.15.1",
"@edx/frontend-component-cookie-policy-banner": "2.2.0",
"@edx/paragon": "2.6.4",
"@edx/studio-frontend": "^2.1.0",
"axios": "^0.27.2",
"babel-loader": "8.2.5",
"babel-plugin-transform-class-properties": "6.24.1",
"babel-polyfill": "6.26.0",
"backbone": "1.4.1",
"backbone-associations": "0.6.2",
"backbone.paginator": "2.0.8",
"bootstrap": "4.0.0",
"camelize": "1.0.0",
"classnames": "2.3.1",
"css-loader": "0.28.8",
"datatables": "1.10.18",
"datatables.net-fixedcolumns": "3.2.6",
"edx-proctoring-proctortrack": "git+https://git@github.com/anupdhabarde/edx-proctoring-proctortrack.git#e439f14975fb32b726dfd874ed210529d158ea40",
"edx-ui-toolkit": "1.5.4",
"exports-loader": "0.6.4",
"file-loader": "1.1.6",
"font-awesome": "4.7.0",
"hls.js": "0.14.17",
"imports-loader": "0.7.1",
"jest-environment-jsdom": "^26.0.0",
"jquery": "2.2.4",
"jquery-migrate": "1.4.1",
"jquery.scrollto": "2.1.3",
"js-cookie": "3.0.1",
"jwt-decode": "^3.1.2",
"moment": "2.29.4",
"moment-timezone": "0.5.37",
"picturefill": "3.0.3",
"popper.js": "1.12.9",
"prop-types": "15.6.0",
"raw-loader": "0.5.1",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-focus-lock": "^1.19.1",
"react-redux": "5.0.7",
"react-router-dom": "5.1.2",
"react-slick": "0.29.0",
"redux": "3.7.2",
"redux-thunk": "2.2.0",
"requirejs": "2.3.6",
"rtlcss": "2.2.1",
"sass": "^1.54.8",
"sass-loader": "6.0.6",
"scriptjs": "2.5.9",
"string-replace-webpack-plugin": "0.1.3",
"style-loader": "0.18.2",
"svg-inline-loader": "0.8.2",
"uglify-js": "2.7.0",
"underscore": "1.8.3",
"underscore.string": "3.3.6",
"universal-cookie": "^4.0.4",
"webpack": "2.7.0",
"webpack-bundle-tracker": "0.4.3",
"webpack-merge": "4.1.1",
"whatwg-fetch": "2.0.3",
"which-country": "1.0.0"
},
"devDependencies": {
"@edx/eslint-config": "^3.1.1",
"@edx/mockprock": "github:openedx/mockprock#85a9a8577149cd7c88fd5e8e84e280a8ce40a218",
"@edx/stylelint-config-edx": "2.2.0",
"babel-jest": "26.0.0",
"edx-custom-a11y-rules": "1.0.6",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"eslint-import-resolver-webpack": "0.8.4",
"jasmine-core": "2.6.4",
"jasmine-jquery": "git+https://git@github.com/velesin/jasmine-jquery.git#ebad463d592d3fea00c69f26ea18a930e09c7b58",
"jest": "26.0.0",
"jest-enzyme": "6.0.2",
"karma": "0.13.22",
"karma-chrome-launcher": "0.2.3",
"karma-coverage": "0.5.5",
"karma-firefox-launcher": "0.1.7",
"karma-jasmine": "0.3.8",
"karma-jasmine-html-reporter": "0.2.2",
"karma-junit-reporter": "1.1.0",
"karma-requirejs": "0.2.6",
"karma-selenium-webdriver-launcher": "0.0.4",
"karma-sourcemap-loader": "0.3.7",
"karma-spec-reporter": "0.0.20",
"karma-webpack": "2.0.9",
"plato": "1.7.0",
"react-test-renderer": "16.4.0",
"selenium-webdriver": "3.4.0",
"sinon": "2.3.5",
"squirejs": "0.1.0",
"stylelint-formatter-pretty": "1.0.3"
}
}