-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restore test command and deal with standard deps (#13)
* fix: restore test command and deal with standard deps * fix: local ref standard-lib * fix: revert to explicit duplication of standard libs * docs: complete barebones documentation * chore: move version to top of root package.json * chore: remove circular dep in build process * Update package.json
- Loading branch information
Showing
32 changed files
with
7,653 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import App from './App' | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div') | ||
ReactDOM.render(<App />, div) | ||
ReactDOM.unmountComponentAtNode(div) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "", | ||
"version": "1.0.0", | ||
"description": "", | ||
"license": "BSD-3-Clause", | ||
"private": true | ||
"name": "", | ||
"version": "1.0.0", | ||
"description": "", | ||
"license": "BSD-3-Clause", | ||
"private": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
verbose: true, | ||
transform: JSON.stringify({ | ||
'^.+\\.[t|j]sx?$': require.resolve('./jest.transform.js'), | ||
}), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const babelConfig = require('./babel.config') | ||
module.exports = require('babel-jest').createTransformer(babelConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"@dhis2/app-runtime": "^1.5.1", | ||
"@dhis2/d2-i18n": "^1.0.5", | ||
"@dhis2/ui-core": "^3.7.1", | ||
"classnames": "^2.2.6", | ||
"moment": "^2.24.0", | ||
"prop-types": "^15.7.2", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"styled-jsx": "^3.2.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
- [Tutorials](tutorials/) | ||
- | | ||
- [**Platform**](/) | ||
- [Runtime](https://runtime.dhis2.nu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# App Platform CLI | ||
|
||
```sh | ||
> d2 app build | ||
``` | ||
The application platform comes with a CLI. This CLI is analogous to `react-scripts` in that it is the **only required dependency** for a functional and modern DHIS2 application. It can be used standalone, usually for the purposes of standing up new application repositories, or (more commonly) added as a dev dependency in the application's package.json. | ||
|
||
To run the `init` command of the CLI as a stand-alone tool, either install the DHIS2 cli globally (`yarn global add @dhis2/cli`) and run `d2 app scripts init myapp`, or run it dynamically with `npx` (`npx @dhis2/cli-app-scripts init myapp`) | ||
|
||
To install the CLI as a dev dependency (this is done for you by the `init` command) run `yarn add --dev @dhis2/cli-app-scripts`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# d2 app scripts build | ||
|
||
Create a standalone production app build in the `./build` directory | ||
|
||
```sh | ||
> d2 app scripts build --help | ||
d2-app-scripts build | ||
|
||
Build a production app bundle for use with the DHIS2 app-shell | ||
|
||
Options: | ||
--cwd working directory to use (defaults to cwd) | ||
--version Show version number [boolean] | ||
--config Path to JSON config file | ||
--mode Specify the target build environment | ||
[choices: "development", "production"] [default: production] | ||
--dev Build in development mode [boolean] | ||
--watch Watch source files for changes [boolean] [default: false] | ||
-h, --help Show help [boolean] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# d2 app scripts init | ||
|
||
Bootraps a new (or updates an existing) DHIS2 application in the directory `./<name>`, installing all required dependencies. | ||
|
||
```sh | ||
> d2 app scripts init --help | ||
d2-app-scripts init <name> | ||
|
||
Initialize a DHIS2 app or library for use with the DHIS2 app platform | ||
|
||
Options: | ||
--cwd working directory to use (defaults to cwd) | ||
--version Show version number [boolean] | ||
--config Path to JSON config file | ||
--force Overwrite existing files and configurations | ||
[boolean] [default: false] | ||
--lib Create a library [boolean] [default: false] | ||
-h, --help Show help [boolean] | ||
``` |
Oops, something went wrong.