Boilerplate app for sensenet SPA development with React and Typescript
- An example Hello World React SPA with sensenet repository login, written in Typescript ✨
- An example Jest test with Enzyme 👓
- Preconfigured Webpack build 🧱
- prettier and eslint 💅
- husky lint & prettier precommit hook ⚓
Be sure that you have installed a GIT client, Node.JS (latest or LTS). You can use NPM or Yarn.
- Create a GIT repository with this template
- Clone your repository with
git clone <enter-your-git-repo-url-here>
- cd into the cloned directory
- Install the package dependencies with
npm install
oryarn install
- Start the Webpack dev server with
npm run start
oryarn start
- You can browse the app once the build has been finished at http://localhost:8080/
You can simply run npm run build
or yarn build
to create the bundle. It will saved to the ./bundle
directory
- Simply run
npm run test
oryarn test
to run the tests. A coverage report will be also generated to the./coverage
directory
- src
| - assets
| | - static assets like images, fonts, etc...
| - components
| | - generic components like forms, buttons, inputs
| - context
| | - React contexts and context providers
| - hooks
| | - Custom React hooks like useCurrentUser.
| ...
| main / container components, layouts
| ...
| - app.tsx - The main entry point of your application
| - index.tsx - React and Sensenet Repository initialization
| - style.css - generic css overrides