zendesk / cross-storage

Cross domain local storage, with permissions
Apache License 2.0
2.22k stars 180 forks source link

hard-coded versioning in dist #5

Closed bolshchikov closed 9 years ago

bolshchikov commented 9 years ago

The hard-coded version in the name of the file after bower update when version is updated with break path specified in index.html

danielstjules commented 9 years ago

Doesn't seem to. Were you able to a produce an instance where that's the case?

$ tree bower_components/
bower_components/
└── cross-storage
    ├── LICENSE
    ├── bower.json
    └── dist
        ├── client-0.4.0.js
        ├── client-0.4.0.min.js
        ├── hub-0.4.0.js
        └── hub-0.4.0.min.js

2 directories, 6 files
$ bower update
bower cached        git://github.com/zendesk/cross-storage.git#0.4.1
bower validate      0.4.1 against git://github.com/zendesk/cross-storage.git#~0.4.0
bower install       cross-storage#0.4.1

cross-storage#0.4.1 bower_components/cross-storage
$ tree bower_components/
bower_components/
└── cross-storage
    ├── LICENSE
    ├── bower.json
    └── dist
        ├── client-0.4.1.js
        ├── client-0.4.1.min.js
        ├── hub-0.4.1.js
        └── hub-0.4.1.min.js

2 directories, 6 files
bolshchikov commented 9 years ago

What I meant was (fixed the initial comment) is when you specify the dependency in html files, the update of version will break html. Let's say I have the following code now in my index.html

<script src="bower_components/cross-storage/dist/hub-0.4.1.js"></script>

When CI will run build, and you've published a new version, for example, 0.4.2, bower install will download the latest 0.4.2 version. Thus, every time there's a new version, I'll have to update index.html and rebuild the project.

So, let's remove the version from the filename so bumping the version wouldn't lead to rebuilding the whole project.

danielstjules commented 9 years ago

Makes sense - will make that change with the next minor release. Just hoping to get tests green beforehand. Thanks!

bolshchikov commented 9 years ago

Thanks

danielstjules commented 9 years ago

@bolshchikov done :)

bolshchikov commented 9 years ago

Thanks