-
Notifications
You must be signed in to change notification settings - Fork 50
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
Build Proposal/Specification #10
Comments
@kfranqueiro raised some valid concerns around discovery which should be addressed in any proposal. @novemberborn also mentioned the need to provide project scaffolding in the tooling. |
Approachesdojo-cliA To create a new app you would simply run Users would have the option to use This approach would mean that all the user would have to do to create a dojo 2 project and import the required packages is download and install yeomanYeoman provides project scaffolding via the use of custom @bryanforbes started writing a generator for dojo 1x here. This could be a base for creating the dojo 2 generator. Similar to the proposition for If we chose not to go down this route as our official starting point, it may be worth investing time in creating a usable generator anyway that simply instantiates whatever base setup is required to proceed. grunt-initgrunt-init provides project scaffolding as an extension to grunt. It gets installed globally via We will need to create the templates required. Looks like some members of the community have had a go at creating It is worth noting that both these examples state that they have been superseded by dojo/buildDojo build will contain the tools and resources required to create, build and distribute a dojo 2 project.
If we chose not to go ahead with It is intended that |
Some questions. What do we see the technology/structure of What are the advantages of having I find the scoping of dojo/build to make a lot of sense. Essentially a dependency which would contain the right sort of custom build tooling we need and whatever dependencies we need upstream. @dylans I would also really appreciate your input on this one as well. |
An initial search doesn't shed much light on out of the box technology for a customisable CLI, angular and ember's cli's both appear to be bespoke with the latter using broccoli behind the scenes. If we DID do a CLI, it would most likely just be a wrapper for a I believe that Basically, i'm all for using |
Wrapping |
In an ideal world, we want to solve both the problem of make it easy, and make it flexible for people to work this into whatever build environment they choose, without creating substantial work for us to maintain. In my mind, this means creating something simple for new users, such as a dojo-cli wrapper for Yeoman, but then also providing reasonable out of the box help (in the form of tasks or example or whatever makes sense) for people using Grunt and Gulp and perhaps broccoli or other tools. I think the only thing we know for certain is that whatever is state of the art today with build systems is unlikely to be so at the end of Dojo 2's life, so being flexible is key here. I guess the best analogy I can make is our approach to reporters or functional testing providers with Intern. While not the same, it is that level of choice that will reduce complaints over time, and also keep us honest in our approach to builds. |
I am glad that we appear to be in agreement over this |
To to summerise:
|
Building Dojo1 dijits into Dojo2 appHave been working with the latest The problem I came across is with Dojo1 plugins. It's unlikely that we will back port the build time resolution back to them, so a work around is to The only other plugin issue that came up is with app.build.js example({
baseUrl: ".",
paths: {
"src": "_build/src",
"dojo-actions": "node_modules/dojo-actions",
"dojo-compose": "node_modules/dojo-compose",
"dojo-core": "node_modules/dojo-core",
"dojo-widgets": "node_modules/dojo-widgets",
"immutable": "node_modules/immutable/dist",
"maquette": "node_modules/maquette/dist",
"rxjs": "node_modules/@reactivex/rxjs/dist/amd",
"dojo": "node_modules/dojo",
"dijit": "node_modules/dijit"
},
name: "_build/src/index.js",
out: "_build/src/index-built.js",
map: {
'*': {
'dojo/i18n': 'legacyDojoShim/i18n',
'dojo/text': 'legacyDojoShim/text'
}
},
include: [
'dojo/dojo'
]
}); ConclusionDont do this at all! |
Update to dojo1 in dojo2 config({
paths: {
"src": ".",
"dojo-actions": "../../node_modules/dojo-actions",
"dojo-compose": "../../node_modules/dojo-compose",
"dojo-core": "../../node_modules/dojo-core",
"dojo-widgets": "../../node_modules/dojo-widgets",
"immutable": "../../node_modules/immutable/dist",
"maquette": "../../node_modules/maquette/dist",
"rxjs": "../../node_modules/@reactivex/rxjs/dist/amd",
"dojo": "../../node_modules/dojo",
"dijit": "../../node_modules/dijit",
"legacyPlugins": "../../legacyPlugins"
},
baseUrl: ".",
appDir: ".",
dir: "built/",
modules: [
{
name: "index"
}
],
map: {
'*': {
'dojo/i18n': 'legacyPlugins/requirejs/i18n',
'dojo/text': 'legacyPlugins/requirejs/text'
}
}
}); |
dojo/cli is now a thing, which can be used for issue tracking for now. |
We should make sure that any thoughts or output of this is covered by the constitute parts of this and once validated we should close this in lieu of other more discreet issues. |
We can close this in favour of discreet issues in cli-build now we have a working build |
Story
Dojo 2 needs a set of tooling to make building Dojo 2 applications straight forward, as well as an easy way of managing dependencies of Dojo 2 packages.
Features
The proposal should express the following features:
Considerations
There are several things that should be considered:
validate
command typings/typings#3), although we have dts-generator this is likely limiting in the future.The text was updated successfully, but these errors were encountered: