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

New build process #217

Open
chris-steele opened this issue Feb 28, 2023 · 2 comments
Open

New build process #217

chris-steele opened this issue Feb 28, 2023 · 2 comments
Assignees
Labels
enhancement New or additional functionality R&D Requires research/discussion

Comments

@chris-steele
Copy link
Contributor

chris-steele commented Feb 28, 2023

UPDATE

A new build process has been created to:

  • use rollup as the bundler rather than requirejs
  • fully utilise ES6 and beyond
  • be backwards compatible with existing code base
  • pave the way to use React (N.B. already tested working)
  • compile sources in situ rather than copying them
  • watch sources and compile on change
  • no longer need to restart backend stack when working on UI
  • cache bundler output for faster builds

Much of this work has been inspired by the Adapt framework.

See https://github.com/adapt-security/adapt-authoring-ui/tree/new-build-process (N.B. this is based off RC2)

Use Grunt to improve UI workflow

If the development focus is only on UI code we can avoid restarting the npm start command by using a variety of Grunt tasks.

Assume that:

  • packages under development are kept in a workspace (e.g. local_adapt_modules)
  • packages use a common name for their UI plugins (e.g. ui-plugin)

A further assumption is that bundling/transpiling is not required because js sources are used directly in the browser; the only compilation is of less and hbs files.

Setup watch on:

  • adapt-authoring-ui/app
  • */ui-plugin

Note that the npm start command would need to be restarted if:

  • backend code is modified (i.e. code outside of ui-plugin)
  • a new package is added for development

Note

Additional work is currently being done to achieve similar goals that will:

  • not require the use of Grunt
  • provide the ability to use React to develop UI components
@chris-steele chris-steele added the R&D Requires research/discussion label Feb 28, 2023
@chris-steele chris-steele self-assigned this Feb 28, 2023
@chris-steele
Copy link
Contributor Author

N.B. @joe-allen-89 @taylortom I've created this issue to formalise the work and have pushed the code to grunt-demo

@chris-steele chris-steele added the enhancement New or additional functionality label Feb 28, 2023
@chris-steele chris-steele changed the title grunt-demo Use of Grunt to improve UI workflow Feb 28, 2023
@chris-steele chris-steele changed the title Use of Grunt to improve UI workflow Use Grunt to improve UI workflow Feb 28, 2023
@taylortom taylortom transferred this issue from adapt-security/adapt-authoring Mar 14, 2023
@taylortom taylortom moved this from New to Assigned in adapt-authoring: The TODO Board Mar 14, 2023
@chris-steele
Copy link
Contributor Author

@joe-allen-89 @taylortom updated this issue to describe the New Way™

Any and all feedback/help welcome

@chris-steele chris-steele changed the title Use Grunt to improve UI workflow New build process Mar 21, 2023
@taylortom taylortom moved this from Assigned to Needs Reviewing in adapt-authoring: The TODO Board Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or additional functionality R&D Requires research/discussion
Projects
Status: Needs Reviewing
Development

No branches or pull requests

1 participant