laxarjs / generator-laxarjs2 Goto Github PK
View Code? Open in Web Editor NEWYeoman generator for LaxarJS 2.x applications, widgets and controls
License: MIT License
Yeoman generator for LaxarJS 2.x applications, widgets and controls
License: MIT License
*.vue
components are HTML fragments with template
and script
tags (we don't use style
tags). Hence the copyright header has to be an HTML comment instead of a JavaScript comment.
Fix it for generated application, widgets, activities and control.
optimize
instruction in application READMEMissed while implementing #20
When linking to docs from the prompt or the generated application, we should link to the latest http://laxarjs.org/docs/ for the corresponding LaxarJS major version, and not to the manuals / README on GitHub.
Similar Ticket for v1.x generator:
LaxarJS/generator-laxarjs#21
To simplify setup of the LaxarJS developer tools extension, we should add a (possibly commented out) .tooling()
initializer to the init.js
template.
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.
Use 0.18.2 here:
https://github.com/LaxarJS/generator-laxarjs2/blob/master/generators/app/dependencies.json#L24
See LaxarJS/shop-demo#58 for details.
Tooling is now enabled by invoking the associated bootstrapping builder method, and not throught the configuration. So that code-fragment is misleading.
We should offer the value "UNLICENSED"
as default instead of "none"
and set "private": true
if unlicensed is used.
This
const [ context ] = props.context;
should actually be
const [ context ] = props.injections;
Currently the webpack-dev-server
is still not webpack 2 aware. As soon as this is no longer an issue, we should update.
See webpack/webpack-dev-server#932
Once LaxarJS/laxar-react-adapter#27 has landed / is published, the react example code needs to be updated. Right now, it will just not work (unless the generated project is manually downgraded to an RC).
Currently, the widget/activity generators create .gitignore
files even when no standalone project is requested.
However, the ignored files are
So, the additional gitignore files are mostly noise now.
@jpommerening @alex3683 would you agree?
The integration technologies have specific identifiers ("plain"
, "vue"
, "angular"
, "angular2"
, "react"
). I suggest indicating them in the prompts (creating applications, controls, widgets) because:
widget.json
,Currently, only a human-friendly name ("Vue.js", "Angular 2.x/4.x") is shown.
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
See Reactive-Extensions/RxJS#1487 and microsoft/TypeScript#16593.
Temporary workaround is fixing Typescript to version ~2.3.4
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.
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.
It is a dev dependency but missing in the babel configuration.
"plugins": [ "transform-object-rest-spread" ]
Currently, a newly created project can only be loaded if there is a parent folder with a .babelrc
.
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?
The result for an application using for example angular should be:
import * as angularAdapter from 'laxar-angular-adapter';
instead of:
var angularAdapter = require( 'laxar-angular-adapter' );
https://github.com/LaxarJS/generator-laxarjs2/blob/master/generators/app/index.js#L121
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.
Use Travis-CI to at least run eslint
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?
When generating an application skeleton, the generator should use the prefixed variant (axActivities
).
The laxar-react-adapter has changed/simplified its integration with widgets.
The README contains several examples.
Setting a publicPath
complicates adjustments to various deployments unnecessarily.
Edit: we should avoid an absolute publicPath if possible. A working relative path would be OK, as it does not impact deployment.
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?
The npm scripts for browser specs are outdated and the setup is completely missing from webpack.config.js
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.