-
Notifications
You must be signed in to change notification settings - Fork 9
Update bower.json #3
base: master
Are you sure you want to change the base?
Conversation
Include forgotten js/base.js
@amfg Thanks for the PR. It looks like you may be trying to fix #2. Can you describe how you are consuming WinJS thru bower that is causing this problem? According to the bower documentation, there should only be one entry in Note that |
Yes, this was an attempt to fix #2. |
@amfg What gulp task is not picking up WinJS's |
There are multiple libs that does not pick up the base.js, two of them are: grunt-wiredep (automatically injects .js links into .html file) and main-bower-files (pipes the main outputs from all bower components) The second is a gulp task while the first is grunt. Works fine when manually editing the bower files inside the winjs folder. Do you still need me to make a full repro? |
\cc @sindresorhus Do you have any guidance on this? |
Nothing other than using npm instead. I don't use Bower.
|
Bower recently changed its spec, but didn't leave the tooling ecosystem (where wiredep lives) any options for packages that do the right thing and conform to it (where winjs-bower lives). See bower/spec#47 for attempts at solving the problem. For wiredep and other tools that support the community-created {
"name": "your-project",
"dependencies": {
"winjs": "4.1.0"
},
"overrides": {
"winjs": {
"main": [
"js/build.js",
"js/ui.js",
"css/ui-dark.css",
"fonts/Symbols.ttf"
]
}
}
} or... var wiredep = require('wiredep');
wiredep({
overrides: [
winjs: {
main: [
'js/build.js',
'js/ui.js',
'css/ui-dark.css',
'fonts/Symbols.ttf'
]
}
]
}); I'm not too familiar with this project, but as long as files are included in the Bower package that work for your app, you can use overrides to tell us to inject them. More about wiredep + overrides: https://github.com/taptapship/wiredep#bower-overrides |
Thanks @stephenplusplus! It sounds like WinJS is doing the right thing and there's nothing more for WinJS to do at this time. You provided a workaround for apps and bower is working on a solution that WinJS can utilize in the future. Is my understanding correct? |
I just have to ask, what is the problem with having one additional .js reference in the "main" section of the project's bower file? There is already ui.js, ui-dark.css and Symbols.ttf in there, why can't you simply add base.js as well? Should all project that want to use WinJS, add ~13 lines of infrastructure code simply to include base.js in additional to the other files? I agree with @sindresorhus on using NPM, but ASP.NET 5 beta uses Bower and if those developers want to continue to use bower, they have to do work-arounds for WinJS that are not required for most other dependencies. Already told Microsoft to drop using Bower in the default template, though they rely on a few Bower-only packages for their standard ASP.NET 5 website, like this, which they really could put on NPM as well: https://github.com/aspnet/jquery-validation-unobtrusive Edit: I read this on one of the links references above: "Now main should no longer lists all the files (The entry-point files necessary to use your package. One per filetype).". So I can understand the current tooling issue then... no fun. |
Include forgotten js/base.js