-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Bower support #21
Bower support #21
Conversation
Repository begins to be a bit bloated with different kinds of builds, but it appears that for different environments different builds are required:
So ideally |
If you will explain how can I achieve the structure from first comment, I will update the PR. |
cc9dd8f
to
7ebefb0
Compare
I've managed to patch the builder to make stuff go to Archives no longer needed since NPM package now can be published without any extra procedures except build via npm run build
npm publish And browser clients can download ZIP/TAR from Github. |
As a part of the build I also recommend to bump versions in |
You already mentioned
and yes I'm not very happy with that. I would like to keep a clear difference between repo for development and versioning and releases. I like the idea of bower, but unfortunately bower doesn't do so. The The build process includes Keep a clear difference between releases and development can be done by branches. I suggest to keep development on the |
True, repository should follow Gitflow principles and guidelines. According to Gitflow you do all integration and development in Speaking about It is normally considered as a good practice to publish not only builds, but also raw components along with something intermediate between build and components, so that end users may choose how they want to pack it, say, TypeScript raw files, AMD/CJS versions and single-file build. As an example -- Webpack suggests to use NPM versions even for frontend in order to let webpack to optimize the final build in a best possible way. Anyway, it does not cost much for us to include different things in packages and end users would certainly appreciate some freedom of choice. |
c77fa7e
to
6a60715
Compare
Created a new release, had to bump the patch version, because bower doesn't load semver pre-releases. Unfortunately Just asked for moving the repo target bower/bower#120 (comment). |
So I guess non-RequireJS users in order to add AES will have to add the following sequence:
Do you really want to get rid of bre-built files? :) |
There is one file But yes it's missing in the README, should add this. |
Aw, OK :) it's 32KB, so not a big deal at all... Btw, this file could also have minified version nearby, and normal practice is to put both of them in Btw, Contribution section in |
Currently I'm targeting the bower support, but I want to automate the release process a bit more in future. As I already mentioned I like the idea of bower to provide packages independent from runtime env (not like npm) and I also use it, but it's actually not a really proper solution to use development repositories as package manager distribution network. Usually a development repo can be something totally different to a release, due to build processes, compilers, different platform releases and so on ... For that reason I decide to provide clean releases on master with tagged versions and everything else can be found in the repo under dev. I never use minified libraries in my projects due to debugging while dev and at the end I just minify the whole project before pushing it on a live platform, so it's not necessary to have minified files. Just remember git "GitHub" is a versioning tool for development and contribution not a CDN or release platform ;) |
Well it seems to be a regular practice to keep all the stuff in single repo... It's a lot more convenient rather then to partially copy-paste files from other branches/repos before publishing. Speaking about minified versions -- source maps solve all debugging issues and minified version itself is sometimes needed when project does not use any specific build tools. But it is totally optional. With Github "Releases" tab it can be used as CDN or release platform :) |
Plus single-repo approach is the least confusing for contributors: npm run build Build can also include tests, JSHint/JSLint and all other code quality checks. I've also seen how people fail the build when code coverage condition is not met. |
- Created CONTRIBUTING.md - Updated README.md - Added package.json scripts
I have rebased the PR, now it contains only documentation and package.json fixes. |
I wonder how come I measured that build |
README.md
section)Unfortunately, NPM publish directly from repository is not yet possible:
is very ugly and I don't want to break backward compatibility with existing installations. So far I haven't found a way to explain NPM/Node to look for
crypto-js/whatever
not in root folder of package, but somewhere else.So for now NPM publish procedure will stay the same, unless I'll find a way to leave files in sub-folders and refer to them as before. Bower requires only pre-build and can be published without extra efforts.
In order to register Bower package please do:
So far package name
crypto-js
is not taken yet, so be quick :)What could be done after this is to make the following structure (I can't make builder to produce this kind of output):
package.json
'smain
property to index file thereThis will require users of previous NPM package to update their references from
require('crypto-js/whatever')
torequire('crypto-js/lib/whatever')
but it seems that this is a wide-spread practice to put stuff intolib
.