Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganise projectormake source code #187

Open
zwetan opened this issue Oct 8, 2020 · 0 comments
Open

Reorganise projectormake source code #187

zwetan opened this issue Oct 8, 2020 · 0 comments
Labels
projectormake Utility to build projectors

Comments

@zwetan
Copy link
Member

zwetan commented Oct 8, 2020

Few rules

  • All our tools should reside into the package following this format corsaair.tools.{projectname}

for ex:

package corsaair.tools.projectormake
{

}
  • Inside this package we should follow standard naming for common things
    • main class for the program is App
    • common classes or properties
      • strings for string resources
      • config for configuration options
      • version for the program version

for ex:

package corsaair.tools.projectormake
{
    public class App
    {
        public var strings:Object;
        public var config:Object;
        public var version:String;
        
        public function App()
        {
            super();
        }
    }
}
  • the program's version should be configurable from the build
    • using a version.properties
    • using include
    • configuring the program at initialisation time

for ex:

package corsaair.tools.projectormake
{
    public class App
    {

        private var _version:String;

        public function App( version:String = "0.0.0" )
        {
            super();

            _version = version;
        }

        public function get version():String { return _version; }

    }
}

Version file ex:
version.properties


version.major=1
version.minor=2
version.patch=3

And bootstraping the app ex:
/src/projectormake.as

import corsaair.tools.projectormake.App;

var version:Object = {};
include "version.properties";
var versionstr:String = version.major + "." + version.minor + "." + version.patch;

var app:App = new App( versionstr );
    app.main();

@zwetan zwetan added the projectormake Utility to build projectors label Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
projectormake Utility to build projectors
Projects
None yet
Development

No branches or pull requests

1 participant