mix: create new module in existing project - module

Is there any handy mix command to add a new module to an existing elixir project?
I use elixir 1.10.3 and I have such project structure:
apps
--api
----mix.exs
----lib
----test
--inventory
----mix.exs
----lib
----test
--mix.exs
I would like to add a monitoring module.

There is no command to create new modules, just add a file in the correct folder.

Related

How I can add new module to odoo 15

I am new to Odoo and I need to know what is the basic steps of adding a new module.
More specifically I need to know how to add custom modules to the addons-path.
In Odoo document they explain this step as this
$ ./odoo-bin --addons-path=../custom,../enterprise/,addons
but did not work for me.
For adding a new module you should do these steps:
Build your module with your written code or scaffold command.
Add the module path in your config file at addons-path = '',''
Change your URL like this: http://localhost:8091/web?debug=1
Go to apps and from up tabs
Select update app list and refresh your page.
Now you can see your module in the apps.
If you are not getting your custom module in Odoo after adding the path then you can try to add the full path of your folder into addons-path.
To get the full path of your custom folder just right-click on the folder and go to properties and find the path of your folder.
Also, you have to make sure to Apply the Update App list in your Odoo App Dashboard after restarting the server with custom addons.

Copying a project for Sidekick

When I copy a project, I give the project folder a new name particularly if I want maintain the old version and create a new version with additional features. The problem with this is the compiled project takes the name from the folder name of the project which is a pain. For example if the initial is folder is myproject and I create a new folder myprojectwithfeatures, the file once installed becomes myprojectwithfeatures and not myproject. In sidekick, the project name/App name cannot be changed it is greyed out.
Is it possible to change the App Name to maintain the name across versions.
When I copy a project, I use the tns create command thusly:
tns create mynewapp --appid domain.mynewapp --template <path to>/myoldapp/app
This seems to work well.
I personally don't use SideKick but you can always update the project name to anything by modifying CFBundleDisplayName entry in App_Resources/iOS/info.plist and android:label="YourAppName" attribute of application tag in App_Resources/Android/src/main/AndroidManifest.xml
More details can be found here.

autoload zf3 module without terminal command

I am using ZendFramwork3, i'm new in this so don't know how to autoload the module after creation without terminal command.
I am creating module with programme just by taking module name from the user the following things will be done :
- Module structure for new module with namespace and controller & view files will be placed under module folder
- ModuleName is initialised in modules.config.php in config folder
- Also entry in composer.json in autoload --> psr-4 initialisation done
After that i have to manually run the command "composer dump-autoload" to perfectly work my module but i don't want to do that manually rather i want solution for that to run it programmatically.
Thank you for the solution in advance.

A Module For Installing Modules in Yii

I am wondering if there is a module that gives the ability to install modules via an interface instead of copy a module files and create database tables manually and add it to config/main.php .
Is there any ? I mean something like what is in Joomla or Drupal?
As of now, I don't think there is something like this on Yii.
What we did for our projects, is this.
We created our module, that will automatically create / copy the files and the same time, add the configuration files.

How can I load the rails environment from within a gem?

I need to require config/environment.rb. How can I do this from within a gem?
You need to create a new project to get the config/environment.rb file and all other support files like environment folder, app, etc.,
When you create a new project it should automatically created these files. You don't need to create it manually.