caplin / caplin-dev-tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unclear Readme

aogilvie opened this issue · comments

commented

Hi, I'm trying to update my Bladerunner application however the README steps seem very unclear, it would be great to have some examples.

My current errors is:

[@wsjp16018 zen]$ brjs-app-converter --app Zen
fs.js:844
  return binding.stat(pathModule._makeLong(path));
                 ^

Error: ENOENT: no such file or directory, stat 'apps/Zen/app.conf'
    at Error (native)
    at fs.statSync (fs.js:844:18)
    at createConversionMetadataDataType (converter-utils.js:53:6)
    at exports.default (converter.js:21:29)
    at Object.<anonymous> (/home/AD//Documents/node-v4.2.6-linux-x64/lib/node_modules/@caplin/brjs-app-converter/src/cli.js:15:1)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)

Confusing things:

During preparation, I should export META data, but put it where/do what with it?

A metadata.js module is created by the conversion

Where to? What conversion...?

Hey Ally,

This converter is to support a future version of our product, so at the moment it is only being used internally for testing.

Hope you're doing well buddy

Hi @aogilvie ,

I am product owning the next version of Caplin Trader which we have been working on for the past few months. Its still early days but, the environment is starting to come together and as you can see we are working on upgrade tooling to ensure the process is as smooth as possible.

In the next week or two i'll set up a session with yourself and the team to talk through our plans, we are very keen on getting feedback on the new look environment and upgrade process.

Thanks,

Steve

Hi Ally,

Sorry about the unclear documentation as @thecapdan says the conversion will only complete with a newer version of our SDK (webpack needs it to be fully CJS) but the error you are seeing is well before the stage of trying to run the application so it looks like it's something we need to investigate.

Firstly I notice you are running node v4 node-v4.2.6-linux-x64, we have been moving to use node v6 for the dev tooling - now granted I doubt the error is caused by node v4 but I just wanted to give you a heads up there. Using node v6 means we have to compile fewer ES2015 features as almost all of them are supported by v6.


As for the error it's happening on this line https://github.com/caplin/caplin-dev-tools/blob/master/brjs-app-converter/src/converter-utils.js#L53 which means that Zen trader has no app.conf file, I thought that was a requirement for BRJS apps? Does the app.conf file exist somewhere else in your structure? It's used to get the applicationNamespaceRoot = appConfYAML.requirePrefix; value. Maybe I can add a command line flag to pass in that value? It's the first part in the namespace for your apps code, maybe sbi or zen for your app.

I could prevent this error from taking down the conversion tool but the applicationNamespaceRoot is required later on.

Ah wait, is the directory name zen or Zen?

commented

@thecapdan @stevesouth @briandipalma Hey there, thanks for the replies.

In the next week or two i'll set up a session with yourself and the team to talk through our plans,

Sounds great, I got your email thanks.

means that zen has no app.conf

We do have an app.conf, in root/apps/zen/app.conf. The folder structure is a little confusing. When I project-root$ mkdir .../conversion-data and copy libs etc, what should conversion-data look like?

conversion-data/
    blades/
    libs
    app.conf
    default-aspect

I can wait for a more final version of the tools, but I don't mind helping to test as on our project if that helps :)

So if you do have an app.conf file that means that you are either running the command from the wrong directory or that the --app value should be zen and not Zen, it looks like the directory is zen so maybe try that? I'll get some screenshots into the README to clarify the structure. I'll ping you when done.

@aogilvie I've reworded the README, added more screenshots and added an extra check which should result in a clearer error if the --app parameter is incorrect.

During preparation, I should export META data, but put it where/do what with it?

A metadata.js module is created by the conversion

Where to? What conversion...?

The rewritten documentation now says this:

  • Capture the applications's metadata. This can be done by executing require("app-meta!$data") when the application
    is running in BRJS. A metadata.js module should be created in the application's conversion-data config directory
    containing that metadata. This is an example of a metadata module.
const VERSION = process.env.VERSION || 'dev';

module.exports = {
    APP_VERSION: process.env.NODE_ENV === 'production' ? VERSION : 'dev',
    VERSIONED_BUNDLE_PATH: 'v/dev',
    LOCALE_COOKIE_NAME: 'BRJS.LOCALE',
    APP_LOCALES: {
        en: true
    }
};

what should conversion-data look like?

There are now screenshots along with a rewritten explanation of conversion-data in the README, are they helpful?

commented

Awesome thanks! I'll give this another go next week. README is very informative now.