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
Updating Kitto static assets #39
Comments
How about just putting the Kitto core JS into its own NPM module and then
its just application.js that would need manual updates?
…On Sat, Nov 26, 2016, 7:58 AM Dimitrios Zorbas ***@***.***> wrote:
The installer generates a few files (see:
https://github.com/kittoframework/kitto/tree/master/installer/templates/new/assets/javascripts)
which are required by all widgets. There has to be a simple way for the
user to get the latest version of those assets.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#39>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKs1ZhBdlwrO3gXX8R5zAJWd5luDQbDks5rCC0TgaJpZM4K845f>
.
|
Sounds like a good idea, preferable the Then they never need to update their application.js |
Sorry for taking so long to respond to this one. I think we should split the current application.js in two files. On containing the Kitto core functionality (https://github.com/kittoframework/kitto/blob/master/installer/templates/new/assets/javascripts/application.js#L3:L63) and keep generating an application.js containing: import '../stylesheets/application.scss';
import 'kitto';
// This file acts as a manifest to require your dependencies but you may also
// place code specific to you dashboard. The only reason I didn't initially follow the above practice is to keep compatibility with nodejs version <= 5.0. You need node >= 5.0 to define local dependencies like: // File: package.json in a dashboard app
"dependencies": {
"kitto": "file:deps/kitto"
} and have a // File: package.json of Kitto
"main": "./priv/static/kitto.js" Which is what phoenix does to package and update its static js assets. |
What if we packaged the kitto JS and SCSS as an NPM package? Would that allow us to still support Node v4 LTS? |
@davejlong right but then the user would have to update both mix and npm dependencies to be up-to-date. My thoughs are, judging from the release plan of nodejs v4 is to be considered LTS till Apr.2017 and it's also the packaged version in Debian Stretch, same applies to Debian derivatives (Ubuntu, Mint, ..). So, dropping support for nodejs 4 seems like a bold move. Phoenix already chose this direction so I feel we can afford to do so now that it's still early (we haven't reached an 1.0 version). |
Looking at the expected developer base for Kitto, I think dropping v4 support would be fine. I would expect that we have 2 types of developers currently: JS devs and Elixir devs. JS devs will have enough understanding of JS to know how to run v5+ and Elixir devs will already be used to it given that Phoenix is so prominent. |
isn't this loading of local dependencies an NPM >= 2.x thing rather than a Node >= 5.x thing? https://docs.npmjs.com/files/package.json#local-paths or am I not understanding the issue? |
@mackenza Your observation seems valid. I think that most people though, get npm packaged with their nodejs installation. So nodejs@4.6.1 seems to package npm@2.15.9 Debian though (my Linux distro of preference) has npm as a separate package at version 1.4.21, where local dependencies aren't supported. I was led to believe (:alien:) it's a nodejs@4_x issue and a higher version is required. I'd be great if we can move with this issue without dropping support for some nodejs versions but rather specify the required npm version. |
while it doesn't surprise me that Debian ships NPM 1.x (sigh), it's definitely not the norm. There is certainly no problem with separating Node version requirements from NPM as NPM is not even the only Node package manager in town anymore (yarn. My recommendation is we do as per above and simply state that NPM >= 2 or a package manager capable to local dependencies is required. |
I just released 0.5.0 which now packages |
The installer generates a few files (see: https://github.com/kittoframework/kitto/tree/master/installer/templates/new/assets/javascripts) which are required by all widgets. There has to be a simple way for the user to get the latest version of those assets.
The text was updated successfully, but these errors were encountered: