https://github.com/buildit/aem-react-scaffold
Scaffold project for using React within AEM
https://github.com/buildit/aem-react-scaffold
Last synced: over 1 year ago
JSON representation
Scaffold project for using React within AEM
- Host: GitHub
- URL: https://github.com/buildit/aem-react-scaffold
- Owner: buildit
- License: other
- Created: 2016-07-20T16:05:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-23T08:15:29.000Z (almost 10 years ago)
- Last Synced: 2025-02-04T23:31:49.951Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 45.9 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# AEM-React Scaffold Project
This is a scaffold project for getting React components working within AEM. It is based on this project https://github.com/sinnerschrader/aem-react-js
## Build/deploy to AEM
To quickly build and deploy after cloning:
```shell
npm install
npm run deploy
```
### NPM scripts in detail
* Create new component with generator: `npm run generator`
* Build: `npm run build`
* Test (watch and produce HTML reports): `npm run test`
* Test (single run for prod and cobertura reports): `npm run test:prod`
* Build & test (single run): `npm run start`
* Deploy to AEM (will build, run tests and push to AEM): `npm run deploy`
* Run storybook on local server: `npm run storybook`
### Creating components
You should use the generator to create components. This will make sure things go in the right place plus
it will generate the AEM boilerplate code that needs to go with each component. The project is setup so that
you can have a deployable site (_src/com_) and an associated styleguide site (_src/styleguide_). Feel free to
rearrange as needed but keep in mind you'll have to update the generator if you change these paths.
_src/content_ has the AEM boilerplate. Normally you do not have to touch this, however you may need to if
you want to start restricting what can and cannot be shown in the sidekick when authoring.
In general you should only be working in _src/com_ and _src/styleguide_.
### Sample page
A sample page is included at http://localhost:4502/content/react-demo/sample-page.html?wcmmode=disabled
After deployment you should be able to see it. This contains the sample components under the src directory.
### Related projects
* [Yeoman generator for creating components](https://www.npmjs.com/package/generator-aem-with-react)
* [AEM-with-react package](https://www.npmjs.com/package/aem-with-react)
This project is based on the [AEM React](https://github.com/sinnerschrader/aem-react) project by [SinnerSchrader](https://github.com/sinnerschrader).