Giter Site home page Giter Site logo

generator-laxarjs2's People

Contributors

jpommerening avatar x1b avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-laxarjs2's Issues

small doc improvements

  • generate optimize instruction in application README
  • generate link to docs in application README
  • point out generated README as generator finishes

Make sure themes and layouts have a .json file.

See LaxarJS/laxar-tooling#27 and LaxarJS/laxar-tooling#28.

We made descriptor files mandatory for all "directory" artifacts (everything except flows and pages), because we want to use the unmodified resolve-machanisms of webpack and webpack can not resolve directories.
Maybe we can review that decision in 2.1 or later by making use of require.context() or something like that, but for now, let's just add theme.json and layout.json files.

Indicate technical integration technology names in prompts

The integration technologies have specific identifiers ("plain", "vue", "angular", "angular2", "react"). I suggest indicating them in the prompts (creating applications, controls, widgets) because:

  • it allows users to recognize/use the respective string in the widget.json,
  • it helps to associate them to their respective adapter module,
  • when using a widget for which the adapter is missing, LaxarJS will generate a FATAL message containing the technical name. Users should be able to recognize it,
  • in tutorials/docs, we can say "create a 'vue' widget" without special instructions for using the generator.

Currently, only a human-friendly name ("Vue.js", "Angular 2.x/4.x") is shown.

Dependencies: Avoid projects to upgrade jasmine-core to 2.6.0

Because of some errors when using jasmine-core 2.6.0 in PhantomJS, we should use jasmine-core 2.5.2 as dependency.

Replace the caret "jasmine-core": "^2.5.2", with the tilde "jasmine-core": "~2.5.2", in the dependencies.json for the app.

One example with the shop-demo:

The tests of the article-browser-widget resolves in

PhantomJS 2.1.1 (Linux 0.0.0) The article-browser-widget subscribes to didReplace events of the articles resource FAILED

TypeError: undefined is not a function (evaluating 'allKeys[i].match(/^[0-9]+$/)') in node_modules/jasmine-core/lib/jasmine-core/jasmine.js (line 2576)

webpack:///application/widgets/article-browser-widget/spec/article-browser-widget.spec.js:41:32 <- application/widgets/article-browser-widget/spec/article-browser-widget.spec.js:17820:27

https://github.com/LaxarJS/shop-demo/blob/master-2.x/application/widgets/article-browser-widget/spec/article-browser-widget.spec.js#L41

app template: add SCSS setup

In the current setup themes are expected to be built using CSS. Instead we want to use SCSS by default Since SCSS is a superset of CSS, writing plain CSS would still be possible without any troubles.

app generator: use webpack default port as default

While it is nice to allow the user to specify a port during app setup (at the same time telling her the port), I suggest using the webpack-dev-server default port 8080 as default, and only actually adding the --port parameter to the npm start script if it deviates from that default.

This should help existing webpack users to recognize that the dev-server is being used without too much additional scaffolding. Also, once the parameter is written to the package.json, it is not obvious how to change it, even if you know webpack (because it is not written in the webpack.config.js).

Updated: removing port from the generator prompts completely, especially because webpack may simply pick a different port depending on what is in use. There is webpack documentation on changing the port.

add missing .babelrc

Currently, a newly created project can only be loaded if there is a parent folder with a .babelrc.

app generator: add favicon?

This is more or less cosmetic: when browsing to a new application in Chrome with the developer tools open, I immediately see big red error (404 Not Found) because there is no favicon. Of course, this is not actually a problem, but it may be distracting to newbies.

Also, why not use the opportunity and shamelessly promote LaxarJS using our own favicon? ๐Ÿ˜ˆ

Change output bundle name from `app` to `init`

The bundle name should match the name of the entry point, so that it is more obvious to new developers what file needs to be touched to e.g. change config or to import additional libraries, adapters, etc.

The debug.html and index.html will need to be modified accordingly.

overwritten default paths should be taken into account

The default paths where webpack resolves widgets and controls can be overwritten by adding a file laxar.config.js to the application directory and exporting custom directories there. I think it would be great if the generator would also read that file (if present), and use the directories defined there as default directories to create controls, widgets and activities in.

@x1B @jpommerening @jonaswjs Any thoughts on this?

Missing deps: chalk, mkdirp

chalk and mkdirp are used but not declared as deps.
Might work on your machine anyway if you have these modules installed globally โ€ฆ I guess?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.