Skip to content
Permalink
Browse files
doc(README): fix markdown lint warnings & add npm badge (#64)
  • Loading branch information
erisu committed Apr 1, 2020
1 parent 10f8626 commit 887d4b9258dec2badb4a80b1efa0a1b17733cb50
Showing 1 changed file with 16 additions and 5 deletions.
@@ -21,12 +21,16 @@

# Apache Cordova Hello World Application

[![NPM](https://nodei.co/npm/cordova-app-hello-world.png)](https://nodei.co/npm/cordova-app-hello-world/)

A simple Hello World application that serves two purposes:

- It is used as the default app template when creating new projects
- It is a reference for building and publishing custom Cordova Templates

## Structure of your template
```

```text
template_package
├── package.json (for your template package to be published on npm)
├── index.js
@@ -35,21 +39,27 @@ template_package
├── config.xml
└── (files and folders that make up the template)
```

### Outside of `template_src`
All files outside of `template_src` are used to define parameters about the template. These files are not copied over at creation, so feel free to add a README or any other files outside of template_src.

All files outside of `template_src` are used to define parameters about the template. These files are not copied over at creation, so feel free to add a README or any other files outside of `template_src`.

#### index.js
`index.js` points to where the template exists. You'll see that index.js usually looks like:

`index.js` points to where the template exists. You'll see that `index.js` usually looks like:

```javascript
var path = require('path');
const path = require('path');
module.exports = {
dirname : path.join(__dirname, 'template_src')
};
```

#### package.json
This `package.json` holds *information about the template itself* like its name, version etc. All templates should contain the keyword `"cordova:template"` so that the template is searchable on npm. For example:

This `package.json` holds *information about the template itself* like its `name`, `version` etc. All templates should contain the keyword `"cordova:template"` so that the template is searchable on npm. For example:

```json
{
"name": "cordova-example-template",
@@ -62,6 +72,7 @@ This `package.json` holds *information about the template itself* like its name,
```

### Inside of `template_src`

All files inside of `template_src` compose the template from which a user would desire in order to create their project. Everything in this folder is copied over to the created project.

The package.json in `template_src` should be filled with information that describes *the project that would be created from the template*.

0 comments on commit 887d4b9

Please sign in to comment.