osiota-dev

1.2.4 • Public • Published

Development helper for the osiota project

This repository contains helper scripts for the development of osiota.

Overview

Create App

Follow the next steps, to create a new osiota app based on the template repository. Using the template repository simplifies the maintaince of the base files. Most steps were automated by separate scripts located in the osiota-dev project.

Step 1.a: Create repository from template:

npx osiota-dev-new-module ../osiota-app-NAME
cd ../osiota-app-NAME

Step 2: Integrate:

Create (oder adapt) you osiota based application.

And run:

npm install

You may as well commit your changes.

Step 3: Create and edit schema file(s):

If you need to create the schema.json file, run for each osiota entry script file (here file.js):

npx osiota-dev-create-schema file.js
vim file-schema.json

And adapt it and the package file:

npx osiota-dev-adapt-ps 

Step 4: Generate README file:

npm run doc

Don't forget to commit:

git add package.json schema.json *-schema.json README.md
git commit -m "+package, schema and readme"

Step 5: Push the new repository:

Go to github and create a repository. We recommand using the same name as before.

git remote add origin git@github.com:MYNAME/osiota-app-NAME.git
git push --set-upstream origin master

ALTERNATIVE: If you are part of the osiota development team, you can use a helper script to create the repository automatically:

npx osiota-dev-upload-to-github-group

Step 6: Publish to npm:

npx osiota-dev-publish

Maintanance

Update generated files:

Update README:

npm run doc

Update package.json

npx osiota-dev-adapt-ps

Publish a new version:

A small change: 1.2.X
which just fixes something

npx osiota-dev-publish patch

A normal change: 1.X.0
which adds an additional feature

npx osiota-dev-publish minor

A big step: X.0.0
which is INCOMPATIBLE with the versions before.

npx osiota-dev-publish major

Update base repository

To update your repository to the newest version of the template repository:

npx osiota-dev-merge-base-repo

Migrate App

If you already have a git repository, providing an osiota app, you can migrate the commits with the following commands:

Step 1.b: Clone and adapt existing repository:

First you need the osiota-dev project:

git clone https://github.com/osiota/osiota-dev

Now clone and adapt an existing repository:

./osiota-dev/migrate-module git@gitlab.nerdbox.de:energy-router/REPO.git [osiota-app-NEWNAME]
cd osiota-app-NEWNAME

Follow step 2 and following of section Create app.

License

This software is released under the MIT license.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Readme

Keywords

none

Package Sidebar

Install

npm i osiota-dev

Weekly Downloads

9

Version

1.2.4

License

MIT

Unpacked Size

24.8 kB

Total Files

20

Last publish

Collaborators

  • simonwalz