Samsung / cordova-plugin-toast

Cordova plugin that provides TV Specific functionalities.
Apache License 2.0
122 stars 60 forks source link

Changes related to the cordova project creation with template. ( for sample app ) #19

Closed yongjuYoon closed 7 years ago

yongjuYoon commented 8 years ago

Hello,

I notify about change points related to the "create cordova project with template".

When you create the cordova project for sample apps, untill now, we recommand the option, "--src".

But, after cordova v6.x.x, the cordova guide related to this, was changed. (Refer the related content under url) 「http://cordova.apache.org/docs/en/6.x/guide/cli/template.html#page-toc-source

So we converted to the template form which they stipulate in order to use that option. (They recommend "--template" option in place of "--src")

Accordingly, if you want to create the cordova project for sample apps, first, you have to check the cordova version ( requires 'cordova >= 6.0.0' ).

If the version is under than @6.0.0, you have to upgrade the cordova version.

In other words, when you create the project, follow under steps.

step 1. check the cordova version
        $ cordova -version

step 2. if 'cordova < v6.0.0',
            $ npm install -g cordova
        else, go to the step 3.

step 3. create project using "--template" option. (you can use "--src" option, not recommanded)
        $ cordova create sampleApp --template=cordova-plugin-toast/sample/media

「The reference url : https://github.com/Samsung/cordova-plugin-toast/wiki/Create-Project#how-to-create-toast-project

Related Issues.

Case 1. < 'cordova > v6.0.0' > probably you will see the error message as below if you use "--src" option. --src error message ⇒ This error is not serious but we recommand to use "--template" option.

Case 2. < 'cordova < v6.0.0' > probably it will not be used as you intend if you use "--src" option, because we converted to the template form which cordova stipulate. ⇒ Please update to latest cordova version.

Case 3. < 'cordova < v6.0.0' > probably it will not be used as you intend if you use "--template" option, because not supported. ⇒ Please update to latest cordova version.