create-cljs-app
Advanced tools
Comparing version 0.2.12 to 0.3.0
{ | ||
"name": "create-cljs-app", | ||
"version": "0.2.12", | ||
"version": "0.3.0", | ||
"description": "Set up a modern cljs app by running one command.", | ||
@@ -14,2 +14,3 @@ "main": "index.js", | ||
"sc": "shadow-cljs", | ||
"server": "shadow-cljs stop && shadow-cljs start", | ||
"start": "shadow-cljs watch lib", | ||
@@ -16,0 +17,0 @@ "build": "yarn clean && shadow-cljs release lib", |
@@ -70,9 +70,13 @@ # Create CLJS App [![Build Status](https://github.com/filipesilva/create-cljs-app/workflows/Node%20CI/badge.svg)](https://github.com/filipesilva/create-cljs-app/actions) | ||
├── app | ||
| ├── cards | ||
| | ├── devcards_runner.cljs | ||
| | ├── helpers.cljs | ||
| | └── test_runner.cljs | ||
| ├── core.cljs | ||
| └── core_spec.cljs | ||
| ├── hello.cljs | ||
| └── hello_cards.cljs | ||
└── e2e | ||
└── core.cljs | ||
└── core.cljs | ||
``` | ||
No configuration or complicated folder structures, just the files you need to build your app.<br> | ||
Once the installation is done, you can open your project folder: | ||
@@ -98,2 +102,14 @@ | ||
### `npm run cards` or `yarn cards` | ||
Runs the interactive live development enviroment.<br> | ||
You can use it to design, test, and think about parts of your app in isolation. | ||
This environment uses [Devcards](https://github.com/bhauman/devcards) and [React Testing Library](https://testing-library.com/docs/react-testing-library/intro). | ||
### `npm run build` or `yarn build` | ||
Builds the app for production to the `public` folder.<br> | ||
It correctly bundles all code and optimizes the build for the best performance. | ||
### `npm test` or `yarn test`, and `npm run e2e` or `yarn e2e` | ||
@@ -112,9 +128,14 @@ | ||
### `npm run build` or `yarn build` | ||
### `npm run report` or `yarn report` | ||
Builds the app for production to the `public` folder.<br> | ||
It correctly bundles all code and optimizes the build for the best performance. | ||
Make a report of what files contribute to your app size.<br> | ||
Consider [code-splitting](https://code.thheller.com/blog/shadow-cljs/2019/03/03/code-splitting-clojurescript.html) or using smaller libraries to make your app load faster. | ||
### `npm run server` or `yarn server` | ||
Starts a Shadow CLJS background server.<br> | ||
This will speed up starting time for other commands that use Shadow CLJS. | ||
## License | ||
Create CLJS App is open source software [licensed as MIT](https://github.com/filipesilva/create-cljs-app/blob/master/LICENSE). |
@@ -7,7 +7,10 @@ { | ||
"sc": "shadow-cljs", | ||
"server": "shadow-cljs stop && shadow-cljs start", | ||
"start": "shadow-cljs watch app", | ||
"cards": "shadow-cljs watch cards", | ||
"build": "yarn clean && shadow-cljs release app", | ||
"test": "shadow-cljs watch test --config-merge \"{:autorun true}\"", | ||
"test:once": "shadow-cljs compile test && node out/test.js", | ||
"test": "shadow-cljs compile test && node out/test.js", | ||
"test:watch": "shadow-cljs watch test --config-merge \"{:autorun true}\"", | ||
"e2e": "shadow-cljs compile e2e && node out/e2e.js", | ||
"report": "shadow-cljs run shadow.cljs.build-report app report.html", | ||
"lint": "clj-kondo --lint src", | ||
@@ -18,3 +21,9 @@ "format": "zprint-clj --hang -i \"./src/**/*.{clj,cljs,cljc,edn}\" -o ./ && zprint-clj -i \"./*.edn\" -o ./", | ||
"devDependencies": { | ||
"@testing-library/dom": "^6.10.1", | ||
"@testing-library/react": "^9.3.2", | ||
"clj-kondo": "2019.11.23", | ||
"highlight.js": "9.15.10", | ||
"jsdom": "^15.2.1", | ||
"jsdom-global": "^3.0.2", | ||
"marked": "^0.7.0", | ||
"rimraf": "~3.0.0", | ||
@@ -29,5 +38,5 @@ "serve-handler": "~6.1.2", | ||
"create-react-class": "~15.6.3", | ||
"react": "~16.12.0", | ||
"react-dom": "~16.12.0" | ||
"react": "~16.8.0", | ||
"react-dom": "~16.8.0" | ||
} | ||
} |
@@ -9,3 +9,3 @@ This project was bootstrapped with [Create CLJS App](https://github.com/filipesilva/create-cljs-app). | ||
Runs the app in the development mode.<br> | ||
Runs the app in development mode.<br> | ||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. | ||
@@ -20,6 +20,22 @@ The page will reload if you make edits. | ||
### `__CARDS__` | ||
Runs the interactive live development enviroment.<br> | ||
You can use it to design, test, and think about parts of your app in isolation. | ||
This environment uses [Devcards](https://github.com/bhauman/devcards) and [React Testing Library](https://testing-library.com/docs/react-testing-library/intro). | ||
### `__BUILD__` | ||
Builds the app for production to the `public` folder.<br> | ||
It correctly bundles all code and optimizes the build for the best performance. | ||
Your app is ready to be deployed! | ||
## Other useful scripts | ||
### `__TEST__` and `__E2E__` | ||
`__TEST__` launches the test runner in the interactive watch mode.<br> | ||
You can use `__TEST:ONCE__` to run the tests a single time, and `__E2E__` to run end-to-end tests. | ||
You can use `__TEST__` to run tests a single time, and `__E2E__` to run the end-to-end test app. | ||
`__TEST:WATCH__` launches tests in interactive watch mode.<br> | ||
@@ -34,9 +50,12 @@ See the ClojureScript [testing page](https://clojurescript.org/tools/testing) for more information. E2E tests use [Taiko](https://github.com/getgauge/taiko) to interact with a headless browser. | ||
### `__BUILD__` | ||
### `__REPORT__` | ||
Builds the app for production to the `public` folder.<br> | ||
It correctly bundles all code and optimizes the build for the best performance. | ||
Make a report of what files contribute to your app size.<br> | ||
Consider [code-splitting](https://code.thheller.com/blog/shadow-cljs/2019/03/03/code-splitting-clojurescript.html) or using smaller libraries to make your app load faster. | ||
Your app is ready to be deployed! | ||
### `__SERVER__` | ||
Starts a Shadow CLJS background server.<br> | ||
This will speed up starting time for other commands that use Shadow CLJS. | ||
## Useful resources | ||
@@ -43,0 +62,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
129316
20
497
138